mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
mq: fix qpush changes detection of renamed files
patch.changedfile() was not considering renamed file source as changed.
This commit is contained in:
parent
d61478c8ef
commit
45494955e5
@ -1315,6 +1315,10 @@ def changedfiles(patchpath, strip=1):
|
||||
for gp in values:
|
||||
gp.path = pathstrip(gp.path, strip - 1)[1]
|
||||
changed.add(gp.path)
|
||||
if gp.oldpath:
|
||||
gp.oldpath = pathstrip(gp.oldpath, strip - 1)[1]
|
||||
if gp.op == 'RENAME':
|
||||
changed.add(gp.oldpath)
|
||||
else:
|
||||
raise util.Abort(_('unsupported parser state: %s') % state)
|
||||
return changed
|
||||
|
@ -1299,6 +1299,23 @@ related changes with force
|
||||
popping foo
|
||||
patch queue now empty
|
||||
$ hg st
|
||||
|
||||
related renamed source without change
|
||||
$ hg qpush
|
||||
applying foo
|
||||
now at: foo
|
||||
$ echo 1 > 1
|
||||
$ hg mv 1 2
|
||||
$ hg qref --git
|
||||
$ hg qpop
|
||||
popping foo
|
||||
patch queue now empty
|
||||
$ echo 3 > 1
|
||||
$ hg st
|
||||
M 1
|
||||
$ hg qpush
|
||||
abort: local changes found
|
||||
[255]
|
||||
$ cd ..
|
||||
|
||||
test qpush with --force, issue1087
|
||||
|
Loading…
Reference in New Issue
Block a user