changeset 861:6fc7f74f0cf6

stupid: force non-incremental mode for unrelated branches creation Apparently, svn < 1.7 was already taking this path since it could not diff unrelated branches. svn >= 1.7 learnt to do that but supporting it in the regular stupid mode needs some work. Be lazy for now.
author Patrick Mezard <patrick@mezard.eu>
date Thu, 19 Apr 2012 15:08:07 +0200
parents 4cf20a687bff
children 6ef6c413d6de
files hgsubversion/stupid.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgsubversion/stupid.py
+++ b/hgsubversion/stupid.py
@@ -711,7 +711,13 @@ def convert_rev(ui, meta, svn, r, tbdelt
                 deleted_branches[b] = parentctx.node()
             continue
 
-        incremental = (meta.revmap.oldest > 0)
+        # The nullrev check might not be necessary in theory but svn <
+        # 1.7 failed to diff branch creation so the diff_branchrev()
+        # path does not support this case with svn >= 1.7. We can fix
+        # it, or we can force the existing fetch_branchrev() path. Do
+        # the latter for now.
+        incremental = (meta.revmap.oldest > 0 and
+                       parentctx.rev() != node.nullrev)
 
         if incremental:
             try: