bzr-fastimport: Set branch-nick from git ref-names

Max Bowsher maxb at f2s.com
Wed Nov 4 21:49:05 GMT 2009


Ian Clatworthy wrote:
> Max Bowsher wrote:
>> I would like to propose that bzr-fastimport set the branch-nick of
>> revisions based on the git ref-name of the imported commit (subject to
>> the existing mapping that it does).
>>
>> I think this is a sufficiently sane thing to do that I would make it
>> non-optional - but, it would only apply when "feature commit-properties"
>> was *NOT* enabled.
> 
> Cool with me.

On further inspection, bzr-fastimport doesn't store whether it's seen
feature commands at all. It just uses them to error early if it doesn't
support a declared feature.

Therefore, I've opted for *always* defaulting the branch-nick from the
ref name, but allowing an explicit branch-nick property in the
fastimport stream to dominate.

If this approach is acceptable to you, I'll write up an actual merge
proposal for
https://code.launchpad.net/~maxb/bzr-fastimport/branch-mapper-stuff


>> 2) BranchMapper has a slightly odd interface, wherein it maps a list of
>> refnames to a dict of results. I would prefer to change it to expose the
>>  logic to do a single mapping operation standalone - is that OK?
> 
> Yes. Just double check the current mapping doesn't depend on how other
> things have already been mapped. If they do, you'll want to retain that
> knowledge over the cause of an import, not per commit.

It is stateless at present.


Max.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20091104/4b63e929/attachment.pgp 


More information about the bazaar mailing list