Merge lp:~maxb/bzr-fastimport/branch-mapper-stuff into lp:~bzr/bzr-fastimport/fastimport.dev
Proposed by
Max Bowsher
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~maxb/bzr-fastimport/branch-mapper-stuff |
Merge into: | lp:~bzr/bzr-fastimport/fastimport.dev |
Diff against target: |
227 lines (+48/-70) 5 files modified
branch_mapper.py (+28/-33) branch_updater.py (+3/-3) bzr_commit_handler.py (+3/-0) cache_manager.py (+5/-1) tests/test_branch_mapper.py (+9/-33) |
To merge this branch: | bzr merge lp:~maxb/bzr-fastimport/branch-mapper-stuff |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ian Clatworthy | Approve | ||
Review via email: mp+14594@code.launchpad.net |
To post a comment you must log in.
As per thread "bzr-fastimport: Set branch-nick from git ref-names" on the bazaar ML.
First, a number of minor refactorings to the branch_mapper:
* Avoid spurious 'git-' being prefixed on branches whose names happen to end with 'trunk', _git_to_ bzr_name. Also document.
by tightening logic in BranchMapper.
* Remove unused and unimplemented BranchMapper. bzr_to_ git, and update docstring.
* Make BranchMapper just map one name per call.
Move building a dict to the one callsite which actually wants that.
* Store the BranchMapper in the CacheManager so it can be got from other places.
Culminating in:
* Default branch-nick to mapped git ref name.
One concern is that with this change, it would be impossible to round-trip a Bazaar revision with no branch-nick property. I think fast-import might need an option to suppress the auto-filling of branch nicks.