##// END OF EJS Templates
dispatch: make "_checkshellalias()" invoke "findcmd()" with "strict=True"...
dispatch: make "_checkshellalias()" invoke "findcmd()" with "strict=True" Before this patch, shell alias may be executed by abbreviated command name unexpectedly, even if abbreviated command name matches also against the command provided by extension. For example, "rebate" shell alias is executed by "hg reba", even if rebase extension (= "rebase" command) is enabled. In this case, "hg reba" should be aborted because of command name ambiguity. This patch makes "_checkshellalias()" invoke "cmdutil.findcmd()" always with "strict=True" (default value). If abbreviated command name matches against only one shell alias even after loading extensions, such shell alias will be executed via "_parse()". This patch doesn't remove "_checkshellalias()" invocation itself, because it may prevent shell alias from loading extensions uselessly.

File last commit:

r19147:5b183548 default
r20328:03d345da stable
Show More
test-bookmarks-current.t
191 lines | 4.0 KiB | text/troff | Tads3Lexer
/ tests / test-bookmarks-current.t
Martin Geisler
tests: unify test-bookmarks-current
r11862 $ hg init
no bookmarks
$ hg bookmarks
no bookmarks set
set bookmark X
$ hg bookmark X
list bookmarks
$ hg bookmark
* X -1:000000000000
list bookmarks with color
$ hg --config extensions.color= --config color.mode=ansi \
> bookmark --color=always
Mads Kiilerich
tests: use (esc) for all non-ASCII test output
r12942 \x1b[0;32m * X -1:000000000000\x1b[0m (esc)
Martin Geisler
tests: unify test-bookmarks-current
r11862
update to bookmark X
$ hg update X
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
list bookmarks
$ hg bookmarks
* X -1:000000000000
rename
$ hg bookmark -m X Z
list bookmarks
Benoit Boissinot
bookmarks: fix update of the current bookmark during rename...
r13620 $ cat .hg/bookmarks.current
Z (no-eol)
$ cat .hg/bookmarks
0000000000000000000000000000000000000000 Z
Martin Geisler
tests: unify test-bookmarks-current
r11862 $ hg bookmarks
* Z -1:000000000000
Kevin Bullock
bookmarks: allow bookmark command to take multiple arguments...
r19147 new bookmarks X and Y, first one made active
Martin Geisler
tests: unify test-bookmarks-current
r11862
Kevin Bullock
bookmarks: allow bookmark command to take multiple arguments...
r19147 $ hg bookmark Y X
Martin Geisler
tests: unify test-bookmarks-current
r11862
list bookmarks
$ hg bookmark
Kevin Bullock
bookmarks: allow bookmark command to take multiple arguments...
r19147 X -1:000000000000
Martin Geisler
tests: unify test-bookmarks-current
r11862 * Y -1:000000000000
Z -1:000000000000
Kevin Bullock
bookmarks: allow bookmark command to take multiple arguments...
r19147 $ hg bookmark -d X
Martin Geisler
tests: unify test-bookmarks-current
r11862 commit
$ echo 'b' > b
$ hg add b
$ hg commit -m'test'
list bookmarks
$ hg bookmark
* Y 0:719295282060
Z -1:000000000000
Augie Fackler
bookmarks: verify switching bookmarks works properly
r13433 Verify that switching to Z updates the current bookmark:
$ hg update Z
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg bookmark
Y 0:719295282060
* Z -1:000000000000
Switch back to Y for the remaining tests in this file:
$ hg update Y
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
Martin Geisler
tests: unify test-bookmarks-current
r11862 delete bookmarks
$ hg bookmark -d Y
$ hg bookmark -d Z
list bookmarks
$ hg bookmark
no bookmarks set
update to tip
$ hg update tip
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
Sean Farley
bookmarks: fix bug that activated a bookmark even with -r passed...
r19112 set bookmark Y using -r . but make sure that the active
bookmark is not activated
Martin Geisler
tests: unify test-bookmarks-current
r11862
$ hg bookmark -r . Y
Sean Farley
bookmarks: fix bug that activated a bookmark even with -r passed...
r19112 list bookmarks, Y should not be active
Martin Geisler
tests: unify test-bookmarks-current
r11862
$ hg bookmark
Sean Farley
bookmarks: fix bug that activated a bookmark even with -r passed...
r19112 Y 0:719295282060
now, activate Y
$ hg up -q Y
Kevin Bullock
bookmarks: allow to create/move bookmark without making it current (issue2788)...
r14188
set bookmark Z using -i
$ hg bookmark -r . -i Z
$ hg bookmarks
* Y 0:719295282060
Z 0:719295282060
Kevin Bullock
bookmarks: allow deactivating current bookmark with -i
r14189
deactivate current bookmark using -i
$ hg bookmark -i Y
$ hg bookmarks
Y 0:719295282060
Z 0:719295282060
$ hg up -q Y
Kevin Bullock
bookmarks: deactivate current bookmark if no name is given...
r17735 $ hg bookmark -i
$ hg bookmarks
Y 0:719295282060
Z 0:719295282060
$ hg bookmark -i
no active bookmark
$ hg up -q Y
Kevin Bullock
bookmarks: allow deactivating current bookmark with -i
r14189 $ hg bookmarks
* Y 0:719295282060
Z 0:719295282060
deactivate current bookmark while renaming
$ hg bookmark -i -m Y X
$ hg bookmarks
X 0:719295282060
Z 0:719295282060
Idan Kamara
update: delete bookmarks.current when explicitly updating to a rev (issue3276)
r16191
Sean Farley
bookmarks: resolve divergent bookmarks when moving active bookmark forward...
r19110 bare update moves the active bookmark forward and clear the divergent bookmarks
Kevin Bullock
bookmarks: test that bare update forwards active bookmark
r16742
$ echo a > a
$ hg ci -Am1
adding a
Sean Farley
bookmarks: resolve divergent bookmarks when moving active bookmark forward...
r19110 $ echo b >> a
$ hg ci -Am2
$ hg bookmark X@1 -r 1
$ hg bookmark X@2 -r 2
Kevin Bullock
bookmarks: test that bare update forwards active bookmark
r16742 $ hg update X
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
$ hg bookmarks
* X 0:719295282060
Sean Farley
bookmarks: resolve divergent bookmarks when moving active bookmark forward...
r19110 X@1 1:cc586d725fbe
X@2 2:49e1c4e84c58
Kevin Bullock
bookmarks: test that bare update forwards active bookmark
r16742 Z 0:719295282060
$ hg update
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
updating bookmark X
$ hg bookmarks
Sean Farley
bookmarks: resolve divergent bookmarks when moving active bookmark forward...
r19110 * X 2:49e1c4e84c58
Kevin Bullock
bookmarks: test that bare update forwards active bookmark
r16742 Z 0:719295282060
Idan Kamara
update: delete bookmarks.current when explicitly updating to a rev (issue3276)
r16191 test deleting .hg/bookmarks.current when explicitly updating
to a revision
$ echo a >> b
$ hg ci -m.
$ hg up -q X
$ test -f .hg/bookmarks.current
try to update to it again to make sure we don't
set and then unset it
$ hg up -q X
$ test -f .hg/bookmarks.current
$ hg up -q 1
$ test -f .hg/bookmarks.current
[1]
when a bookmark is active, hg up -r . is
analogus to hg book -i <active bookmark>
$ hg up -q X
$ hg up -q .
$ test -f .hg/bookmarks.current
[1]