Confirmed users
1,927
edits
(→Plan) |
No edit summary |
||
Line 60: | Line 60: | ||
Migration scripts are in a [https://github.com/markrcote/bugzilla-git-migration GitHub repo]. | Migration scripts are in a [https://github.com/markrcote/bugzilla-git-migration GitHub repo]. | ||
== Testing == | |||
=== Initial Migration === | |||
When the git repos are created, we can do a full migration to look for errors. The migration script (migrate.sh) calculates the md5sum for all files in the head of each branch in both bzr and the resulting git repository and compares them. After the trial migration we can examine the log for differences. Limitations: this only checks heads of branches and only checks file names and contents, not file nor commit metadata. This could be extended without much difficulty for the former, but the latter would require more work. | |||
The first trial migration was completed on 2014/02/12. It was successful aside from a few files that were removed in bzr commits but present in the final git repository. It appears that at least some of these are a result of a directory being renamed and files in that directory being removed in the same commit; bzr records this (given old name "A" and new name "B") as "R A B" followed by "D A", meaning that the delete is recorded on the original name, not the new name. This results in the rename being successful but the delete being ignored. This is not critical, since they can be removed after the fact, but it might be worth adjusting the fastexport translation script to account for this. | |||
=== Continuous Mirroring === | |||
Initial testing involves creating a new bzr branch from a current one (e.g. from bugzilla/trunk), migrating that over to git, then making various changes to git and running the git-to-bzr.pl script (either regularly on cron, or manually for more fine-grained testing). The resulting commits should have identical commit metadata and changes to file metadata and contents. We can manually inspect for the first two and use the same process as the initial migration for the latter. | |||
Changes that should be tested: | |||
* Commits from various authors. | |||
* Creating a new file in an existing directory. | |||
* Creating a new file in a new directory (git has no concept of empty directories). | |||
* Modifying a file's contents. | |||
* Modifying a file's metadata. | |||
* Removing a file. | |||
* Removing the only file in a directory (mirror script should automatically delete the empty directory to match git's behaviour). | |||
* Moving/renaming a file. | |||
For on-going testing, we can set up periodic automated comparisons, if desired. |