##// END OF EJS Templates
revset: lookup descendents for negative arguments to ancestor operator...
revset: lookup descendents for negative arguments to ancestor operator Negative offsets to the `~` operator now search for descendents. The search is aborted when a node has more than one child as we do not have a definition for 'nth child'. Optionally we can introduce such a notion and take the nth child ordered by rev number. The current revset language does provides a short operator for ancestor lookup but not for descendents. This gives user a simple revset to move to the previous changeset, e.g. `hg up '.~1'` but not to the 'next' changeset. With this change userse can now use `.~-1` as a shortcut to move to the next changeset. This fits better into allowing users to specify revisions via revsets and avoiding the need for special `hg next` and `hg prev` operations. The alternative to negative offsets is adding a new operator. We do not have many operators in ascii left that do not require bash escaping (',', '_', and '/' come to mind). If we decide that we should add a more convenient short operator such as ('/', e.g. './1') we can later add it and allow ascendents lookup via negative numbers.

File last commit:

r26420:2fc86d92 default
r32699:f75d0aa5 default
Show More
test-issue1089.t
26 lines | 312 B | text/troff | Tads3Lexer
Matt Mackall
urls: bulk-change BTS urls to new location
r26420 https://bz.mercurial-scm.org/1089
Adrian Buehlmann
tests: unify test-issue*
r12195
$ hg init
$ mkdir a
$ echo a > a/b
$ hg ci -Am m
adding a/b
$ hg rm a
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 removing a/b (glob)
Adrian Buehlmann
tests: unify test-issue*
r12195 $ hg ci -m m a
$ mkdir a b
$ echo a > a/b
$ hg ci -Am m
adding a/b
$ hg rm a
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 removing a/b (glob)
Adrian Buehlmann
tests: unify test-issue*
r12195 $ cd b
Relative delete:
$ hg ci -m m ../a
Mads Kiilerich
tests: add missing trailing 'cd ..'...
r16913 $ cd ..