bzr-fastimport fails to incrementally re-import bzr-migration-docs from git
Bug #457287 reported by
Miklos Vajna
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar Fast Import |
New
|
Undecided
|
Unassigned |
Bug Description
Here is a script to reproduce the issue I have:
http://
Here is the output of the script on my machine:
http://
This is r253 from trunk and git version 1.6.5.
Let me know if you can't reproduce the issue and you need more info.
Thanks.
To post a comment you must log in.
Was about to file a new bug report but finally found at least the one describing the same symptoms ;)
Preamble: I was using git-bzr script (here is my clone of its Ruby version http:// github. com/yarikoptic/ git-bzr) in the beginning of last year and it was working fine... Recently I've tried to incrementally upgrade few of git-bzr'ed repositories and updates failed with similar 'KeyError'... github. com/matthew- brett/git- bzr/) where he also describes that push back into bzr didn't work -- decided to look finally WTF is happening and it immediately gave me a clue:
Decided to give a try to Python version of the same script from Matthew Brett (http://
Ugly face of the bug is revealed with a dump of marks file within bzr: .git/bzr- git/bzr- repo-bzr- map
{{{
$> cat test-git/
format=1
tmp.0
1 <email address hidden>
}}}
Whenever KeyError would be: KeyError: ':1'
More interesting that upon subsequent fastimport (after you fix marks file and add that leading colon) it would add a new mark WITH colon at the beginning:
{{{ .git/bzr- git/bzr- repo-bzr- map
$> cat test-git/
format=1
tmp.0
:1 <email address hidden>
:3 <email address hidden>
}}}
So, the problem is buried in handling marks during export, and actual history of modifications of that file is quite interesting (sorry for non-bzrish format, I know only git):
{{{ 9587be709e94fe3 188a9f65f5
commit 682805c7a9890f0
Author: Ian Clatworthy <email address hidden>
Date: Sun Aug 23 18:35:41 2009 +1000
backout git-bzr fix as it was breaking fast-export
diff --git a/bzr_exporter.py b/bzr_exporter.py (object) : to_mark[ revid] = ':' + str(mark) to_mark[ revid] = mark filecommands( parent, revid)
self. print_cmd( self._get_ commit_ command( git_ref, mark, revobj,
file_ cmds))
index 6ce20a0..a1a46d1 100755
--- a/bzr_exporter.py
+++ b/bzr_exporter.py
@@ -244,7 +244,7 @@ class BzrFastExporter
# Print the commit
git_ref = 'refs/heads/%s' % (git_branch,)
mark = ncommits + 1
- self.revid_
+ self.revid_
file_cmds = self._get_
commit b554c8ab84b0fb2 b2d624b8a73120a 4236abd49b
Author: Gonéri Le Bouder <email address hidden>
Date: Fri Aug 21 16:47:35 2009 +0200
really put ':' in the commit mark
diff --git a/bzr_exporter.py b/bzr_exporter.py (object) : to_mark[ revid] = str(mark) to_mark[ revid] = ':' + str(mark) filecommands( parent, revid)
self. print_cmd( self._get_ commit_ command( git_ref, mark, revobj,
file_ cmds))
index 2685731..6ce20a0 100755
--- a/bzr_exporter.py
+++ b/bzr_exporter.py
@@ -244,7 +244,7 @@ class BzrFastExporter
# Print the commit
git_ref = 'refs/heads/%s' % (git_branch,)
mark = ncommits + 1
- self.revid_
+ self.revid_
file_cmds = self._get_
commit 6596f1441ade671 8094708434c40a4 7a87d60e55
Author: Gonéri Le Bouder <email address hidden>
Date: Wed Aug 19 14:11:40 2009 +0200
add the missing ":" since revid_to_mark are "committish"
diff --git a/bzr_exporter.py b/bzr_exporter.py
index d7f3435..2685731 100755
--- a/bzr_exporter.py
+++ b/bzr_exporter.py
@@ -243,7 +243,8 @@ class B...