[issue1087] "hg qpush -f" causes changes to get committed (but not saved in .hg/patches)

Jason Orendorff mercurial-bugs at selenic.com
Tue Apr 15 11:10:26 CDT 2008


New submission from Jason Orendorff <jorendorff at mozilla.com>:

~/dev/hg$ mkdir testing
~/dev/hg$ cd testing
~/dev/hg/testing$ hg init
~/dev/hg/testing$ echo hello > hello.txt
~/dev/hg/testing$ hg add hello.txt
~/dev/hg/testing$ hg ci -m foo
~/dev/hg/testing$ hg qnew empty
~/dev/hg/testing$ hg qpop
Patch queue now empty
~/dev/hg/testing$ echo world >> hello.txt
~/dev/hg/testing$ hg qpush -f
applying empty
Now at: empty

Expected behavior is, at this point "hg diff" and "hg qdiff" should both show
the change.  Instead:

~/dev/hg/testing$ hg diff
~/dev/hg/testing$ hg qdiff
diff --git a/hello.txt b/hello.txt
--- a/hello.txt
+++ b/hello.txt
@@ -1,1 +1,2 @@
 hello
+world
~/dev/hg/testing$ cat .hg/patches/empty 
~/dev/hg/testing$ hg log -l 1 -p
changeset:   1:5563fa57f690
tag:         qtip
tag:         tip
tag:         empty
tag:         qbase
user:        jorendorff at mozilla.com
date:        Tue Apr 15 10:57:26 2008 -0500
summary:     imported patch empty

diff --git a/hello.txt b/hello.txt
--- a/hello.txt
+++ b/hello.txt
@@ -1,1 +1,2 @@
 hello
+world

Note that .hg/patches is now inconsistent with the changelog.  You can lose work
due to this bug; for example, if the next commands are:

~/dev/hg/testing$ hg qpop
Patch queue now empty
~/dev/hg/testing$ hg qpush
applying empty
Now at: empty
~/dev/hg/testing$ hg qdiff
~/dev/hg/testing$ hg diff

----------
messages: 5907
nosy: jorendorff
priority: urgent
status: unread
title: "hg qpush -f" causes changes to get committed (but not saved in .hg/patches)

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



More information about the Mercurial-devel mailing list