tests/test-share.t
author Gregory Szorc <gregory.szorc@gmail.com>
Sat, 19 Feb 2022 18:42:12 -0700
changeset 48938 4561ec90d3c1
parent 48679 68b7faeb6ef3
child 51553 2e8a88e5809f
permissions -rw-r--r--
automation: delete code related to Python 2.7 support The building of Inno and WiX installers took a python_version argument that allowed us to specify "2" or "3" for the major Python version. Since we no longer support Python 2, we can delete this argument and everything feeding into it. Differential Revision: https://phab.mercurial-scm.org/D12264
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
45494
d252f51ab032 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45322
diff changeset
     1
#testcases safe normal
d252f51ab032 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45322
diff changeset
     2
d252f51ab032 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45322
diff changeset
     3
#if safe
d252f51ab032 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45322
diff changeset
     4
  $ echo "[format]"         >> $HGRCPATH
46334
6e81446bf1d9 share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46314
diff changeset
     5
  $ echo "use-share-safe = True" >> $HGRCPATH
45494
d252f51ab032 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45322
diff changeset
     6
#endif
d252f51ab032 share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 45322
diff changeset
     7
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
     8
  $ echo "[extensions]"      >> $HGRCPATH
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
     9
  $ echo "share = "          >> $HGRCPATH
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    10
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    11
prepare repo1
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
    12
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    13
  $ hg init repo1
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    14
  $ cd repo1
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    15
  $ echo a > a
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    16
  $ hg commit -A -m'init'
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    17
  adding a
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    18
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    19
share it
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
    20
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    21
  $ cd ..
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    22
  $ hg share repo1 repo2
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    23
  updating working directory
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    24
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    25
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    26
share shouldn't have a store dir
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    27
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    28
  $ cd repo2
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    29
  $ test -d .hg/store
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    30
  [1]
42436
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 42340
diff changeset
    31
  $ hg root -Tjson | sed 's|\\\\|\\|g'
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 42340
diff changeset
    32
  [
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 42340
diff changeset
    33
   {
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 42340
diff changeset
    34
    "hgpath": "$TESTTMP/repo2/.hg",
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 42340
diff changeset
    35
    "reporoot": "$TESTTMP/repo2",
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 42340
diff changeset
    36
    "storepath": "$TESTTMP/repo1/.hg/store"
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 42340
diff changeset
    37
   }
69883775b27d root: add template variables pointing to repository directories
Yuya Nishihara <yuya@tcha.org>
parents: 42340
diff changeset
    38
  ]
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
    39
40442
bd0874977a5e checkexec: create destination directory if necessary
Boris Feld <boris.feld@octobus.net>
parents: 39853
diff changeset
    40
share shouldn't have a full cache dir, original repo should
33539
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
    41
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
    42
  $ hg branches
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
    43
  default                        0:d3873e73d99e
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
    44
  $ hg tags
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
    45
  tip                                0:d3873e73d99e
40821
47e3f554df35 check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net>
parents: 40443
diff changeset
    46
  $ test -d .hg/cache
47e3f554df35 check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net>
parents: 40443
diff changeset
    47
  [1]
47e3f554df35 check-exec: write file in 'wcache' instead of 'cache'
Boris Feld <boris.feld@octobus.net>
parents: 40443
diff changeset
    48
  $ ls -1 .hg/wcache || true
40443
25b7c4cb5de1 tests: stabilize the recent checkexec changes on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 40442
diff changeset
    49
  checkisexec (execbit !)
48290
91f07430db8c dirstate: use a single closure for get_flags
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47951
diff changeset
    50
  checklink (symlink no-rust !)
91f07430db8c dirstate: use a single closure for get_flags
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 47951
diff changeset
    51
  checklink-target (symlink no-rust !)
41970
e4ac7e63c213 manifestcache: use `wcache` directory for manifest cache
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 41896
diff changeset
    52
  manifestfulltextcache (reporevlogstore !)
33539
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
    53
  $ ls -1 ../repo1/.hg/cache
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
    54
  branch2-served
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
    55
  rbc-names-v1
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
    56
  rbc-revs-v1
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
    57
  tags2-visible
460733327640 share: share 'cachevfs' with the source clone (issue5108)
Boris Feld <boris.feld@octobus.net>
parents: 33212
diff changeset
    58
