Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Adding uncommitted change into a new patch with Mercurial queues

The process of creating patches in Mercurial is as follows:

Create patch with qnew -> Make changes -> Refresh patch

What if I have already made (uncommited) changes and I want to add them to the queue?

like image 653
Casebash Avatar asked Oct 26 '22 05:10

Casebash


1 Answers

It depends on your version, and it looks like it changed in 1.5.1.

1.5.1 or later

The command will add any uncommitted changes by default

qnew creates a new patch on top of the currently-applied patch (if any). The patch will be initialized with any outstanding changes in the working directory.

earlier than 1.5.1

You want to use qnew -f. From the docs:

-f: Create a new patch if the contents of the working directory are modified. Any outstanding modifications are added to the newly created patch, so after this command completes, the working directory will no longer be modified.

like image 150
Den Avatar answered Nov 02 '22 23:11

Den