changeset 19370:f84aa729057f stable

merge with i18n
author Matt Mackall <mpm@selenic.com>
date Sun, 30 Jun 2013 15:06:22 -0500
parents 0af993732f66 (diff) c45b324cd2b5 (current diff)
children 648d1974b3f3 009794acc6e3
files
diffstat 2 files changed, 27 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Tue Jun 25 18:45:33 2013 -0400
+++ b/mercurial/hg.py	Sun Jun 30 15:06:22 2013 -0500
@@ -472,6 +472,7 @@
 def clean(repo, node, show_stats=True):
     """forcibly switch the working directory to node, clobbering changes"""
     stats = updaterepo(repo, node, True)
+    util.unlinkpath(repo.join('graftstate'), ignoremissing=True)
     if show_stats:
         _showstats(repo, stats)
     return stats[3] > 0
--- a/tests/test-graft.t	Tue Jun 25 18:45:33 2013 -0400
+++ b/tests/test-graft.t	Sun Jun 30 15:06:22 2013 -0500
@@ -181,6 +181,32 @@
   (use "hg graft -c" to continue graft)
   [255]
 
+Abort the graft and try committing:
+
+  $ hg up -C .
+  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ echo c >> e
+  $ hg ci -mtest
+
+  $ hg strip . --config extensions.mq=
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob)
+
+Graft again:
+
+  $ hg graft 1 5 4 3 'merge()' 2
+  skipping ungraftable merge revision 6
+  skipping already grafted revision 2
+  skipping already grafted revision 1
+  skipping already grafted revision 5
+  grafting revision 4
+  merging e
+  warning: conflicts during merge.
+  merging e incomplete! (edit conflicts, then use 'hg resolve --mark')
+  abort: unresolved conflicts, can't continue
+  (use hg resolve and hg graft --continue)
+  [255]
+
 Continue without resolve should fail:
 
   $ hg graft -c