tests/test-share-bookmarks.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Thu, 19 May 2022 23:39:42 +0100
changeset 49227 2bcf5e14bb7e
parent 48876 42d2b31cee0b
child 49995 27fd12eca557
permissions -rw-r--r--
deltas: add a `debug.revlog.debug-delta` config option enable output This provide a way to enable the code introduced in the previous changeset. This will provide a large amount of output when applying a bundle with details about each delta "computation".
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
     1
#testcases vfs svfs
45483
d252f51ab032 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45300
diff changeset
     2
#testcases safe normal
d252f51ab032 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45300
diff changeset
     3
d252f51ab032 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45300
diff changeset
     4
#if safe
d252f51ab032 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45300
diff changeset
     5
  $ echo "[format]"         >> $HGRCPATH
46334
4b0192f592cf share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45681
diff changeset
     6
  $ echo "use-share-safe = True" >> $HGRCPATH
45483
d252f51ab032 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45300
diff changeset
     7
#endif
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
     8
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
     9
  $ echo "[extensions]"      >> $HGRCPATH
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    10
  $ echo "share = "          >> $HGRCPATH
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    11
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    12
#if svfs
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    13
  $ echo "[format]"                  >> $HGRCPATH
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    14
  $ echo "bookmarks-in-store = yes " >> $HGRCPATH
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    15
#endif
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    16
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    17
prepare repo1
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
    18
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    19
  $ hg init repo1
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    20
  $ cd repo1
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    21
  $ echo a > a
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    22
  $ hg commit -A -m'init'
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    23
  adding a
42313
81ece800576a tests: separate out bookmarks tests from test-share.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 41965
diff changeset
    24
  $ echo a >> a
81ece800576a tests: separate out bookmarks tests from test-share.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 41965
diff changeset
    25
  $ hg commit -m'change in shared clone'
81ece800576a tests: separate out bookmarks tests from test-share.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 41965
diff changeset
    26
  $ echo b > b
81ece800576a tests: separate out bookmarks tests from test-share.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 41965
diff changeset
    27
  $ hg commit -A -m'another file'
81ece800576a tests: separate out bookmarks tests from test-share.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 41965
diff changeset
    28
  adding b
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    29
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    30
share it
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
    31
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    32
  $ cd ..
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    33
  $ hg share repo1 repo2
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    34
  updating working directory
42313
81ece800576a tests: separate out bookmarks tests from test-share.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 41965
diff changeset
    35
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    36
23614
cd79fb4d75fd share: add option to share bookmarks
Ryan McElroy <rmcelroy@fb.com>
parents: 23548
diff changeset
    37
test sharing bookmarks
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    38
23614
cd79fb4d75fd share: add option to share bookmarks
Ryan McElroy <rmcelroy@fb.com>
parents: 23548
diff changeset
    39
  $ hg share -B repo1 repo3
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    40
  updating working directory
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    41
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    42
  $ cd repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    43
  $ hg bookmark bm1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    44
  $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    45
   * bm1                       2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    46
  $ cd ../repo2
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    47
  $ hg book bm2
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    48
  $ hg bookmarks
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    49
     bm1                       2:c2e0ac586386 (svfs !)
42314
314056e438a9 tests: fix share test to actually share the repo
Martin von Zweigbergk <martinvonz@google.com>
parents: 42313
diff changeset
    50
   * bm2                       2:c2e0ac586386
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    51
  $ cd ../repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    52
  $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    53
     bm1                       2:c2e0ac586386
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    54
     bm2                       2:c2e0ac586386 (svfs !)
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    55
  $ hg book bm3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    56
  $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    57
     bm1                       2:c2e0ac586386
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    58
     bm2                       2:c2e0ac586386 (svfs !)
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    59
   * bm3                       2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    60
  $ cd ../repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    61
  $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    62
   * bm1                       2:c2e0ac586386
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    63
     bm2                       2:c2e0ac586386 (svfs !)
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    64
     bm3                       2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
    65
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    66
check whether HG_PENDING makes pending changes only in relatd
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    67
repositories visible to an external hook.
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    68
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    69
In "hg share" case, another transaction can't run in other
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    70
repositories sharing same source repository, because starting
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    71
transaction requires locking store of source repository.
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    72
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    73
Therefore, this test scenario ignores checking visibility of
42314
314056e438a9 tests: fix share test to actually share the repo
Martin von Zweigbergk <martinvonz@google.com>
parents: 42313
diff changeset
    74
