Count trunk as possible parent of branches from a vendor branch.
Patch by: Jon Foster <jon.foster@cabot.co.uk>
Edited by: me
With help from: James Blackburn <jamesblackburn@gmail.com>
This is related to, but only a partial improvement to, the problem
covered by issue #54.
From Jon's email:
Part of my repository history is:
- "cvs import" a new module, onto vendor branch VENDOR-BR
- Create a branch FOO-BR from r1.1.1.1 of all the files
cvs2svn wouldn't believe me when I told it that FOO-BR's parent was
trunk (using a symbol strategy rule). It insisted that the parent
had to be VENDOR-BR, and I couldn't exclude VENDOR-BR. A minimal
test case is included in the attached patch.
The attached patch allows me to migrate this branch/module
successfully. When calculating parents for a branch, it checks if
the parent revision is a vendor revision like 1.1.1.1, and if so
then it notes trunk as a possible parent.
Since it changes the way possible parents are calculated, this patch
can change the parent which cvs2svn selects for a branch. In the
cvs2svn test suite, this patch unexpectedly changes the behaviour of
the existing tests 14, 15, 16, and 17. These all check the parent of
the B_FROM_INITIALS_BUT_ONE branch in the "main" test repository.
From looking at the CVS history, I don't think it's possible to tell
if the parent is really B_FROM_INITIALS, trunk, or "vendorbranch".
The old code made B_FROM_INITIALS the parent; the new code uses
trunk. I think this is OK, and I've updated the tests accordingly.
(Looking at the README file, it looks like trunk is the real
parent).
git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5335 be7e6eca-30d4-0310-a8e5-ac0d63af7087