tests/test-pull-update.t
author liscju <piotr.listkiewicz@gmail.com>
Mon, 14 Mar 2016 20:20:22 +0100
changeset 28560 bfbd3f02b442
parent 28274 5d9578d9ad1a
child 30332 318a24b52eeb
permissions -rw-r--r--
largefiles: replace invocation of os.path module by vfs in lfutil.py Replaces invocations os.path functions to methods in vfs. Unfortunately (in my view) this makes code less readable, because instead of using clear variable names with path it needs to replace them with vfs(..). I need guidance how to make such transition look more readable. For example in this patch there is example with few places with wvfs.join(standindir), standindir before this patch was absolute path, in this it is changed to relative because it is used also in expression wvfs.join(standindir, pat).
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
     1
  $ hg init t
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
     2
  $ cd t
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
     3
  $ echo 1 > foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
     4
  $ hg ci -Am m
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
     5
  adding foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
     6
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
     7
  $ cd ..
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
     8
  $ hg clone t tt
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
     9
  updating to branch default
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    10
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    11
  $ cd tt
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    12
  $ echo 1.1 > foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    13
  $ hg ci -Am m
5080
73fdc8bd3ed8 Update on pull -u when heads were closed (fixes issue666).
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    14
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    15
  $ cd ../t
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    16
  $ echo 1.2 > foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    17
  $ hg ci -Am m
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    18
28065
6b1fc09c699a update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26968
diff changeset
    19
Should not update to the other topological branch:
5080
73fdc8bd3ed8 Update on pull -u when heads were closed (fixes issue666).
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    20
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    21
  $ hg pull -u ../tt
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    22
  pulling from ../tt
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    23
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    24
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    25
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    26
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    27
  added 1 changesets with 1 changes to 1 files (+1 heads)
28065
6b1fc09c699a update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26968
diff changeset
    28
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
6b1fc09c699a update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26968
diff changeset
    29
  1 other heads for branch "default"
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    30
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    31
  $ cd ../tt
5080
73fdc8bd3ed8 Update on pull -u when heads were closed (fixes issue666).
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    32
28065
6b1fc09c699a update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26968
diff changeset
    33
Should not update to the other branch:
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    34
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    35
  $ hg pull -u ../t
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    36
  pulling from ../t
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    37
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    38
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    39
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    40
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    41
  added 1 changesets with 1 changes to 1 files (+1 heads)
28065
6b1fc09c699a update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26968
diff changeset
    42
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
6b1fc09c699a update: change default destination to tipmost descendant (issue4673) (BC)
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26968
diff changeset
    43
  1 other heads for branch "default"
