OK, I understand now. There are two different points being made: (1) adding -e to the qnew command pops up an editor for you to enter a commit message; so does adding -e to a qrefresh command, so you can update that message later.
(2) normally qnew will abort if it finds any modifications. But qnew -f will not only allow that (-f means "force", I think), it knows exactly what edits you have done and effectively backdates the qnew operation to the points before you made those edits, so that the current state is the same as if you had done the qnew before making those edits. That last feature is one I have often missed -- as Alex says, it's a common situation, to forget to do qnew after importing and pushing a patch and then making edits. There are many times in the past when knowing this would have saved me a lot of work. Somehow, reading both the mercurial queues manual and the sage wiki version of the same, there were still things not understood (by me)! John 2009/8/27 Pat LeSmithe <[email protected]>: > > John Cremona wrote: >> To Carlo: thanks for updating the wiki on queues, which has grown >> since I last looked. I find your solution rather counterintuitive >> though: surely ones does "hg -qnew" at the beginning of some work, so >> that seems a funny time to write the commit message? But I don't >> understand what you mean by the comment "The -f retroactively saves my >> changes as a patch" either. Surely you are not editing files *before* >> the qnew? > > Sometimes, yes. I usually use > > hg qnew -e -f trac_XXXX-do_something.patch > > after I realize that my most recent changes should comprise a new patch. > For example, the changes may be more than a simple revision to the > topmost applied patch, on a different topic, highly experimental, etc. > > I substitute the appropriate ticket number, if I happen to have it. The > first commit message just summarizes what I've done so far and perhaps > also what's left to do. > > http://wiki.sagemath.org/MercurialQueues > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send an email to [email protected] To unsubscribe from this group, send an email to [email protected] For more options, visit this group at http://groups.google.com/group/sage-devel URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---
