git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Importing Bzr revisions

From
PBPieter de Bie <pieter@frim.nl>
Date
Mar 23, 2009, 14:18 UTC
Message-ID
<4123DB23-39C4-4651-A3B5-C7876A781365@frim.nl>
In-Reply-To
<03AC7EDA-2A9F-4626-A67B-CE9F2A88FC7D@gmail.com>
On Mar 23, 2009, at 1:27 PM, David Reitter wrote:
Show 32 quoted lines
> On Mar 23, 2009, at 4:06 AM, Junio C Hamano wrote:
>>
>>> Suppose I have a bzr branch that has been converted (somehow) to a  
>>> git
>>> branch, is it then possible to merge new revisions from the bzr  
>>> branch
>>> into the git one?
>>
>> It entirely depends on how that "somehow" goes.
>>
>> If that "somehow" procedure performs a reliably reproducible  
>> conversion
>> (i.e. not only it will produce the identical git history when you  
>> feed the
>> same bzr history to the procedure twice, but it will produce the  
>> identical
>> git history followed by new history if you feed the bzr history  
>> after new
>> commits are added to the bzr history), you should be able to re- 
>> convert
>
> I'm just experimenting with "bzr fast-export", which converts to  
> git, and it seems to take about 4 minutes for 1000 revisions on our  
> (modern) server.  That would be around 7 hours for my emacs  
> repository; I can't do that daily.
>
> I wonder if there's a way for (bzr) fast-export / (git) fast-import  
> to work incrementally, i.e. for selected or most recent revisions.
>
> Or, one could do something like  bzr diff -r $REV.. $BBRANCH |  (cd  
> $GBRANCH; patch -p0; git commit), plus preserving authors and log  
> messages.   Is this roughly what the fast-export format does anyways?

You might want to take a look at git-bzr (http://github.com/pieter/git-bzr/tree/master ) it allows incremental bidirectional interaction between git and bzr using the fast-export/import, so it might just work in your case. There are some issues with it, so you might want to check the 'network' part on github and use one of the other variants.

That said, it's a 100 line script that hasn't been used much, so good luck :)

- Pieter
Previous: David ReitterNext: David Reitter
Message 8 of 11 in “Importing Bzr revisions”
  1. David ReitterMar 23, 2009
  2. Junio C HamanoMar 23, 2009
  3. David ReitterMar 23, 2009
  4. David ReitterMar 23, 2009
  5. Shawn O. PearceMar 23, 2009
  6. Teemu LikonenMar 23, 2009
  7. David ReitterMar 26, 2009
  8. Pieter de BieMar 23, 2009
  9. David ReitterMar 23, 2009
  10. Pieter de BieMar 23, 2009
  11. David ReitterMar 23, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.