Count trunk as possible parent of branches from a vendor branch.
commitd14550bdc675b8842c92f8576cc5f6fd46714f3b
authormhagger <mhagger@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Mon, 4 Apr 2011 12:07:36 +0000 (4 12:07 +0000)
committermhagger <mhagger@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Mon, 4 Apr 2011 12:07:36 +0000 (4 12:07 +0000)
treea33eb5754b3ce5833b8a55cbc8b727939c650c7c
parentb3275bade195c409eda87379f1e261b823999b28
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
cvs2svn_lib/symbol_statistics.py
run-tests.py