Merge lp://staging/~a-s-usov/bzr-fastimport/renaming-tags into lp://staging/bzr-fastimport

Proposed by Alex Usov
Status: Superseded
Proposed branch: lp://staging/~a-s-usov/bzr-fastimport/renaming-tags
Merge into: lp://staging/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://staging/~a-s-usov/bzr-fastimport/renaming-tags
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) Needs Fixing
Review via email: mp+79106@code.staging.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.
Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Thanks for the patch. This mostly looks ok; some minor issues:

* two empty lines are necessary before "+class CheckRefnameRewriting(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.

Revision history for this message
Jelmer Vernooij (jelmer) :
review: Needs Fixing
337. By Jelmer Vernooij

Merge support for --rewrite-tag-names.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches