Implementation of Indexes Extension

Sean Farley sean at mcs.anl.gov
Wed Feb 15 16:41:11 CST 2012


>
> > > hg qref -s <file to add>
> > > hg qref -s -X <file to remove>
> >
> > OK, that's got to be one of the worst named options in hg, worthy of
> > git ;) It is documented all right, but my brain just always skipped it
> > when it read "--short". Out of curiosity, why is it named "short"?
>
> The --short option has existed since mq was merged, the pre-merge repo
> seems to be lost, and we lost the original author to his little
> filesystem project years ago. So..  no one knows. Feel free to suggest a
> better name/description.


What about an --add / -a option (or replacement of --short / -s) that only
adds the files listed (regardless of the files in the current patch), i.e.

hg init test
echo 'initialA' >> A
echo 'initialB' >> B
hg ci -A -m 'initial commit'
echo 'I want this line' >> A
hg qnew monkeypatch
echo 'Keep this line one as well' >> B
echo 'But not this one' >> A
hg qref -a B
hg diff
diff --git a/A b/A
--- a/A
+++ b/A
@@ -1,2 +1,3 @@
 initialA
 I want this line
+But not this one
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20120215/e2a7d3cb/attachment.html>


More information about the Mercurial-devel mailing list