All of lore.kernel.org
 help / color / mirror / Atom feed
* bzr to git syncing
@ 2009-06-29 19:12 David Reitter
  2009-08-28 16:02 ` Alex Bennee
  0 siblings, 1 reply; 6+ messages in thread
From: David Reitter @ 2009-06-29 19:12 UTC (permalink / raw)
  To: git

Does anyone have experience syncing a Bzr repository to git?
I would ideally want two-way syncing, but even the bzr->git route  
would be a start.

We're starting with a Git repo that was converted from CVS and it  
being kept up to date.  The CVS repo will be converted to Bzr sooner  
or later, and at that point we'd need to sync from that one.  We would  
need to keep the revision IDs coherent, i.e. not re-convert.

I have looked at the git-bzr scripts that go the fast-im/export route;  
this fails unfortunately (bzr side I think).    Also, I'm not sure if  
that would preserve revids.

It strikes me that patches / merge bundles would be cleaner way to do  
this.

(If you care: The background of this is that Emacs is switching to  
Bzr, but my downstream project, Aquamacs, and a bunch of Emacs devs  
want to use git themselves, so I'm trying to find someone who can do  
this.)

Thanks in advance for your suggestions.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bzr to git syncing
  2009-06-29 19:12 bzr to git syncing David Reitter
@ 2009-08-28 16:02 ` Alex Bennee
  2009-08-28 16:19   ` Sverre Rabbelier
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Bennee @ 2009-08-28 16:02 UTC (permalink / raw)
  To: git, David Reitter

[-- Attachment #1: Type: text/plain, Size: 807 bytes --]

2009/6/29 David Reitter <david.reitter@gmail.com>:
> Does anyone have experience syncing a Bzr repository to git?
> I would ideally want two-way syncing, but even the bzr->git route would be a
> start.

I've a sneaking suspicion a breakage has been introduced to either the
git-bzr script or
the bzr fast-import module. I say this as I have successfully pulled
from a bzr repo into
git before but having need to do it today and I get a crash in fast-import.

A few quick questions:

* What versions of git/bzr are you using (me: git 1.6.4, bzr 1.17)?
* Which git-bzr script are you using (me:
http://github.com/mcepl/git-bzr/tree/master)?

I've attached the fast-import crash I'm seeing. Are you seeing the
same sort of failure?


--
Alex, homepage: http://www.bennee.com/~alex/
http://www.half-llama.co.uk

[-- Attachment #2: fast_import_crash_21774 --]
[-- Type: application/octet-stream, Size: 1094 bytes --]

fast-import crash report:
    fast-import process: 21774
    parent process     : 21773
    at Fri Aug 28 16:54:14 2009

fatal: Corrupt mode: M 040000 - content

Most Recent Commands Before Crash
---------------------------------
  commit refs/heads/bzr/upstream
  mark :1
  committer Alexander Sack <asac@jwsdot.com> 1181743954 +0200
  data 39
  M 644 inline build.sh
  data 3963
  M 644 inline chrome.manifest
  data 192
  M 644 inline config_build.sh
  data 170
* M 040000 - content

Active Branch LRU
-----------------
    active_branches = 1 cur, 5 max

  pos  clock name
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1)      0 refs/heads/bzr/upstream

Inactive Branches
-----------------
refs/heads/bzr/upstream:
  status      : active loaded dirty
  tip commit  : 0000000000000000000000000000000000000000
  old tree    : 0000000000000000000000000000000000000000
  cur tree    : 0000000000000000000000000000000000000000
  commit clock: 0
  last pack   : 


Marks
-----
  exported to /export/src/debs/cbnlfox.git/.git/bzr-git/upstream-git-map

-------------------
END OF CRASH REPORT

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bzr to git syncing
  2009-08-28 16:02 ` Alex Bennee
@ 2009-08-28 16:19   ` Sverre Rabbelier
  2009-08-28 17:47     ` Alex Bennee
  0 siblings, 1 reply; 6+ messages in thread
From: Sverre Rabbelier @ 2009-08-28 16:19 UTC (permalink / raw)
  To: Alex Bennee; +Cc: git, David Reitter

Heya,

On Fri, Aug 28, 2009 at 09:02, Alex Bennee<kernel-hacker@bennee.com> wrote:
> I've attached the fast-import crash I'm seeing. Are you seeing the
> same sort of failure?

The program you used to generate the stream (I assume git-bzr?) is
generating an invalid mode, git understands '100644', '100755',
'120000', and '160000'; the mode in the stream, '040000', is not
something we understand.

-- 
Cheers,

