tests/test-bookmarks-current.t
author Angel Ezquerra <angel.ezquerra@gmail.com>
Fri, 08 Feb 2013 18:05:32 +0100
changeset 18627 4e949b8e0930
parent 17735 605fe310691f
child 19110 741d94aa92e4
permissions -rw-r--r--
hgweb: add websub template filter The purpose of this new filter is to make it possible to partially replace the functionality of the interhg extension. The idea is to be able to define regular expression based substitutions on a new "websub" config section. hgweb will then be able to apply these substitutions wherever the "websub" filter is used on a template. This first revision just adds the code necessary to load the websub expressions and adds the websub filter, but it does not add any calls to the websub filter itself on any of the templates. That will be done on the following revisions.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
     1
  $ hg init
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
     2
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
     3
no bookmarks
7551
cab1cf26ca58 bookmarks: tests for track.current option
David Soria Parra <dsp@php.net>
parents:
diff changeset
     4
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
     5
  $ hg bookmarks
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
     6
  no bookmarks set
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
     7
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
     8
set bookmark X
7551
cab1cf26ca58 bookmarks: tests for track.current option
David Soria Parra <dsp@php.net>
parents:
diff changeset
     9
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    10
  $ hg bookmark X
7551
cab1cf26ca58 bookmarks: tests for track.current option
David Soria Parra <dsp@php.net>
parents:
diff changeset
    11
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    12
list bookmarks
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    13
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    14
  $ hg bookmark
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    15
   * X                         -1:000000000000
7551
cab1cf26ca58 bookmarks: tests for track.current option
David Soria Parra <dsp@php.net>
parents:
diff changeset
    16
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    17
list bookmarks with color
7816
f420eafe59cd bookmarks: Set current bookmark if we create a new one on the tip
David Soria Parra <dsp@php.net>
parents: 7551
diff changeset
    18
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    19
  $ hg --config extensions.color= --config color.mode=ansi \
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    20
  >     bookmark --color=always
