changeset 1484:e3484e9632cd

split: don't update before it is actually needed Before this patch, we were updating the working copy parent needlessly and before the error checking. This patch fixes the issue.
author Laurent Charignon <lcharignon@fb.com>
date Sat, 08 Aug 2015 12:45:36 -0700
parents dc1467a629ca
children 1ba64be11bf8
files hgext/evolve.py tests/test-split.t
diffstat 2 files changed, 1 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/evolve.py	Sat Aug 08 12:16:55 2015 -0700
+++ b/hgext/evolve.py	Sat Aug 08 12:45:36 2015 -0700
@@ -2583,7 +2583,6 @@
             raise util.Abort(_("you can only specify one revision to split"))
         else:
             rev = list(revs)[0]
-            commands.update(ui, repo, rev)
     else:
         rev = '.'
 
--- a/tests/test-split.t	Sat Aug 08 12:16:55 2015 -0700
+++ b/tests/test-split.t	Sat Aug 08 12:45:36 2015 -0700
@@ -172,8 +172,7 @@
   > n
   > y
   > EOF
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
-  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  2 files updated, 0 files merged, 2 files removed, 0 files unresolved
   reverting _b
   adding _c
   diff --git a/_b b/_b
@@ -259,7 +258,6 @@
   > evolutioncommands=split
   > EOF
   $ hg split -r "desc(split3)"
-  1 files updated, 0 files merged, 2 files removed, 0 files unresolved
   abort: cannot split commit: ced8fbcce3a7 not a head
   [255]