# HG changeset patch # User Dan Villiom Podlaski Christiansen # Date 1279619707 -7200 # Node ID 685f91015ed6b4ec57d907c32f5f2764dda73a2a # Parent 2060e0ca8dd5af757383408a1303f348562ae77f replay: always fetch the entire first revision The entire revision is fetched using the just-added get_revision() wrapper. Essentially, this allows us to begin a conversion with a non-zero start revision. As an extra safety feature, this mode is *always* used for the very first revision, even if no start revision is specified. For most repositories, this shouldn't matter; the entire revision will be fetched regardless. However, there are repositories that currently `confuse' us, such as bzr-svn conversions, and where this is an improvement. diff --git a/hgsubversion/replay.py b/hgsubversion/replay.py --- a/hgsubversion/replay.py +++ b/hgsubversion/replay.py @@ -25,7 +25,13 @@ def convert_rev(ui, meta, svn, r, tbdelt editor = meta.editor editor.current.clear() editor.current.rev = r - svn.get_replay(r.revnum, editor) + + if meta.revmap.oldest <= 0: + # no prior revisions are known, so fetch the entire revision contents + svn.get_revision(r.revnum, editor) + else: + svn.get_replay(r.revnum, editor, meta.revmap.oldest) + current = editor.current current.findmissing(svn)