.hg/bookmarks.pending in repo2, which shares repo1 without bookmarks.
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    75
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    76
  $ cat > $TESTTMP/checkbookmarks.sh <<EOF
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    77
  > echo "@repo1"
31767
6c800688afe1 tests: quote paths in shell script hooks
Matt Harbison <matt_harbison@yahoo.com>
parents: 31766
diff changeset
    78
  > hg -R "$TESTTMP/repo1" bookmarks
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    79
  > echo "@repo2"
31767
6c800688afe1 tests: quote paths in shell script hooks
Matt Harbison <matt_harbison@yahoo.com>
parents: 31766
diff changeset
    80
  > hg -R "$TESTTMP/repo2" bookmarks
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    81
  > echo "@repo3"
31767
6c800688afe1 tests: quote paths in shell script hooks
Matt Harbison <matt_harbison@yahoo.com>
parents: 31766
diff changeset
    82
  > hg -R "$TESTTMP/repo3" bookmarks
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    83
  > exit 1 # to avoid adding new bookmark for subsequent tests
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    84
  > EOF
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    85
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    86
  $ cd ../repo1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    87
  $ hg --config hooks.pretxnclose="sh $TESTTMP/checkbookmarks.sh" -q book bmX
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    88
  @repo1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    89
     bm1                       2:c2e0ac586386
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    90
     bm2                       2:c2e0ac586386 (svfs !)
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    91
     bm3                       2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    92
   * bmX                       2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    93
  @repo2
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    94
     bm1                       2:c2e0ac586386 (svfs !)
42314
314056e438a9 tests: fix share test to actually share the repo
Martin von Zweigbergk <martinvonz@google.com>
parents: 42313
diff changeset
    95
   * bm2                       2:c2e0ac586386
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    96
     bm3                       2:c2e0ac586386 (svfs !)
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    97
  @repo3
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
    98
     bm1                       2:c2e0ac586386
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
    99
     bm2                       2:c2e0ac586386 (svfs !)
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   100
   * bm3                       2:c2e0ac586386
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
   101
     bmX                       2:c2e0ac586386 (vfs !)
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   102
  transaction abort!
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   103
  rollback completed
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   104
  abort: pretxnclose hook exited with status 1
46417
768056549737 errors: use exit code 40 for when a hook fails
Martin von Zweigbergk <martinvonz@google.com>
parents: 46334
diff changeset
   105
  [40]
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   106
  $ hg book bm1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   107
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   108
FYI, in contrast to above test, bmX is invisible in repo1 (= shared
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   109
src), because (1) HG_PENDING refers only repo3 and (2)
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   110
"bookmarks.pending" is written only into repo3.
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   111
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   112
  $ cd ../repo3
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   113
  $ hg --config hooks.pretxnclose="sh $TESTTMP/checkbookmarks.sh" -q book bmX
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   114
  @repo1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   115
   * bm1                       2:c2e0ac586386
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
   116
     bm2                       2:c2e0ac586386 (svfs !)
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   117
     bm3                       2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   118
  @repo2
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
   119
     bm1                       2:c2e0ac586386 (svfs !)
42314
314056e438a9 tests: fix share test to actually share the repo
Martin von Zweigbergk <martinvonz@google.com>
parents: 42313
diff changeset
   120
   * bm2                       2:c2e0ac586386
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
   121
     bm3                       2:c2e0ac586386 (svfs !)
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   122
  @repo3
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   123
     bm1                       2:c2e0ac586386
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
   124
     bm2                       2:c2e0ac586386 (svfs !)
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   125
     bm3                       2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   126
   * bmX                       2:c2e0ac586386
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   127
  transaction abort!
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   128
  rollback completed
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   129
  abort: pretxnclose hook exited with status 1
