Mercurial > hg-stable
changeset 12360:4ae3e5dffa60 stable
context: fix filectx.undelete() (issue2388)
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 21 Sep 2010 23:14:58 +0200 |
parents | 55dc918c21d5 |
children | 2754c8273132 ab237534d800 |
files | mercurial/context.py tests/test-mq-qrename tests/test-mq-qrename.out |
diffstat | 3 files changed, 23 insertions(+), 2 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:14:58 2010 +0200 @@ -843,7 +843,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 Mon Sep 20 17:01:12 2010 -0500 +++ b/tests/test-mq-qrename Tue Sep 21 23:14:58 2010 +0200 @@ -36,4 +36,18 @@ hg qcommit -m rename cd .. - +echo '% test overlapping renames (issue2388)' +hg init c +cd c +hg qinit -c +echo a > a +hg add +hg qnew patcha +echo b > b +hg add +hg qnew patchb +hg ci --mq -m c1 +hg qrename patchb patchc +hg qrename patcha patchb +hg st --mq +cd .. \ No newline at end of file
--- a/tests/test-mq-qrename.out Mon Sep 20 17:01:12 2010 -0500 +++ b/tests/test-mq-qrename.out Tue Sep 21 23:14:58 2010 +0200 @@ -8,3 +8,10 @@ new/dir .hg/patches/new/dir % test patch being renamed before committed +% test overlapping renames (issue2388) +adding a +adding b +M patchb +M series +A patchc +R patcha