Add a new AllExcludedRule.
commit11d8350ce26d291cd0e4e1999e39c1829fb3474d
authormhagger <mhagger@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Mon, 29 Mar 2010 18:19:40 +0000 (29 18:19 +0000)
committermhagger <mhagger@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Mon, 29 Mar 2010 18:19:40 +0000 (29 18:19 +0000)
treec19826c1ca236f6bb3cd6c22566ffd7e2285e39f
parent392d06492ffaaa4830ccd67b760e6b2d289eca54
Add a new AllExcludedRule.

Patch by: Jon Foster <jon.foster@cabot.co.uk>

When migrating a large CVS repository, there are many branches to
consider migrating.  One option is to say "we'll migrate everything
except [some list of branches]".  Cvs2svn has good support for that,
with "--exclude" and it's options-file equivalents.  But I want to do
something a bit different - by default I want to exclude everything,
and only include what's specifically asked for.

So, in our options.py file, I will be specifying a ManualSymbolRule
for every branch I want to keep.  (Equivalently I could use a
SymbolHintsFileRule, but as a matter of personal preference I'd rather
have all the cvs2svn configuration in a single file).

This patch adds an AllExcludedRule that can be used as the last entry
in symbol_strategy_rules[], and will exclude every branch or tag that
hasn't been explicitly kept.

E.g.:
  run_options.add_project(
    ...
    symbol_strategy_rules=[
        ManualSymbolRule(None, 'release-82-branch',
                         convert_as_branch, None, '.trunk.'),
        ManualSymbolRule(None, 'release-82',
                         convert_as_tag, None, 'release-82-branch'),
        ManualSymbolRule(None, 'release-83-branch',
                         convert_as_branch, None, '.trunk.'),
        ManualSymbolRule(None, 'release-83',
                         convert_as_tag, None, 'release-83-branch'),
        AllExcludedRule(),
        ],
    ...

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5092 be7e6eca-30d4-0310-a8e5-ac0d63af7087
cvs2svn_lib/run_options.py
cvs2svn_lib/symbol_strategy.py
run-tests.py