46124
5b9bb4e9a3bf share: properly copy cache files when cloning from a share
Joerg Sonnenberger <joerg@bec.de>
parents: 45921
diff changeset
    59
Cloning a shared repo should pick up the full cache dir on the other hand.
5b9bb4e9a3bf share: properly copy cache files when cloning from a share
Joerg Sonnenberger <joerg@bec.de>
parents: 45921
diff changeset
    60
5b9bb4e9a3bf share: properly copy cache files when cloning from a share
Joerg Sonnenberger <joerg@bec.de>
parents: 45921
diff changeset
    61
  $ hg clone . ../repo2-clone
5b9bb4e9a3bf share: properly copy cache files when cloning from a share
Joerg Sonnenberger <joerg@bec.de>
parents: 45921
diff changeset
    62
  updating to branch default
5b9bb4e9a3bf share: properly copy cache files when cloning from a share
Joerg Sonnenberger <joerg@bec.de>
parents: 45921
diff changeset
    63
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5b9bb4e9a3bf share: properly copy cache files when cloning from a share
Joerg Sonnenberger <joerg@bec.de>
parents: 45921
diff changeset
    64
  $ ls -1 ../repo2-clone/.hg/cache
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46124
diff changeset
    65
  branch2-base
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46124
diff changeset
    66
  branch2-immutable
46124
5b9bb4e9a3bf share: properly copy cache files when cloning from a share
Joerg Sonnenberger <joerg@bec.de>
parents: 45921
diff changeset
    67
  branch2-served
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46124
diff changeset
    68
  branch2-served.hidden
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46124
diff changeset
    69
  branch2-visible
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46124
diff changeset
    70
  branch2-visible-hidden
46124
5b9bb4e9a3bf share: properly copy cache files when cloning from a share
Joerg Sonnenberger <joerg@bec.de>
parents: 45921
diff changeset
    71
  rbc-names-v1
5b9bb4e9a3bf share: properly copy cache files when cloning from a share
Joerg Sonnenberger <joerg@bec.de>
parents: 45921
diff changeset
    72
  rbc-revs-v1
46314
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46124
diff changeset
    73
  tags2
95a615dd77bf clone: make sure we warm the cache after a clone
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 46124
diff changeset
    74
  tags2-served
46124
5b9bb4e9a3bf share: properly copy cache files when cloning from a share
Joerg Sonnenberger <joerg@bec.de>
parents: 45921
diff changeset
    75
  tags2-visible
5b9bb4e9a3bf share: properly copy cache files when cloning from a share
Joerg Sonnenberger <joerg@bec.de>
parents: 45921
diff changeset
    76
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    77
Some sed versions appends newline, some don't, and some just fails
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    78
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    79
  $ cat .hg/sharedpath; echo
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34004
diff changeset
    80
  $TESTTMP/repo1/.hg
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    81
15101
a21ccf4412d5 share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents: 15080
diff changeset
    82
trailing newline on .hg/sharedpath is ok
a21ccf4412d5 share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents: 15080
diff changeset
    83
  $ hg tip -q
a21ccf4412d5 share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents: 15080
diff changeset
    84
  0:d3873e73d99e
a21ccf4412d5 share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents: 15080
diff changeset
    85
  $ echo '' >> .hg/sharedpath
a21ccf4412d5 share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents: 15080
diff changeset
    86
  $ cat .hg/sharedpath
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34004
diff changeset
    87
  $TESTTMP/repo1/.hg
15101
a21ccf4412d5 share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents: 15080
diff changeset
    88
  $ hg tip -q
a21ccf4412d5 share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents: 15080
diff changeset
    89
  0:d3873e73d99e