5080
73fdc8bd3ed8 Update on pull -u when heads were closed (fixes issue666).
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    44
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    45
  $ HGMERGE=true hg merge
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    46
  merging foo
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    47
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    48
  (branch merge, don't forget to commit)
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    49
  $ hg ci -mm
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    50
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    51
  $ cd ../t
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    52
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    53
Should work:
5080
73fdc8bd3ed8 Update on pull -u when heads were closed (fixes issue666).
Thomas Arendsen Hein <thomas@intevation.de>
parents:
diff changeset
    54
12279
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    55
  $ hg pull -u ../tt
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    56
  pulling from ../tt
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    57
  searching for changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    58
  adding changesets
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    59
  adding manifests
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    60
  adding file changes
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    61
  added 1 changesets with 1 changes to 1 files (-1 heads)
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    62
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28e2e3804f2e combine tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 5080
diff changeset
    63
28273
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    64
Similarity between "hg update" and "hg pull -u" in handling bookmark
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    65
====================================================================
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    66
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    67
Test that updating activates the bookmark, which matches with the
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    68
explicit destination of the update.
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    69
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    70
  $ echo 4 >> foo
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    71
  $ hg commit -m "#4"
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    72
  $ hg bookmark active-after-pull
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    73
  $ cd ../tt
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    74
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    75
(1) activating by --rev BOOKMARK
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    76
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    77
  $ hg bookmark -f active-before-pull
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    78
  $ hg bookmarks
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    79
   * active-before-pull        3:483b76ad4309
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    80
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    81
  $ hg pull -u -r active-after-pull
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    82
  pulling from $TESTTMP/t (glob)
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    83
  searching for changes
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    84
  adding changesets
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    85
  adding manifests
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    86
  adding file changes
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    87
  added 1 changesets with 1 changes to 1 files
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    88
  adding remote bookmark active-after-pull
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    89
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    90
  (activating bookmark active-after-pull)
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    91
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    92
  $ hg parents -q
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    93
  4:f815b3da6163
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    94
  $ hg bookmarks
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    95
   * active-after-pull         4:f815b3da6163
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    96
     active-before-pull        3:483b76ad4309
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    97
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    98
(discard pulled changes)
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
    99
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   100
  $ hg update -q 483b76ad4309
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   101
  $ hg rollback -q
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   102
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   103
(2) activating by URL#BOOKMARK
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   104
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   105
  $ hg bookmark -f active-before-pull
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   106
  $ hg bookmarks
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   107
   * active-before-pull        3:483b76ad4309
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   108
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   109
  $ hg pull -u $TESTTMP/t#active-after-pull
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   110
  pulling from $TESTTMP/t (glob)
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   111
  searching for changes
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   112
  adding changesets
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   113
  adding manifests
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   114
  adding file changes
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   115
  added 1 changesets with 1 changes to 1 files
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   116
  adding remote bookmark active-after-pull
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   117
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   118
  (activating bookmark active-after-pull)
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   119
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   120
  $ hg parents -q
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   121
  4:f815b3da6163
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   122
  $ hg bookmarks
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   123
   * active-after-pull         4:f815b3da6163
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   124
     active-before-pull        3:483b76ad4309
9ac8955d8c45 pull: activate a bookmark matching with the destination of the update (BC)
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28065
diff changeset
   125
28274
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   126
(discard pulled changes)
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   127
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   128
  $ hg update -q 483b76ad4309
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   129
  $ hg rollback -q
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   130
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   131
Test that updating deactivates current active bookmark, if the
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   132
destination of the update is explicitly specified, and it doesn't
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   133
match with the name of any exsiting bookmarks.
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   134
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   135
  $ cd ../t
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   136
  $ hg bookmark -d active-after-pull
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   137
  $ hg branch bar -q
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   138
  $ hg commit -m "#5 (bar #1)"
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   139
  $ cd ../tt
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   140
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   141
(1) deactivating by --rev REV
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   142
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   143
  $ hg bookmark -f active-before-pull
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   144
  $ hg bookmarks
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   145
   * active-before-pull        3:483b76ad4309
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   146
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   147
  $ hg pull -u -r b5e4babfaaa7
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   148
  pulling from $TESTTMP/t (glob)
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   149
  searching for changes
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   150
  adding changesets
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   151
  adding manifests
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   152
  adding file changes
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   153
  added 2 changesets with 1 changes to 1 files
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   154
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   155
  (leaving bookmark active-before-pull)
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   156
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   157
  $ hg parents -q
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   158
  5:b5e4babfaaa7
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   159
  $ hg bookmarks
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   160
     active-before-pull        3:483b76ad4309
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   161
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   162
(discard pulled changes)
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   163
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   164
  $ hg update -q 483b76ad4309
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   165
  $ hg rollback -q
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   166
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   167
(2) deactivating by --branch BRANCH
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   168
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   169
  $ hg bookmark -f active-before-pull
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   170
  $ hg bookmarks
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   171
   * active-before-pull        3:483b76ad4309
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   172
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   173
  $ hg pull -u -b bar
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   174
  pulling from $TESTTMP/t (glob)
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   175
  searching for changes
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   176
  adding changesets
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   177
  adding manifests
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   178
  adding file changes
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   179
  added 2 changesets with 1 changes to 1 files
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   180
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   181
  (leaving bookmark active-before-pull)
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   182
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   183
  $ hg parents -q
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   184
  5:b5e4babfaaa7
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   185
  $ hg bookmarks
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   186
     active-before-pull        3:483b76ad4309
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   187
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   188
(discard pulled changes)
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   189
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   190
  $ hg update -q 483b76ad4309
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   191
  $ hg rollback -q
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   192
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   193
(3) deactivating by URL#ANOTHER-BRANCH
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   194
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   195
  $ hg bookmark -f active-before-pull
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   196
  $ hg bookmarks
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   197
   * active-before-pull        3:483b76ad4309
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   198
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   199
  $ hg pull -u $TESTTMP/t#bar
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   200
  pulling from $TESTTMP/t (glob)
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   201
  searching for changes
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   202
  adding changesets
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   203
  adding manifests
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   204
  adding file changes
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   205
  added 2 changesets with 1 changes to 1 files
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   206
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   207
  (leaving bookmark active-before-pull)
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   208
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   209
  $ hg parents -q
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   210
  5:b5e4babfaaa7
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   211
  $ hg bookmarks
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   212
     active-before-pull        3:483b76ad4309
5d9578d9ad1a pull: deactivate a bookmark not matching with the destination of the update
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 28273
diff changeset
   213
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 14485
diff changeset
   214
  $ cd ..