Merge lp:~a-s-usov/bzr-fastimport/renaming-tags into lp:bzr-fastimport
Proposed by
Alex Usov
Status: | Superseded |
---|---|
Proposed branch: | lp:~a-s-usov/bzr-fastimport/renaming-tags |
Merge into: | lp:bzr-fastimport |
Diff against target: |
223 lines (+110/-7) 4 files modified
cmds.py (+10/-2) exporter.py (+46/-5) tests/test_commands.py (+19/-0) tests/test_exporter.py (+35/-0) |
To merge this branch: | bzr merge lp:~a-s-usov/bzr-fastimport/renaming-tags |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jelmer Vernooij (community) | Needs Fixing | ||
Review via email: mp+79106@code.launchpad.net |
This proposal has been superseded by a proposal from 2011-10-17.
Description of the change
As we discussed in the ticket -- implements new command-line flag for fast-export:
--rewrite-tag-names
The flag is is switched off by default.
If enabled tags which have incorrect name will be rewritten by replacing all invalid symbols (or substrings like .lock suffix) with underscore.
Some extra care is taken to ensure rewritten names are unique.
To post a comment you must log in.
Thanks for the patch. This mostly looks ok; some minor issues:
* two empty lines are necessary before "+class CheckRefnameRew riting( tests.TestCase) :" and "+def sanitize_ ref_name_ for_git( name_dict, refname):", consistent with PEP8.
* The --rewrite-git-tags option needs a test
* Please use underscores rather than camelcasing
* rewrite_dict could be a local variable rather than a class variable
I'm not sure if it's all that useful to try to prevent duplicate tag names, as this is pretty much impossible. Even with your changes there are risks of duplicate tags (e.g. with incremental imports). Likewise, your change may cause tag names to change if another tag is removed.