Bugzilla – Bug 1662
hg qfold folds pending modifications
Last modified: 2012-05-13 05:03:34 EDT
I am seeing a weird behavior in hg qfold. In summary, when I use hg qfold to fold a patch 2.patch into the current top patch 1.patch, hg folds everything from 2.patch into 1.patch (this is correct). But the issue that i am seeing is, if there are any pending modifications in my working directory, hg will also folds them into 1.patch. This is not what I expect. Some steps to reproduce this issue: hg init echo 'version 1' > file hg add hg qnew -m "version 1" -f 1.patch echo 'version 2' >> file hg qnew -m "version 2" -f 2.patch hg qpop hg qtop // 1.patch is the top applied patch echo 'version 3' >> file hg qfold 2.patch cat file // version1 // version2 // version3 What I expect to see is: cat file // version1 // version2
I think that the logical thing to do is to force the user to make a decision about what to do with their pending changes before folding in any patches. I have attached a patch that aborts the qfold if their are pending changes using the same method as qpush/qpop. I have submitted this change to the mercurial-devel mailing list as well.
In crew-stable: http://hg.intevation.org/mercurial/crew-stable/rev/73d80d5bf478
--- Bug imported by bugzilla@serpentine.com 2012-05-12 08:59 EDT --- This bug was previously known as _bug_ 1662 at http://mercurial.selenic.com/bts/issue1662 Imported an attachment (id=1192)