12942
05fffd665170 tests: use (esc) for all non-ASCII test output
Mads Kiilerich <mads@kiilerich.com>
parents: 11862
diff changeset
    21
  \x1b[0;32m * X                         -1:000000000000\x1b[0m (esc)
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    22
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    23
update to bookmark X
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    24
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    25
  $ hg update X
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    26
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
10826
717c35d55fb3 color: colorize based on output labels instead of parsing output
Brodie Rao <brodie@bitheap.org>
parents: 7817
diff changeset
    27
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    28
list bookmarks
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    29
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    30
  $ hg bookmarks
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    31
   * X                         -1:000000000000
7551
cab1cf26ca58 bookmarks: tests for track.current option
David Soria Parra <dsp@php.net>
parents:
diff changeset
    32
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    33
rename
7551
cab1cf26ca58 bookmarks: tests for track.current option
David Soria Parra <dsp@php.net>
parents:
diff changeset
    34
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    35
  $ hg bookmark -m X Z
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    36
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    37
list bookmarks
7551
cab1cf26ca58 bookmarks: tests for track.current option
David Soria Parra <dsp@php.net>
parents:
diff changeset
    38
13620
8ee4b00ddfd8 bookmarks: fix update of the current bookmark during rename
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 13469
diff changeset
    39
  $ cat .hg/bookmarks.current
8ee4b00ddfd8 bookmarks: fix update of the current bookmark during rename
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 13469
diff changeset
    40
  Z (no-eol)
8ee4b00ddfd8 bookmarks: fix update of the current bookmark during rename
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 13469
diff changeset
    41
  $ cat .hg/bookmarks
8ee4b00ddfd8 bookmarks: fix update of the current bookmark during rename
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 13469
diff changeset
    42
  0000000000000000000000000000000000000000 Z
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    43
  $ hg bookmarks
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    44
   * Z                         -1:000000000000
7551
cab1cf26ca58 bookmarks: tests for track.current option
David Soria Parra <dsp@php.net>
parents:
diff changeset
    45
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    46
new bookmark Y
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    47
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    48
  $ hg bookmark Y
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    49
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    50
list bookmarks
7551
cab1cf26ca58 bookmarks: tests for track.current option
David Soria Parra <dsp@php.net>
parents:
diff changeset
    51
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    52
  $ hg bookmark
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    53
   * Y                         -1:000000000000
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    54
     Z                         -1:000000000000
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    55
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    56
commit
7551
cab1cf26ca58 bookmarks: tests for track.current option
David Soria Parra <dsp@php.net>
parents:
diff changeset
    57
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    58
  $ echo 'b' > b
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    59
  $ hg add b
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    60
  $ hg commit -m'test'
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    61
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    62
list bookmarks
7551
cab1cf26ca58 bookmarks: tests for track.current option
David Soria Parra <dsp@php.net>
parents:
diff changeset
    63
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    64
  $ hg bookmark
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    65
   * Y                         0:719295282060
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    66
     Z                         -1:000000000000
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    67
13433
0b1bbc46516e bookmarks: verify switching bookmarks works properly
Augie Fackler <durin42@gmail.com>
parents: 13416
diff changeset
    68
Verify that switching to Z updates the current bookmark:
0b1bbc46516e bookmarks: verify switching bookmarks works properly
Augie Fackler <durin42@gmail.com>
parents: 13416
diff changeset
    69
  $ hg update Z
0b1bbc46516e bookmarks: verify switching bookmarks works properly
Augie Fackler <durin42@gmail.com>
parents: 13416
diff changeset
    70
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
0b1bbc46516e bookmarks: verify switching bookmarks works properly
Augie Fackler <durin42@gmail.com>
parents: 13416
diff changeset
    71
  $ hg bookmark
0b1bbc46516e bookmarks: verify switching bookmarks works properly
Augie Fackler <durin42@gmail.com>
parents: 13416
diff changeset
    72
     Y                         0:719295282060
0b1bbc46516e bookmarks: verify switching bookmarks works properly
Augie Fackler <durin42@gmail.com>
parents: 13416
diff changeset
    73
   * Z                         -1:000000000000
0b1bbc46516e bookmarks: verify switching bookmarks works properly
Augie Fackler <durin42@gmail.com>
parents: 13416
diff changeset
    74
0b1bbc46516e bookmarks: verify switching bookmarks works properly
Augie Fackler <durin42@gmail.com>
parents: 13416
diff changeset
    75
Switch back to Y for the remaining tests in this file:
0b1bbc46516e bookmarks: verify switching bookmarks works properly
Augie Fackler <durin42@gmail.com>
parents: 13416
diff changeset
    76
  $ hg update Y
0b1bbc46516e bookmarks: verify switching bookmarks works properly
Augie Fackler <durin42@gmail.com>
parents: 13416
diff changeset
    77
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0b1bbc46516e bookmarks: verify switching bookmarks works properly
Augie Fackler <durin42@gmail.com>
parents: 13416
diff changeset
    78
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    79
delete bookmarks
7817
cb516e788238 bookmarks: fixes bug where a deleted bookmark may still be treated as current when track.current option is set
Alex Unden <alu@zpuppet.org>
parents: 7816
diff changeset
    80
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    81
  $ hg bookmark -d Y
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    82
  $ hg bookmark -d Z
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    83
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    84
list bookmarks
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    85
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    86
  $ hg bookmark
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    87
  no bookmarks set
7817
cb516e788238 bookmarks: fixes bug where a deleted bookmark may still be treated as current when track.current option is set
Alex Unden <alu@zpuppet.org>
parents: 7816
diff changeset
    88
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    89
update to tip
7817
cb516e788238 bookmarks: fixes bug where a deleted bookmark may still be treated as current when track.current option is set
Alex Unden <alu@zpuppet.org>
parents: 7816
diff changeset
    90
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    91
  $ hg update tip
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    92
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    93
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    94
set bookmark Y using -r .
7817
cb516e788238 bookmarks: fixes bug where a deleted bookmark may still be treated as current when track.current option is set
Alex Unden <alu@zpuppet.org>
parents: 7816
diff changeset
    95
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    96
  $ hg bookmark -r . Y
11561
e5aaaef91a27 bookmarks: ensure current bookmark is updated when specified with -r .
Brodie Rao <brodie@bitheap.org>
parents: 11141
diff changeset
    97
11862
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    98
list bookmarks
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
    99
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
   100
  $ hg bookmark
cad06c8d2073 tests: unify test-bookmarks-current
Martin Geisler <mg@lazybytes.net>
parents: 11561
diff changeset
   101
   * Y                         0:719295282060
14188
9029b1a38c30 bookmarks: allow to create/move bookmark without making it current (issue2788)
Kevin Bullock <kbullock@ringworld.org>
parents: 13620
diff changeset
   102
9029b1a38c30 bookmarks: allow to create/move bookmark without making it current (issue2788)
Kevin Bullock <kbullock@ringworld.org>
parents: 13620
diff changeset
   103
set bookmark Z using -i
9029b1a38c30 bookmarks: allow to create/move bookmark without making it current (issue2788)
Kevin Bullock <kbullock@ringworld.org>
parents: 13620
diff changeset
   104
9029b1a38c30 bookmarks: allow to create/move bookmark without making it current (issue2788)
Kevin Bullock <kbullock@ringworld.org>
parents: 13620
diff changeset
   105
  $ hg bookmark -r . -i Z
9029b1a38c30 bookmarks: allow to create/move bookmark without making it current (issue2788)
Kevin Bullock <kbullock@ringworld.org>
parents: 13620
diff changeset
   106
  $ hg bookmarks
9029b1a38c30 bookmarks: allow to create/move bookmark without making it current (issue2788)
Kevin Bullock <kbullock@ringworld.org>
parents: 13620
diff changeset
   107
   * Y                         0:719295282060
9029b1a38c30 bookmarks: allow to create/move bookmark without making it current (issue2788)
Kevin Bullock <kbullock@ringworld.org>
parents: 13620
diff changeset
   108
     Z                         0:719295282060
14189
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   109
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   110
deactivate current bookmark using -i
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   111
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   112
  $ hg bookmark -i Y
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   113
  $ hg bookmarks
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   114
     Y                         0:719295282060
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   115
     Z                         0:719295282060
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   116
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   117
  $ hg up -q Y
17735
605fe310691f bookmarks: deactivate current bookmark if no name is given
Kevin Bullock <kbullock@ringworld.org>
parents: 16742
diff changeset
   118
  $ hg bookmark -i
605fe310691f bookmarks: deactivate current bookmark if no name is given
Kevin Bullock <kbullock@ringworld.org>
parents: 16742
diff changeset
   119
  $ hg bookmarks
605fe310691f bookmarks: deactivate current bookmark if no name is given
Kevin Bullock <kbullock@ringworld.org>
parents: 16742
diff changeset
   120
     Y                         0:719295282060
605fe310691f bookmarks: deactivate current bookmark if no name is given
Kevin Bullock <kbullock@ringworld.org>
parents: 16742
diff changeset
   121
     Z                         0:719295282060
605fe310691f bookmarks: deactivate current bookmark if no name is given
Kevin Bullock <kbullock@ringworld.org>
parents: 16742
diff changeset
   122
  $ hg bookmark -i
605fe310691f bookmarks: deactivate current bookmark if no name is given
Kevin Bullock <kbullock@ringworld.org>
parents: 16742
diff changeset
   123
  no active bookmark
605fe310691f bookmarks: deactivate current bookmark if no name is given
Kevin Bullock <kbullock@ringworld.org>
parents: 16742
diff changeset
   124
  $ hg up -q Y
14189
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   125
  $ hg bookmarks
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   126
   * Y                         0:719295282060
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   127
     Z                         0:719295282060
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   128
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   129
deactivate current bookmark while renaming
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   130
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   131
  $ hg bookmark -i -m Y X
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   132
  $ hg bookmarks
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   133
     X                         0:719295282060
328422b0380d bookmarks: allow deactivating current bookmark with -i
Kevin Bullock <kbullock@ringworld.org>
parents: 14188
diff changeset
   134
     Z                         0:719295282060
16191
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   135
16742
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   136
bare update moves the active bookmark forward
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   137
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   138
  $ echo a > a
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   139
  $ hg ci -Am1
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   140
  adding a
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   141
  $ hg update X
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   142
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   143
  $ hg bookmarks
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   144
   * X                         0:719295282060
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   145
     Z                         0:719295282060
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   146
  $ hg update
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   147
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   148
  updating bookmark X
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   149
  $ hg bookmarks
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   150
   * X                         1:cc586d725fbe
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   151
     Z                         0:719295282060
973671fc0804 bookmarks: test that bare update forwards active bookmark
Kevin Bullock <kbullock@ringworld.org>
parents: 16191
diff changeset
   152
16191
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   153
test deleting .hg/bookmarks.current when explicitly updating
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   154
to a revision
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   155
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   156
  $ echo a >> b
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   157
  $ hg ci -m.
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   158
  $ hg up -q X
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   159
  $ test -f .hg/bookmarks.current
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   160
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   161
try to update to it again to make sure we don't
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   162
set and then unset it
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   163
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   164
  $ hg up -q X
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   165
  $ test -f .hg/bookmarks.current
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   166
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   167
  $ hg up -q 1
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   168
  $ test -f .hg/bookmarks.current
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   169
  [1]
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   170
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   171
when a bookmark is active, hg up -r . is
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   172
analogus to hg book -i <active bookmark>
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   173
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   174
  $ hg up -q X
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   175
  $ hg up -q .
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   176
  $ test -f .hg/bookmarks.current
7c75924a6926 update: delete bookmarks.current when explicitly updating to a rev (issue3276)
Idan Kamara <idankk86@gmail.com>
parents: 14189
diff changeset
   177
  [1]