Re: PATCHES: start adding Mercurial backend (HgOutputOption)
Greg Ward <[email protected]>
| Newsgroups | gmane.comp.version-control.subversion.cvs2svn.devel |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Sep 4, 2009 at 10:08 AM, Greg Ward<[email protected]> wrote: > I've finally started assembling a patch queue that adds the Mercurial > backend, HgOutputOption. This is a pretty big patch series, so hang > on to your hats. And here it is again. I've been tinkering and polishing over the weekend. Most importantly, the whole test suite now passes after every patch. I also folded some trivial comment/logging patches into earlier "real" patches, so there are fewer overall. As before, here are the patches to add and test basic Mercurial output. I'm pretty comfortable with things now; IMHO this is ready to start getting committed. But if you'd rather see the whole series before committing to svn, please let me know. 1) Add skeletal hg_output_option with support for primary commits only. * cvs2svn_lib/hg_output_option.py: new module http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/hg-output-primary.patch 2) hg_output_option: initial support for adding tags - flesh out process_tag_commit() - track Hg changesets in self.changesets - track tags in self.tags - use and maintain self._mirror - factor _commit() out of process_primary_commit() - write and commit .hgtags after converting everything http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/hg-output-tags.patch 3) hg_output_option: initial support for branch creation. - factor _create_fixup_changeset() out of process_tag_commit() - add branch support to _commit() - flesh out process_branch_commit() http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/hg-output-branches.patch 4) hg_output_option: record the branch of each tag and primary commit. (Without this, branch support was a bit of a joke: all we did was create branches. Now they actually have some changesets.) http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/hg-output-record-branch.patch 5) hg_output_option: use dummy merges to avoid many-headed repository. - track pending (unmerged) fixup changesets - whenever we're about to commit a changeset, check if there is a pending fixup and, if so, dummy merge it in - at the end of conversion, do a final round of dummy merges to make sure there are no remaining heads created by fixup changesets (this is actually necessary for correctness: without it, the tip of default might not be the same as the head of CVS trunk) http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/hg-output-dummy-merge-tag-fixups.patch 6) Simpler way to find the trunk when writing .hgtags. http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/hg-output-hgtags-simplify-trunk.patch 7) hg_output_option: countermand cvs2svn default and enable GC. This is particularly important under Mercurial 1.3, which seems to have a reference cycle somewhere (memory use grows quickly without GC). Also, do a preemptive GC run after conversion to avoid warning. http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/hg-output-gc.patch 8) hg_output_option: fix so branches with a "split" creation work. - add _create_second_coming() - modify process_branch_commit() to call it when appropriate - factor _get_source_changesets(), _commit_fixup() out of _create_fixup_changeset() http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/hg-output-split-creation-branches.patch 9) run-tests: fix some out-of-date git-related comments. http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/run-tests-git-comments.patch 10) run-tests: start refactoring for testing cvs2hg. - turn GitConversion into DVCSConversion - rewrite main_hg() test case to run cvs2hg with direct conversion http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/run-tests-start-refactoring.patch 11) run-tests: test output of cvs2hg directly. Use the Mercurial API to open and read the repository and test, in gory detail, that it contains exactly what we expect it to contain. http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/run-tests-cvs2hg-main.patch 12) run-tests: yet more testing in main_hg(). http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/run-tests-hg-split-branch.patch 13) run-tests: in main_hg(), test that heads == branch heads http://vc.gerg.ca/hg/cvs2svn-patches/file/tip/run-tests-hg-heads.patch ------------------------------------------------------ http://cvs2svn.tigris.org/ds/viewMessage.do?dsForumId=1667&dsMessageId=2392161 To unsubscribe from this discussion, e-mail: [[email protected]].