a21ccf4412d5 share: allow trailing newline on .hg/sharedpath.
Greg Ward <greg@gerg.ca>
parents: 15080
diff changeset
    90
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    91
commit in shared clone
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    92
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    93
  $ echo a >> a
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    94
  $ hg commit -m'change in shared clone'
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    95
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    96
check original
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
    97
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    98
  $ cd ../repo1
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
    99
  $ hg log
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   100
  changeset:   1:8af4dc49db9e
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   101
  tag:         tip
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   102
  user:        test
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   103
  date:        Thu Jan 01 00:00:00 1970 +0000
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   104
  summary:     change in shared clone
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   105
  
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   106
  changeset:   0:d3873e73d99e
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   107
  user:        test
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   108
  date:        Thu Jan 01 00:00:00 1970 +0000
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   109
  summary:     init
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   110
  
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   111
  $ hg update
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   112
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   113
  $ cat a             # should be two lines of "a"
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   114
  a
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   115
  a
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
   116
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   117
commit in original
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   118
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   119
  $ echo b > b
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   120
  $ hg commit -A -m'another file'
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   121
  adding b
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   122
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   123
check in shared clone
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
   124
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   125
  $ cd ../repo2
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   126
  $ hg log
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   127
  changeset:   2:c2e0ac586386
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   128
  tag:         tip
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   129
  user:        test
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   130
  date:        Thu Jan 01 00:00:00 1970 +0000
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   131
  summary:     another file
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   132
  
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   133
  changeset:   1:8af4dc49db9e
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   134
  user:        test
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   135
  date:        Thu Jan 01 00:00:00 1970 +0000
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   136
  summary:     change in shared clone
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   137
  
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   138
  changeset:   0:d3873e73d99e
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   139
  user:        test
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   140
  date:        Thu Jan 01 00:00:00 1970 +0000
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   141
  summary:     init
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   142
  
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   143
  $ hg update
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   144
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   145
  $ cat b             # should exist with one "b"
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   146
  b
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
   147
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   148
hg serve shared clone
9990
c1d940d31aea share: add a test script.
Greg Ward <greg-hg@gerg.ca>
parents:
diff changeset
   149
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   150
  $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   151
  $ cat hg.pid >> $DAEMON_PIDS
25472
4d2b9b304ad0 tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents: 23614
diff changeset
   152
  $ get-with-headers.py localhost:$HGPORT 'raw-file/'
12487
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   153
  200 Script output follows
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   154
  
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   155
  
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   156
  -rw-r--r-- 4 a
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   157
  -rw-r--r-- 2 b
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   158
  
9792013e2f53 tests: unify test-share
Matt Mackall <mpm@selenic.com>
parents: 10468
diff changeset
   159
  
41801
2d835c42ab41 bundle2: don't send "shared" requirement when cloning from a share
mitchell plamann <mplamann@janestreet.com>
parents: 41800
diff changeset
   160
Cloning a shared repo via bundle2 results in a non-shared clone
41800
a62ad1be1671 tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents: 40833
diff changeset
   161
a62ad1be1671 tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents: 40833
diff changeset
   162
  $ cd ..
47951
9c4204b7f3e4 tests: rely on dummyssh being the default
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 47043
diff changeset
   163
  $ hg clone -q --stream ssh://user@dummy/`pwd`/repo2 cloned-via-bundle2
48503
5e6542143d40 test: use `hg debugrequires` instead of `cat` in some tests
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48290
diff changeset
   164
  $ hg -R cloned-via-bundle2 debugrequires | grep "shared"
41801
2d835c42ab41 bundle2: don't send "shared" requirement when cloning from a share
mitchell plamann <mplamann@janestreet.com>
parents: 41800
diff changeset
   165
  [1]
41800
a62ad1be1671 tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents: 40833
diff changeset
   166
  $ hg id --cwd cloned-via-bundle2 -r tip
41801
2d835c42ab41 bundle2: don't send "shared" requirement when cloning from a share
mitchell plamann <mplamann@janestreet.com>
parents: 41800
diff changeset
   167
  c2e0ac586386 tip
41800
a62ad1be1671 tests: demonstrate failure when cloning from a share via bundle2
mitchell plamann <mplamann@janestreet.com>
parents: 40833
diff changeset
   168
  $ cd repo2
15080
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   169
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   170
test unshare command
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   171
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   172
  $ hg unshare
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   173
  $ test -d .hg/store
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   174
  $ test -f .hg/sharedpath
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   175
  [1]
48679
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48505
diff changeset
   176
  $ hg debugrequires | grep shared
31221
ecbd378d9a7e share: fix typo to drop 'shared' requirement on unshare
Yuya Nishihara <yuya@tcha.org>
parents: 31148
diff changeset
   177
  [1]
15080
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   178
  $ hg unshare
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   179
  abort: this is not a shared repo
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   180
  [255]
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   181
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   182
check that a change does not propagate
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   183
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   184
  $ echo b >> b
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   185
  $ hg commit -m'change in unshared'
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   186
  $ cd ../repo1
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   187
  $ hg id -r tip