Sverre Rabbelier

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bzr to git syncing
  2009-08-28 16:19   ` Sverre Rabbelier
@ 2009-08-28 17:47     ` Alex Bennee
  2009-08-28 17:49       ` Sverre Rabbelier
  0 siblings, 1 reply; 6+ messages in thread
From: Alex Bennee @ 2009-08-28 17:47 UTC (permalink / raw)
  To: Sverre Rabbelier; +Cc: git, David Reitter

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

2009/8/28 Sverre Rabbelier <srabbelier@gmail.com>:
> Heya,
>
> On Fri, Aug 28, 2009 at 09:02, Alex Bennee<kernel-hacker@bennee.com> wrote:
>> I've attached the fast-import crash I'm seeing. Are you seeing the
>> same sort of failure?
>
> The program you used to generate the stream (I assume git-bzr?) is
> generating an invalid mode, git understands '100644', '100755',
> '120000', and '160000'; the mode in the stream, '040000', is not
> something we understand.

Yeah, it seems in bzr land it mean new directory which we don't care
about. The following patch makes it work. Apologies for failure to
inline but Gmail would just corrupt it if I tried.

I also had to patch the ref check code to accept bzr style branch
names but I suspect that patch should be kept out of the repo.


-- 
Alex, homepage: http://www.bennee.com/~alex/
http://www.half-llama.co.uk

[-- Attachment #2: 0001-Handle-new-directory-commands-from-a-bzr-fast-export.patch --]
[-- Type: application/x-httpd-php, Size: 1071 bytes --]

[-- Attachment #3: 0002-Allow-in-a-branch-name.patch --]
[-- Type: application/x-httpd-php, Size: 1086 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bzr to git syncing
  2009-08-28 17:47     ` Alex Bennee
@ 2009-08-28 17:49       ` Sverre Rabbelier
  2009-08-31  7:49         ` [Vcs-fast-import-devs] " Ian Clatworthy
  0 siblings, 1 reply; 6+ messages in thread
From: Sverre Rabbelier @ 2009-08-28 17:49 UTC (permalink / raw)
  To: Alex Bennee; +Cc: git, David Reitter, vcs-fast-import-devs

Heya,

[+vcs-fast-import-devs]

On Fri, Aug 28, 2009 at 10:47, Alex Bennee<kernel-hacker@bennee.com> wrote:
> 2009/8/28 Sverre Rabbelier <srabbelier@gmail.com>:
>> On Fri, Aug 28, 2009 at 09:02, Alex Bennee<kernel-hacker@bennee.com> wrote:
>>> I've attached the fast-import crash I'm seeing. Are you seeing the
>>> same sort of failure?
>>
>> The program you used to generate the stream (I assume git-bzr?) is
>> generating an invalid mode, git understands '100644', '100755',
>> '120000', and '160000'; the mode in the stream, '040000', is not
>> something we understand.
>
> Yeah, it seems in bzr land it mean new directory which we don't care
> about. The following patch makes it work. Apologies for failure to
> inline but Gmail would just corrupt it if I tried.
>
> I also had to patch the ref check code to accept bzr style branch
> names but I suspect that patch should be kept out of the repo.

This seems like a fine case for the new 'feature' command on bzr's export side.

-- 
Cheers,

Sverre Rabbelier

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Vcs-fast-import-devs] bzr to git syncing
  2009-08-28 17:49       ` Sverre Rabbelier
@ 2009-08-31  7:49         ` Ian Clatworthy
  0 siblings, 0 replies; 6+ messages in thread
From: Ian Clatworthy @ 2009-08-31  7:49 UTC (permalink / raw)
  To: Alex Bennee; +Cc: Sverre Rabbelier, David Reitter, vcs-fast-import-devs, git

Sverre Rabbelier wrote:
> Heya,
> 
> [+vcs-fast-import-devs]
> 
> On Fri, Aug 28, 2009 at 10:47, Alex Bennee<kernel-hacker@bennee.com> wrote:
>> 2009/8/28 Sverre Rabbelier <srabbelier@gmail.com>:
>>> On Fri, Aug 28, 2009 at 09:02, Alex Bennee<kernel-hacker@bennee.com> wrote:
>>>> I've attached the fast-import crash I'm seeing. Are you seeing the
>>>> same sort of failure?
>>> The program you used to generate the stream (I assume git-bzr?) is
>>> generating an invalid mode, git understands '100644', '100755',
>>> '120000', and '160000'; the mode in the stream, '040000', is not
>>> something we understand.
>> Yeah, it seems in bzr land it mean new directory which we don't care
>> about.

> This seems like a fine case for the new 'feature' command on bzr's export side.

Hmm - I only added that 040000 stuff late last week and it *should* only
be output if you explicitly ask for extended metadata from bzr
fast-export via the --no-plain option? If that's not the case, please
raise a bug here: https://bugs.launchpad.net/bzr-fastimport.

Ian C.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-08-31  8:05 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-29 19:12 bzr to git syncing David Reitter
2009-08-28 16:02 ` Alex Bennee
2009-08-28 16:19   ` Sverre Rabbelier
2009-08-28 17:47     ` Alex Bennee
2009-08-28 17:49       ` Sverre Rabbelier
2009-08-31  7:49         ` [Vcs-fast-import-devs] " Ian Clatworthy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.