46417
768056549737 errors: use exit code 40 for when a hook fails
Martin von Zweigbergk <martinvonz@google.com>
parents: 46334
diff changeset
   130
  [40]
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   131
  $ hg book bm3
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   132
42325
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
   133
clean up bm2 since it's uninteresting (not shared in the vfs case and
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
   134
same as bm3 in the svfs case)
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
   135
  $ cd ../repo2
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
   136
  $ hg book -d bm2
526750cdd02d bookmarks: keep bookmarks in .hg/store if new config set
Martin von Zweigbergk <martinvonz@google.com>
parents: 42314
diff changeset
   137
31052
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   138
  $ cd ../repo1
0332b8fafd05 bookmarks: check HG_PENDING strictly
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 25474
diff changeset
   139
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   140
test that commits work
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   141
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   142
  $ echo 'shared bookmarks' > a
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   143
  $ hg commit -m 'testing shared bookmarks'
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   144
  $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   145
   * bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   146
     bm3                       2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   147
  $ cd ../repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   148
  $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   149
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   150
   * bm3                       2:c2e0ac586386
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   151
  $ echo 'more shared bookmarks' > a
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   152
  $ hg commit -m 'testing shared bookmarks'
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   153
  created new head
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   154
  $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   155
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   156
   * bm3                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   157
  $ cd ../repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   158
  $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   159
   * bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   160
     bm3                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   161
  $ cd ..
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   162
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   163
test pushing bookmarks works
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   164
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   165
  $ hg clone repo3 repo4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   166
  updating to branch default
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   167
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   168
  $ cd repo4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   169
  $ hg boo bm4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   170
  $ echo foo > b
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   171
  $ hg commit -m 'foo in b'
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   172
  $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   173
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   174
     bm3                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   175
   * bm4                       5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   176
  $ hg push -B bm4
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33986
diff changeset
   177
  pushing to $TESTTMP/repo3
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   178
  searching for changes
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   179
  adding changesets
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   180
  adding manifests
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   181
  adding file changes
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   182
  added 1 changesets with 1 changes to 1 files
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   183
  exporting bookmark bm4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   184
  $ cd ../repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   185
  $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   186
   * bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   187
     bm3                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   188
     bm4                       5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   189
  $ cd ../repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   190
  $ hg bookmarks
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   191
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   192
   * bm3                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   193
     bm4                       5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   194
  $ cd ..
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   195
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   196
test behavior when sharing a shared repo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   197
39186
e8deaa77c1b6 share: allow more than one level of directories to be created
Matt Harbison <matt_harbison@yahoo.com>
parents: 38781
diff changeset
   198
  $ hg share -B repo3 missingdir/repo5
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   199
  updating working directory
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   200
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
39186
e8deaa77c1b6 share: allow more than one level of directories to be created
Matt Harbison <matt_harbison@yahoo.com>
parents: 38781
diff changeset
   201
  $ cd missingdir/repo5
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   202
  $ hg book
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   203
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   204
     bm3                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   205
     bm4                       5:92793bfc8cad
39186
e8deaa77c1b6 share: allow more than one level of directories to be created
Matt Harbison <matt_harbison@yahoo.com>
parents: 38781
diff changeset
   206
  $ cd ../..
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   207
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   208
test what happens when an active bookmark is deleted
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   209
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   210
  $ cd repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   211
  $ hg boo -d bm3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   212
  $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   213
   * bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   214
     bm4                       5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   215
  $ cd ../repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   216
  $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   217
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   218
     bm4                       5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   219
  $ cd ..
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   220
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   221
verify that bookmarks are not written on failed transaction
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   222
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   223
  $ cat > failpullbookmarks.py << EOF
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   224
  > """A small extension that makes bookmark pulls fail, for testing"""
