Bug 1662 - hg qfold folds pending modifications (edit)
:
:
Status: RESOLVED FIXED
:
:
:
Assigned To:
Bugzilla (edit) (take)

(edit)
:
Depends on: (edit)
Blocks: (edit)
  Show dependency treegraph
 
Reported: 2009-05-14 20:06 EDT by Derek Yang
Modified: 2012-05-13 05:03 EDT (History)
3 users (show)

(add)



Attachments
(33 bytes, application/octet-stream)
2009-05-16 17:49 EDT, David Frey
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Derek Yang 2009-05-14 20:06:11 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
Comment 1 David Frey 2009-05-16 17:49:54 EDT
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.
Comment 2 Patrick Mézard 2009-05-17 12:01:43 EDT
In crew-stable: http://hg.intevation.org/mercurial/crew-stable/rev/73d80d5bf478
Comment 3 Bugzilla 2012-05-12 08:59:51 EDT

--- 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)