bzr: ERROR: Bad restart - attempted to skip commit :419 but matching revision-id is unknown

Bug #206204 reported by Elliot Murphy
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Bazaar Fast Import
Triaged
Medium
Ian Clatworthy

Bug Description

I'm trying to do a periodic import of a hg repo to bzr, and have set this up in a cron job.
the initial import went fine. when some new revisions showed up in hg though, I got this error:

emurphy@jitter-shadow:~/tangent-conversion/tangent-conversion/libmemcached.bzr$ ~/.bazaar/plugins/fastimport/exporters/hg-fast-export.py --repo=../libmemcached/ | bzr fast-import -
17:24:34 Found 418 commits already loaded - skipping over these ...
master: Link new branch to parent [:418]
master: Exporting simple delta revision 419/423 with 0/2/0 added/changed/removed files
bzr: ERROR: Bad restart - attempted to skip commit :419 but matching revision-id is unknown
Traceback (most recent call last):
  File "/home/emurphy/.bazaar/plugins/fastimport/exporters/hg-fast-export.py", line 396, in <module>
    options.statusfile,authors=a,sob=options.sob,force=options.force))
  File "/home/emurphy/.bazaar/plugins/fastimport/exporters/hg-fast-export.py", line 344, in hg2git
    c=export_commit(ui,repo,rev,marks_cache,heads_cache,last,max,c,authors,sob,brmap)
  File "/home/emurphy/.bazaar/plugins/fastimport/exporters/hg-fast-export.py", line 243, in export_commit
    export_file_contents(ctx,man,changed)
  File "/home/emurphy/.bazaar/plugins/fastimport/exporters/hg-fast-export.py", line 122, in export_file_contents
    wr(d)
  File "/home/emurphy/.bazaar/plugins/fastimport/exporters/hg-fast-export.py", line 27, in wr
    print msg
IOError: [Errno 32] Broken pipe

I'm attaching .bzr.log and a tarball of both the hg and the bzr repos that I was using so that you can repro it locally.

Tags: incremental
Revision history for this message
Elliot Murphy (statik) wrote :
Revision history for this message
Elliot Murphy (statik) wrote :
Revision history for this message
Elliot Murphy (statik) wrote :

i'm not able to bring any new revisions over from the libmemcached repository due to this bug.
I forgot to mention that I am running the very latest revision of the bzr-fastimport plugin, and using hg-fast-export.py that is bundled with this plugin.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

The "restart" (a.k.a. poor man's mirroring) logic depends on the exporter producing a superset of the original data by appending new data on the end. My initial guess is that hg-fast-export isn't doing this (yet). I'll take a deeper look soon if someone else doesn't beat me to it.

Changed in bzr-fastimport:
assignee: nobody → ian-clatworthy
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Can you please retest this with the latest trunk (rev 108)?

Revision history for this message
ilia (ilia) wrote :

Hi,
I have revision 136 of fastimport and the issue still exists. Session log is attached. I've run hg-fast-export, then bzr fast-import. The former complained (but completed the export):
*** failed to import extension hgext.inotify: 'module' object has no attribute 'inotify'

The later has failed with the same message as noted above:
bzr: ERROR: Bad restart - attempted to skip commit :4134 but matching revision-id is unknown

Due to this bug I'm stuck with old branch and can't continue the development. Please-please-please, resolve it or at least suggest a workaround.

Revision history for this message
ilia (ilia) wrote :

The first message (about hgext.inotify) seems to be unrelated to the issue and already fixed in mercurial: http://hg.intevation.org/mercurial/crew/rev/b5a6fce0bc29
I've applied the fix to mercurial and tried again with the same result.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

I have a few ideas on how to fix this but they depend on me better understanding how hg-fast-export behaves. Can you please upload the first few commands from the output that hg-fast-export creates? It does seem strange that bzr-fast-import is trying to skip N commits but is complaining about not knowing N+1 in those loaded so far. It makes me think that perhaps hg-fast-export isn't including those original N commits in the stream it's creating?

Revision history for this message
ilia (ilia) wrote :

Attaching hg-fast-export.py output. The first mark is 4134.

tags: added: incremental
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.