574dc5d74f9b test: test unshare command
Simon Heimberg <simohe@besonet.ch>
parents: 12640
diff changeset
   188
  c2e0ac586386 tip
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15447
diff changeset
   189
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15447
diff changeset
   190
  $ cd ..
17539
bc7377160fa7 tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17017
diff changeset
   191
23548
141baca16059 share: implement shared bookmark functionality
Ryan McElroy <rmcelroy@fb.com>
parents: 22046
diff changeset
   192
31892
9e67ce5c4fd0 largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents: 31770
diff changeset
   193
non largefiles repos won't enable largefiles
9e67ce5c4fd0 largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents: 31770
diff changeset
   194
42340
81ece800576a tests: separate out bookmarks tests from test-share.t
Martin von Zweigbergk <martinvonz@google.com>
parents: 41970
diff changeset
   195
  $ hg share --config extensions.largefiles= repo2 sharedrepo
33212
fe0667cc521e tests: add fsmonitor specific output lines at enabling largefiles
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 31892
diff changeset
   196
  The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
fe0667cc521e tests: add fsmonitor specific output lines at enabling largefiles
FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
parents: 31892
diff changeset
   197
  The fsmonitor extension is incompatible with the largefiles extension and has been disabled. (fsmonitor !)
31892
9e67ce5c4fd0 largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents: 31770
diff changeset
   198
  updating working directory
9e67ce5c4fd0 largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents: 31770
diff changeset
   199
  2 files updated, 0 files merged, 0 files removed, 0 files unresolved
9e67ce5c4fd0 largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents: 31770
diff changeset
   200
  $ [ -f sharedrepo/.hg/hgrc ]
9e67ce5c4fd0 largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents: 31770
diff changeset
   201
  [1]
9e67ce5c4fd0 largefiles: set the extension as enabled locally after a share requiring it
Matt Harbison <matt_harbison@yahoo.com>
parents: 31770
diff changeset
   202
31148
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   203
test shared clones using relative paths work
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   204
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   205
  $ mkdir thisdir
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   206
  $ hg init thisdir/orig
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   207
  $ hg share -U thisdir/orig thisdir/abs
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   208
  $ hg share -U --relative thisdir/abs thisdir/rel
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   209
  $ cat thisdir/rel/.hg/sharedpath
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34004
diff changeset
   210
  ../../orig/.hg (no-eol)
48679
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48505
diff changeset
   211
  $ hg debugrequires -R thisdir/abs/ | grep shared
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48505
diff changeset
   212
  shared
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48505
diff changeset
   213
  $ hg debugrequires -R thisdir/rel/ | grep shared
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48505
diff changeset
   214
  relshared
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48505
diff changeset
   215
  shared
31148
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   216
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   217
test that relative shared paths aren't relative to $PWD
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   218
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   219
  $ cd thisdir
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   220
  $ hg -R rel root
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34004
diff changeset
   221
  $TESTTMP/thisdir/rel
31148
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   222
  $ cd ..
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   223
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   224
now test that relative paths really are relative, survive across
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   225
renames and changes of PWD
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   226
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   227
  $ hg -R thisdir/abs root
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34004
diff changeset
   228
  $TESTTMP/thisdir/abs
31148
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   229
  $ hg -R thisdir/rel root
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34004
diff changeset
   230
  $TESTTMP/thisdir/rel
31148
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   231
  $ mv thisdir thatdir
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   232
  $ hg -R thatdir/abs root
45921
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45494
diff changeset
   233
  abort: .hg/sharedpath points to nonexistent directory $TESTTMP/thisdir/orig/.hg
31148
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   234
  [255]
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   235
  $ hg -R thatdir/rel root
35400
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 34004
diff changeset
   236
  $TESTTMP/thatdir/rel
31222
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   237
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   238
test unshare relshared repo
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   239
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   240
  $ cd thatdir/rel
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   241
  $ hg unshare
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   242
  $ test -d .hg/store
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   243
  $ test -f .hg/sharedpath
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   244
  [1]
48679
68b7faeb6ef3 tests: use debugrequires instead of grepping the file directly
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48505
diff changeset
   245
  $ hg debugrequires | grep shared
31222
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   246
  [1]
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   247
  $ hg unshare
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   248
  abort: this is not a shared repo
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   249
  [255]
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   250
  $ cd ../..
344121b30f32 share: drop 'relshared' requirement as well
Yuya Nishihara <yuya@tcha.org>
parents: 31221
diff changeset
   251
