changeset 12361:2754c8273132

Merge with stable
author Patrick Mezard <pmezard@gmail.com>
date Tue, 21 Sep 2010 23:37:47 +0200
parents dbca8f134f00 (current diff) 4ae3e5dffa60 (diff)
children 3ee44b41b042
files mercurial/context.py tests/test-hgweb.out tests/test-mq-qrename.t
diffstat 2 files changed, 22 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Mon Sep 20 17:01:12 2010 -0500
+++ b/mercurial/context.py	Tue Sep 21 23:37:47 2010 +0200
@@ -844,7 +844,7 @@
                 if self._repo.dirstate[f] != 'r':
                     self._repo.ui.warn(_("%s not removed!\n") % f)
                 else:
-                    fctx = f in pctxs[0] and pctxs[0] or pctxs[1]
+                    fctx = f in pctxs[0] and pctxs[0][f] or pctxs[1][f]
                     t = fctx.data()
                     self._repo.wwrite(f, t, fctx.flags())
                     self._repo.dirstate.normal(f)
--- a/tests/test-mq-qrename.t	Mon Sep 20 17:01:12 2010 -0500
+++ b/tests/test-mq-qrename.t	Tue Sep 21 23:37:47 2010 +0200
@@ -59,4 +59,25 @@
 
   $ cd ..
 
+Test overlapping renames (issue2388)
 
+  $ hg init c
+  $ cd c
+  $ hg qinit -c
+  $ echo a > a
+  $ hg add
+  adding a
+  $ hg qnew patcha
+  $ echo b > b
+  $ hg add
+  adding b
+  $ hg qnew patchb
+  $ hg ci --mq -m c1
+  $ hg qrename patchb patchc
+  $ hg qrename patcha patchb
+  $ hg st --mq
+  M patchb
+  M series
+  A patchc
+  R patcha
+  $ cd ..