33986
169c97d4e722 tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33539
diff changeset
   225
  > from mercurial import (
169c97d4e722 tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33539
diff changeset
   226
  >   error,
169c97d4e722 tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33539
diff changeset
   227
  >   exchange,
169c97d4e722 tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33539
diff changeset
   228
  >   extensions,
169c97d4e722 tests: update test-share to pass our import checker
Augie Fackler <raf@durin42.com>
parents: 33539
diff changeset
   229
  > )
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   230
  > def _pullbookmarks(orig, pullop):
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   231
  >     orig(pullop)
45681
a736ab681b78 errors: stop passing non-strings to Abort's constructor
Martin von Zweigbergk <martinvonz@google.com>
parents: 45483
diff changeset
   232
  >     raise error.HookAbort(b'forced failure by extension')
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   233
  > def extsetup(ui):
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   234
  >     extensions.wrapfunction(exchange, '_pullbookmarks', _pullbookmarks)
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   235
  > EOF
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   236
  $ cd repo4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   237
  $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   238
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   239
     bm3                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   240
   * bm4                       5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   241
  $ cd ../repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   242
  $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   243
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   244
     bm4                       5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   245
  $ hg --config "extensions.failpullbookmarks=$TESTTMP/failpullbookmarks.py" pull $TESTTMP/repo4
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33986
diff changeset
   246
  pulling from $TESTTMP/repo4
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   247
  searching for changes
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   248
  no changes found
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   249
  adding remote bookmark bm3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   250
  abort: forced failure by extension
46417
768056549737 errors: use exit code 40 for when a hook fails
Martin von Zweigbergk <martinvonz@google.com>
parents: 46334
diff changeset
   251
  [40]
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   252
  $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   253
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   254
     bm4                       5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   255
  $ hg pull $TESTTMP/repo4
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33986
diff changeset
   256
  pulling from $TESTTMP/repo4
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   257
  searching for changes
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   258
  no changes found
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   259
  adding remote bookmark bm3
38250
d0abd7949ea3 phases: use "published" in the phase movement message
Boris Feld <boris.feld@octobus.net>
parents: 38249
diff changeset
   260
  1 local changesets published
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   261
  $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   262
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   263
   * bm3                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   264
     bm4                       5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   265
  $ cd ..
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   266
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   267
verify bookmark behavior after unshare
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   268
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   269
  $ cd repo3
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   270
  $ hg unshare
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   271
  $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   272
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   273
   * bm3                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   274
     bm4                       5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   275
  $ hg boo -d bm4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   276
  $ hg boo bm5
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   277
  $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   278
     bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   279
     bm3                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   280
   * bm5                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   281
  $ cd ../repo1
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   282
  $ hg boo
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   283
   * bm1                       3:b87954705719
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   284
     bm3                       4:62f4ded848e4
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   285
     bm4                       5:92793bfc8cad
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   286
  $ cd ..
45300
dc457177dbc1 localrepo: only use 'bookmarksinstore' requirement if we have 'store'
Pulkit Goyal <7895pulkit@gmail.com>
parents: 42325
diff changeset
   287
dc457177dbc1 localrepo: only use 'bookmarksinstore' requirement if we have 'store'
Pulkit Goyal <7895pulkit@gmail.com>
parents: 42325
diff changeset
   288
Test that if store is disabled, we drop the bookmarksinstore requirement
dc457177dbc1 localrepo: only use 'bookmarksinstore' requirement if we have 'store'
Pulkit Goyal <7895pulkit@gmail.com>
parents: 42325
diff changeset
   289
dc457177dbc1 localrepo: only use 'bookmarksinstore' requirement if we have 'store'
Pulkit Goyal <7895pulkit@gmail.com>
parents: 42325
diff changeset
   290
  $ hg init brokenrepo --config format.bookmarks-in-store=True --config format.usestore=false
dc457177dbc1 localrepo: only use 'bookmarksinstore' requirement if we have 'store'
Pulkit Goyal <7895pulkit@gmail.com>
parents: 42325
diff changeset
   291
  ignoring enabled 'format.bookmarks-in-store' config beacuse it is incompatible with disabled 'format.usestore' config
46334
4b0192f592cf share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45681
diff changeset
   292
  ignoring enabled 'format.use-share-safe' config because it is incompatible with disabled 'format.usestore' config (safe !)