changeset 19988:8dc6f855f43d

merge with stable
author Matt Mackall <mpm@selenic.com>
date Wed, 06 Nov 2013 16:36:07 -0600
parents aa80446aacc3 (current diff) ba6486076429 (diff)
children c38c3fdc8b93
files
diffstat 5 files changed, 30 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/rebase.py	Wed Nov 06 12:53:39 2013 -0500
+++ b/hgext/rebase.py	Wed Nov 06 16:36:07 2013 -0600
@@ -346,6 +346,9 @@
                 commitmsg = ui.edit(commitmsg, repo.ui.username())
             newrev = concludenode(repo, rev, p1, external, commitmsg=commitmsg,
                                   extrafn=extrafn, editor=editor)
+            for oldrev in state.iterkeys():
+                if state[oldrev] > nullmerge:
+                    state[oldrev] = newrev
 
         if 'qtip' in repo.tags():
             updatemq(repo, state, skipped, **opts)
--- a/mercurial/merge.py	Wed Nov 06 12:53:39 2013 -0500
+++ b/mercurial/merge.py	Wed Nov 06 16:36:07 2013 -0600
@@ -384,7 +384,7 @@
     return actions
 
 def actionkey(a):
-    return a[1] == "r" and -1 or 0, a
+    return a[1] in "rf" and -1 or 0, a
 
 def getremove(repo, mctx, overwrite, args):
     """apply usually-non-interactive updates to the working directory
--- a/tests/test-add.t	Wed Nov 06 12:53:39 2013 -0500
+++ b/tests/test-add.t	Wed Nov 06 16:36:07 2013 -0600
@@ -136,5 +136,23 @@
   M a
   A c
   ? a.orig
+  $ hg up -C
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
+forget and get should have the right order: added but missing dir should be
+forgotten before file with same name is added
+
+  $ echo file d > d
+  $ hg add d
+  $ hg ci -md
+  $ hg rm d
+  $ mkdir d
+  $ echo a > d/a
+  $ hg add d/a
+  $ rm -r d
+  $ hg up -C
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  $ cat d
+  file d
 
   $ cd ..
--- a/tests/test-rebase-collapse.t	Wed Nov 06 12:53:39 2013 -0500
+++ b/tests/test-rebase-collapse.t	Wed Nov 06 16:36:07 2013 -0600
@@ -57,11 +57,11 @@
   saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglogp
-  o  5:secret 'Collapsed revision
+  @  5:secret 'Collapsed revision
   |  * B
   |  * C
   |  * D'
-  @  4:draft 'H'
+  o  4:draft 'H'
   |
   | o  3:draft 'G'
   |/|
@@ -737,12 +737,13 @@
   $ touch b
   $ hg commit -Am b
   adding b
+  $ hg book foo
   $ hg rebase -d 0 -r "1::2" --collapse -m collapsed
   saved backup bundle to $TESTTMP/collapseaddremove/.hg/strip-backup/*-backup.hg (glob)
-  $ hg tglog
-  o  1: 'collapsed'
+  $ hg log -G --template "{rev}: '{desc}' {bookmarks}"
+  @  1: 'collapsed' foo
   |
-  @  0: 'base'
+  o  0: 'base'
   
   $ hg manifest --rev tip
   b
--- a/tests/test-rebase-detach.t	Wed Nov 06 12:53:39 2013 -0500
+++ b/tests/test-rebase-detach.t	Wed Nov 06 16:36:07 2013 -0600
@@ -329,11 +329,11 @@
   saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  o  8: 'Collapsed revision
+  @  8: 'Collapsed revision
   |  * I
   |  * Merge
   |  * J'
-  @  7: 'H'
+  o  7: 'H'
   |
   | o  6: 'G'
   |/|