31148
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   252
  $ rm -r thatdir
23080c03a604 share: add --relative flag to store a relative path to the source
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 31072
diff changeset
   253
39712
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   254
Demonstrate buggy behavior around requirements validation
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   255
See comment in localrepo.py:makelocalrepository() for more.
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   256
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   257
  $ hg init sharenewrequires
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   258
  $ hg share sharenewrequires shareoldrequires
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   259
  updating working directory
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   260
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   261
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   262
  $ cat >> sharenewrequires/.hg/requires << EOF
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   263
  > missing-requirement
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   264
  > EOF
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   265
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   266
We cannot open the repo with the unknown requirement
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   267
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   268
  $ hg -R sharenewrequires status
45921
95c4cca641f6 errors: remove trailing "!" from some error messages for consistency
Martin von Zweigbergk <martinvonz@google.com>
parents: 45494
diff changeset
   269
  abort: repository requires features unknown to this Mercurial: missing-requirement
39712
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   270
  (see https://mercurial-scm.org/wiki/MissingRequirement for more information)
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   271
  [255]
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   272
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   273
BUG: we don't get the same error when opening the shared repo pointing to it
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   274
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   275
  $ hg -R shareoldrequires status
9de1a1c83cd7 localrepo: document and test bug around opening shared repos
Gregory Szorc <gregory.szorc@gmail.com>
parents: 39350
diff changeset
   276
17539
bc7377160fa7 tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17017
diff changeset
   277
Explicitly kill daemons to let the test exit on Windows
bc7377160fa7 tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17017
diff changeset
   278
25474
8c14f87bd0ae tests: drop DAEMON_PIDS from killdaemons calls
Matt Mackall <mpm@selenic.com>
parents: 25472
diff changeset
   279
  $ killdaemons.py
17539
bc7377160fa7 tests: enable more server tests on Windows
Patrick Mezard <patrick@mezard.eu>
parents: 17017
diff changeset
   280
45322
dc283bc7e033 localrepo: abort creating a shared repo if the source does not have store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 42436
diff changeset
   281
Test sharing a repository which was created with store requirement disable
dc283bc7e033 localrepo: abort creating a shared repo if the source does not have store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 42436
diff changeset
   282
dc283bc7e033 localrepo: abort creating a shared repo if the source does not have store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 42436
diff changeset
   283
  $ hg init nostore --config format.usestore=false
46334
6e81446bf1d9 share: move share safe functionality out of experimental
Pulkit Goyal <7895pulkit@gmail.com>
parents: 46314
diff changeset
   284
  ignoring enabled 'format.use-share-safe' config because it is incompatible with disabled 'format.usestore' config (safe !)
45322
dc283bc7e033 localrepo: abort creating a shared repo if the source does not have store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 42436
diff changeset
   285
  $ hg share nostore sharednostore
dc283bc7e033 localrepo: abort creating a shared repo if the source does not have store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 42436
diff changeset
   286
  abort: cannot create shared repository as source was created with 'format.usestore' config disabled
dc283bc7e033 localrepo: abort creating a shared repo if the source does not have store
Pulkit Goyal <7895pulkit@gmail.com>
parents: 42436
diff changeset
   287
  [255]
48505
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   288
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   289
Check that (safe) share can control wc-specific format variant at creation time
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   290
-------------------------------------------------------------------------------
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   291
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   292
#if no-rust
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   293
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   294
  $ cat << EOF >> $HGRCPATH
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   295
  > [storage]
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   296
  > dirstate-v2.slow-path = allow
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   297
  > EOF
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   298
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   299
#endif
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   300
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   301
  $ hg init repo-safe-d1 --config format.use-share-safe=yes --config format.exp-rc-dirstate-v2=no
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   302
  $ hg debugformat -R repo-safe-d1 | grep dirstate-v2
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   303
  dirstate-v2:         no
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   304
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   305
  $ hg share repo-safe-d1 share-safe-d2 --config format.use-share-safe=yes --config format.exp-rc-dirstate-v2=yes
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   306
  updating working directory
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   307
  0 files updated, 0 files merged, 0 files removed, 0 files unresolved
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   308
  $ hg debugformat  -R share-safe-d2 | grep dirstate-v2
bf2738e03e96 share: make it possible to control the working copy format variant
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 48503
diff changeset
   309
  dirstate-v2:        yes