[issue529] mq aborts when merging patch deleting files

Patrick Mézard mercurial-bugs at selenic.com
Sat Mar 31 08:02:25 CDT 2007


New submission from Patrick Mézard <pmezard at gmail.com>:

MQ with normal patch utility (well, GnuWin32 patch) aborts when trying to merge
patches with removed files. Maybe patch format does not really support file
deletion. If true, MQ should issue a warning when creating such a patch (and
should do it as well with binary contents).

The following script was run under windows XP SP2, python 2.5 and a slightly
hacked Mercurial build (base version is 6af3df7822ed) : 
"""
> hg init test
> cd test
> echo a > a
> echo b > b
> hg ci -Am test
adding a
adding b

> del a
> hg rm a
> hg qnew -f rm_a
> hg qpop
Patch queue now empty

> echo c >> b
> hg st
M b

> hg ci -m test2
> hg log
changeset:   1:3d96dfdb2e65
tag:         tip
user:        Patrick Mezard <foo at bar.com>
date:        Sat Mar 31 14:20:31 2007 +0200
summary:     test2

changeset:   0:342767b6dc3c
user:        Patrick Mezard <foo at bar.com>
date:        Sat Mar 31 14:19:31 2007 +0200
summary:     test


> hg up -C 0
1 files updated, 0 files merged, 0 files removed, 0 files unresolved

> hg qpush
applying rm_a
Now at: rm_a

> hg qsave -c -e
copy C:\dev\mercurial\tests\test-mq-merge\test\.hg\patches to
C:\dev\mercurial\tests\test-mq-merge\test\.hg\patches.1

> hg up -C 3d96dfdb2e65
2 files updated, 0 files merged, 0 files removed, 0 files unresolved

> hg qpush -m
merging with queue at:
C:\dev\mercurial\tests\test-mq-merge\test\.hg\patches.1applying rm_a
abort: The system cannot find the file specified:
C:\dev\mercurial\tests\test-mq-merge\test\a

> hg st
! a

> hg --version
Mercurial Distributed SCM (version d12711cd45ae)
"""

----------
messages: 2947
nosy: pmezard
priority: bug
status: unread
title: mq aborts when merging patch deleting files
topic: mq

____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue529>
____________________________________________________



More information about the Mercurial-devel mailing list