User:DirkjanOchtman/Waldo Mercurial Issues

From MozillaWiki
Jump to: navigation, search

Dependency tools don't like last-modified time changes

  • mq should save last-modified, last-accessed, creation dates when qref, qfold, qnew -f a patch (potentially a non-exhaustive list)
  • qpop and qpush should appropriately restore these bits of metadata when they run, such that a qpop -a followed by a qpush -a results in the exact same date metadata as if nothing had happened; a qpop/qpush which isn't -a should restore to the newest of the date of the destination patch and the dates on the intervening patches (to handle a pop, an edit and a qref, and a push followed by a build -- want a change down the stack to be propagated back up), also modifying the saved dates in the patches along the way
  • motivation: suppose you have a patch to a hugely important file which triggers a full rebuild of your source tree whenever it changes; this patch is midway through the queue; popping everything changes the modification time, updating only changes times on those files that changed, and qpush again changes everything to the time of the qpush -- so even if that important file is in the exact same state it was in before the pops/update/pushes, it'll appear to dependency tools as though it had been changed; this will cause a costly (but entirely avoidable) rebuild
  • this is only a sketch; I haven't thought deeply about
    • Hmm, I think there are problems with this. Not entirely sure, though. DirkjanOchtman 01:06, 28 May 2008 (PDT)

hg qinsert

  • if I accidentally start one very small patch on top of another, sometimes I want to be able to move the small patch closer to the bottom of the stack
  • don't even need accident for this to happen -- it would happen if you receive a favorable review on a patch closer to the top of the stack before one lower on the stack receives favorable review
  • manual reordering of .hg/patches/series is possible, but if the patches conflict you get ugly patch-induced conflicts -- no pretty merge tools or anything like that
  • sketch of the commandline interface:
 hg qinsert PATCH
 
 adjusts a patch within the queue so that it is the next patch
 Moves the given patch from its current location in the queue to the
 position immediately after the current patch.  If the patch in question
 does not conflict with any patch between it and the point between the
 current and next patches, it is moved silently.  If it conflicts with
 any patch in that sequence, the merge tool is opened to resolve the
 conflict and to then proceed with reordering.
 
 -p  Make the patch the previous rather than next patch in the queue
 -s  Go to the reordered patch when finished
  • I'd prefer a qpush -m option that doesn't push all the patches between current applied and target patch, but rewrites the series file to have the target patch at current + 1. DirkjanOchtman 01:06, 28 May 2008 (PDT)

qrefresh documentation:

  • pattern syntax isn't documented; I expected it was regular expression syntax at first, but it actually appears to be shell globs
  • the syntaxes given for -I and -X are misleading:
 hg qrefresh [-I] [-X] [-e] [-m TEXT] [-l FILE] [-s] [FILE]...
  • from this and the descriptions I expect to put the patterns at the end, because they weren't shown inline here
    • Hmm, let's figure out some documentation here. DirkjanOchtman 01:06, 28 May 2008 (PDT)