@@ -21,15 +21,17 @@ This page is intended to act as a guide when migrating branches from fcm to git
2121after the initial git release. It assumes that you have already :ref: `created
2222a fork <forking>` of the repo you are migrating to.
2323
24- .. tip ::
24+ .. important ::
2525
26- The process below involves creating a patch file based on your fcm branch,
27- and then applying it to git branch taken from the same branching point. For
28- convenience, the ``git_migration `` tag is provided as a branch point in both
29- fcm and git. However all ``fcm `` revisions and tags have a direct equivalent
30- commit on git - tags will have the same name on both, revisions of specific
31- commits will need to be manually aligned with a commit hash by comparing
32- commit messages.
26+ The process below involves rsyncing the changes in your fcm working copy to
27+ a git clone. This requires that the two branches have equivalent branch
28+ points, so ensure this is the case.
29+
30+ For convenience, the ``git_migration `` tag is provided as a branch point in
31+ both fcm and git. However all ``fcm `` revisions and tags have a direct
32+ equivalent commit on git - tags will have the same name on both, revisions
33+ of specific commits will need to be manually aligned with a commit hash by
34+ comparing commit messages.
3335
3436#. Optionally, create a new branch in ``fcm `` using the tag ``git_migration ``.
3537 Then merge your development branch onto this one, eg.
@@ -42,38 +44,28 @@ a fork <forking>` of the repo you are migrating to.
4244
4345 Resolve any conflicts and then commit these changes to this branch,
4446 ``fcm ci ``.
45- #. Create a patch file from your new branch at the migration point. To do this
46- you will need to know the branch point of your fcm branch, which can be found
47- from the ``fcm binfo `` command
48-
49- .. code-block ::
50-
51- fcm diff --git --force --diff-cmd /usr/bin/diff -x "-au" \
52- fcm:REPO.x_tr@BRANCH_REVISION \
53- fcm:REPO.x_br/dev/USER/BRANCH_NAME > \
54- /path/to/branch_diff.patch
55-
5647#. Move into your git clone and :ref: `create a new branch <create_branch >` with
5748 the same start point as your fcm branch. If you are branching from an
5849 untagged revision, you will need to manually find the relevant hash for that
5950 commit from the git log by comparing commit messages.
6051
6152 .. code-block ::
6253
63- git switch -c <branch name> <tag to branch from>
54+ git switch -c <branch name> <tag/hash to branch from>
6455 e.g. git switch -c new_migrated_branch git_migration
6556
66- #. Apply the patch file onto the git branch.
57+ #. Rsync the changes over from the fcm export to the git clone. Use ``--delete ``
58+ to remove any files you have deleted in your branch. Use
59+ ``--exclude=.git --exclude=.svn `` so that the version control directories
60+ aren't modified.
6761
6862 .. code-block ::
6963
70- patch -p0 -s < /path/to/branch_diff.patch
64+ # NOTE: You need the trailing backslash on the fcm source path
65+ rsync -av --delete --exclude=.git --exclude=.svn path/to/fcm/export/ path/to/git/clone
7166
72- #. If your fcm and git branches are from an equivalent branch point, there
73- shouldn't be any conflicts applying the patch file. Check carefully the
74- output of the patch application, ``git status ``. If you have new files on
75- your branch these will need adding via ``git add ``. Deleted files will also
76- need deleting via ``git rm ``.
67+ #. Check carefully the output of the rsync via ``git status ``. If you have new
68+ files on your branch these will need adding via ``git add ``.
7769#. Finally, all branches will **need ** to update to the initial git release in
7870 order to run the test suites. This can be done by merging the ``stable ``
7971 branch into your new branch. See :ref: `updating a branch <updating_branch >`
0 commit comments