##// 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:

r24180:d8e0c591 default
r32699:f75d0aa5 default
Show More
test-addremove.t
103 lines | 1.9 KiB | text/troff | Tads3Lexer
Martin Geisler
tests: unify test-addremove
r11850 $ hg init rep
$ cd rep
$ mkdir dir
$ touch foo dir/bar
$ hg -v addremove
adding dir/bar
adding foo
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg -v commit -m "add 1"
Mads Kiilerich
localrepo: show headline notes in commitctx before showing filenames...
r23749 committing files:
Martin Geisler
tests: unify test-addremove
r11850 dir/bar
foo
Mads Kiilerich
localrepo: show headline notes in commitctx before showing filenames...
r23749 committing manifest
committing changelog
Martin Geisler
tests: remove unneeded -d flags...
r12156 committed changeset 0:6f7f953567a2
Martin Geisler
tests: unify test-addremove
r11850 $ cd dir/
Adrian Buehlmann
test-addremove: remove bits about con.xml...
r16874 $ touch ../foo_2 bar_2
Martin Geisler
tests: unify test-addremove
r11850 $ hg -v addremove
adding dir/bar_2
adding foo_2
Martin Geisler
tests: remove unneeded -d flags...
r12156 $ hg -v commit -m "add 2"
Mads Kiilerich
localrepo: show headline notes in commitctx before showing filenames...
r23749 committing files:
Martin Geisler
tests: unify test-addremove
r11850 dir/bar_2
foo_2
Mads Kiilerich
localrepo: show headline notes in commitctx before showing filenames...
r23749 committing manifest
committing changelog
Adrian Buehlmann
test-addremove: remove bits about con.xml...
r16874 committed changeset 1:e65414bf35c5
Martin von Zweigbergk
addremove: add back forgotten files (BC)...
r23259 $ cd ..
$ hg forget foo
$ hg -v addremove
adding foo
Matt Harbison
addremove: warn when addremove fails to operate on a named path...
r23534 $ hg forget foo
#if windows
Mads Kiilerich
spelling: fixes from proofreading of spell checker issues
r24180 $ hg -v addremove nonexistent
nonexistent: The system cannot find the file specified
Matt Harbison
addremove: warn when addremove fails to operate on a named path...
r23534 [1]
#else
Mads Kiilerich
spelling: fixes from proofreading of spell checker issues
r24180 $ hg -v addremove nonexistent
nonexistent: No such file or directory
Matt Harbison
addremove: warn when addremove fails to operate on a named path...
r23534 [1]
#endif
Martin von Zweigbergk
addremove: add back forgotten files (BC)...
r23259 $ cd ..
Martin Geisler
tests: unify test-addremove
r11850
Martin von Zweigbergk
addremove: print relative paths when called with -I/-X (BC)...
r23427 $ hg init subdir
$ cd subdir
$ mkdir dir
$ cd dir
$ touch a.py
$ hg addremove 'glob:*.py'
adding a.py
$ hg forget a.py
$ hg addremove -I 'glob:*.py'
adding a.py
$ hg forget a.py
$ hg addremove
adding dir/a.py
$ cd ..
Martin Geisler
tests: unify test-addremove
r11850 $ hg init sim
$ cd sim
$ echo a > a
$ echo a >> a
$ echo a >> a
$ echo c > c
$ hg commit -Ama
adding a
adding c
$ mv a b
$ rm c
$ echo d > d
$ hg addremove -n -s 50 # issue 1696
removing a
adding b
removing c
adding d
recording removal of a as rename to b (100% similar)
$ hg addremove -s 50
removing a
adding b
removing c
adding d
recording removal of a as rename to b (100% similar)
$ hg commit -mb
Martin von Zweigbergk
addremove: add back forgotten files (BC)...
r23259 $ cp b c
$ hg forget b
$ hg addremove -s 50
adding b
adding c
Matt Harbison
commit: abort if --addremove is specified, but fails...
r23535
$ rm c
#if windows
Mads Kiilerich
spelling: fixes from proofreading of spell checker issues
r24180 $ hg ci -A -m "c" nonexistent
nonexistent: The system cannot find the file specified
Matt Harbison
commit: abort if --addremove is specified, but fails...
r23535 abort: failed to mark all new/missing files as added/removed
[255]
#else
Mads Kiilerich
spelling: fixes from proofreading of spell checker issues
r24180 $ hg ci -A -m "c" nonexistent
nonexistent: No such file or directory
Matt Harbison
commit: abort if --addremove is specified, but fails...
r23535 abort: failed to mark all new/missing files as added/removed
[255]
#endif
$ hg st
! c
Mads Kiilerich
tests: cleanup of tests that got lost in their own nested directories...
r16912 $ cd ..