author | Pulkit Goyal <7895pulkit@gmail.com> |
Fri, 16 Oct 2020 18:57:55 +0530 | |
changeset 46018 | c6a1fa42e325 |
parent 46017 | 705c37f22859 |
child 46019 | 49b4ab1d9f5e |
permissions | -rw-r--r-- |
45494
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
1 |
setup |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
2 |
|
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
3 |
$ cat >> $HGRCPATH <<EOF |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
4 |
> [extensions] |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
5 |
> share = |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
6 |
> [format] |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
7 |
> exp-share-safe = True |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
8 |
> EOF |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
9 |
|
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
10 |
prepare source repo |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
11 |
|
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
12 |
$ hg init source |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
13 |
$ cd source |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
14 |
$ cat .hg/requires |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
15 |
exp-sharesafe |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
16 |
$ cat .hg/store/requires |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
17 |
dotencode |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
18 |
fncache |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
19 |
generaldelta |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
20 |
revlogv1 |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
21 |
sparserevlog |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
22 |
store |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
23 |
$ hg debugrequirements |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
24 |
dotencode |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
25 |
exp-sharesafe |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
26 |
fncache |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
27 |
generaldelta |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
28 |
revlogv1 |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
29 |
sparserevlog |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
30 |
store |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
31 |
|
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
32 |
$ echo a > a |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
33 |
$ hg ci -Aqm "added a" |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
34 |
$ echo b > b |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
35 |
$ hg ci -Aqm "added b" |
45497
ac7a3da0dbb6
config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45496
diff
changeset
|
36 |
|
ac7a3da0dbb6
config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45496
diff
changeset
|
37 |
$ HGEDITOR=cat hg config --shared |
ac7a3da0dbb6
config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45496
diff
changeset
|
38 |
abort: repository is not shared; can't use --shared |
45846
8d72e29ad1e0
errors: introduce InputError and use it from commands and cmdutil
Martin von Zweigbergk <martinvonz@google.com>
parents:
45806
diff
changeset
|
39 |
[10] |
45494
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
40 |
$ cd .. |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
41 |
|
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
42 |
Create a shared repo and check the requirements are shared and read correctly |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
43 |
$ hg share source shared1 |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
44 |
updating working directory |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
45 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
46 |
$ cd shared1 |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
47 |
$ cat .hg/requires |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
48 |
exp-sharesafe |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
49 |
shared |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
50 |
|
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
51 |
$ hg debugrequirements -R ../source |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
52 |
dotencode |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
53 |
exp-sharesafe |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
54 |
fncache |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
55 |
generaldelta |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
56 |
revlogv1 |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
57 |
sparserevlog |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
58 |
store |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
59 |
|
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
60 |
$ hg debugrequirements |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
61 |
dotencode |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
62 |
exp-sharesafe |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
63 |
fncache |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
64 |
generaldelta |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
65 |
revlogv1 |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
66 |
shared |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
67 |
sparserevlog |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
68 |
store |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
69 |
|
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
70 |
$ echo c > c |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
71 |
$ hg ci -Aqm "added c" |
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
72 |
|
45496
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
73 |
Check that config of the source repository is also loaded |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
74 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
75 |
$ hg showconfig ui.curses |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
76 |
[1] |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
77 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
78 |
$ echo "[ui]" >> ../source/.hg/hgrc |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
79 |
$ echo "curses=true" >> ../source/.hg/hgrc |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
80 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
81 |
$ hg showconfig ui.curses |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
82 |
true |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
83 |
|
45804
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
84 |
Test that extensions of source repository are also loaded |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
85 |
|
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
86 |
$ hg debugextensions |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
87 |
share |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
88 |
$ hg extdiff -p echo |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
89 |
hg: unknown command 'extdiff' |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
90 |
'extdiff' is provided by the following extension: |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
91 |
|
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
92 |
extdiff command to allow external programs to compare revisions |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
93 |
|
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
94 |
(use 'hg help extensions' for information on enabling extensions) |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
95 |
[255] |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
96 |
|
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
97 |
$ echo "[extensions]" >> ../source/.hg/hgrc |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
98 |
$ echo "extdiff=" >> ../source/.hg/hgrc |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
99 |
|
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
100 |
$ hg debugextensions -R ../source |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
101 |
extdiff |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
102 |
share |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
103 |
$ hg extdiff -R ../source -p echo |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
104 |
|
45805
fd1de908f2b4
dispatch: load shared source repository config in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45804
diff
changeset
|
105 |
BROKEN: the command below will not work if config of shared source is not loaded |
fd1de908f2b4
dispatch: load shared source repository config in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45804
diff
changeset
|
106 |
on dispatch but debugextensions says that extension |
45804
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
107 |
is loaded |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
108 |
$ hg debugextensions |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
109 |
extdiff |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
110 |
share |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
111 |
|
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
112 |
$ hg extdiff -p echo |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
113 |
|
45496
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
114 |
However, local .hg/hgrc should override the config set by share source |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
115 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
116 |
$ echo "[ui]" >> .hg/hgrc |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
117 |
$ echo "curses=false" >> .hg/hgrc |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
118 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
119 |
$ hg showconfig ui.curses |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
120 |
false |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
121 |
|
45497
ac7a3da0dbb6
config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45496
diff
changeset
|
122 |
$ HGEDITOR=cat hg config --shared |
ac7a3da0dbb6
config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45496
diff
changeset
|
123 |
[ui] |
ac7a3da0dbb6
config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45496
diff
changeset
|
124 |
curses=true |
45804
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
125 |
[extensions] |
b1664f6eb650
tests: add test showing broken extension loading in case of share-safe
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45549
diff
changeset
|
126 |
extdiff= |
45497
ac7a3da0dbb6
config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45496
diff
changeset
|
127 |
|
ac7a3da0dbb6
config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45496
diff
changeset
|
128 |
$ HGEDITOR=cat hg config --local |
ac7a3da0dbb6
config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45496
diff
changeset
|
129 |
[ui] |
ac7a3da0dbb6
config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45496
diff
changeset
|
130 |
curses=false |
ac7a3da0dbb6
config: add `--shared` flag to edit config file of shared source
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45496
diff
changeset
|
131 |
|
45496
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
132 |
Testing that hooks set in source repository also runs in shared repo |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
133 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
134 |
$ cd ../source |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
135 |
$ cat <<EOF >> .hg/hgrc |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
136 |
> [extensions] |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
137 |
> hooklib= |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
138 |
> [hooks] |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
139 |
> pretxnchangegroup.reject_merge_commits = \ |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
140 |
> python:hgext.hooklib.reject_merge_commits.hook |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
141 |
> EOF |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
142 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
143 |
$ cd .. |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
144 |
$ hg clone source cloned |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
145 |
updating to branch default |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
146 |
3 files updated, 0 files merged, 0 files removed, 0 files unresolved |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
147 |
$ cd cloned |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
148 |
$ hg up 0 |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
149 |
0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
150 |
$ echo bar > bar |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
151 |
$ hg ci -Aqm "added bar" |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
152 |
$ hg merge |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
153 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
154 |
(branch merge, don't forget to commit) |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
155 |
$ hg ci -m "merge commit" |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
156 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
157 |
$ hg push ../source |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
158 |
pushing to ../source |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
159 |
searching for changes |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
160 |
adding changesets |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
161 |
adding manifests |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
162 |
adding file changes |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
163 |
error: pretxnchangegroup.reject_merge_commits hook failed: bcde3522682d rejected as merge on the same branch. Please consider rebase. |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
164 |
transaction abort! |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
165 |
rollback completed |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
166 |
abort: bcde3522682d rejected as merge on the same branch. Please consider rebase. |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
167 |
[255] |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
168 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
169 |
$ hg push ../shared1 |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
170 |
pushing to ../shared1 |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
171 |
searching for changes |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
172 |
adding changesets |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
173 |
adding manifests |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
174 |
adding file changes |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
175 |
error: pretxnchangegroup.reject_merge_commits hook failed: bcde3522682d rejected as merge on the same branch. Please consider rebase. |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
176 |
transaction abort! |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
177 |
rollback completed |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
178 |
abort: bcde3522682d rejected as merge on the same branch. Please consider rebase. |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
179 |
[255] |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
180 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
181 |
Test that if share source config is untrusted, we dont read it |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
182 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
183 |
$ cd ../shared1 |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
184 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
185 |
$ cat << EOF > $TESTTMP/untrusted.py |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
186 |
> from mercurial import scmutil, util |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
187 |
> def uisetup(ui): |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
188 |
> class untrustedui(ui.__class__): |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
189 |
> def _trusted(self, fp, f): |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
190 |
> if util.normpath(fp.name).endswith(b'source/.hg/hgrc'): |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
191 |
> return False |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
192 |
> return super(untrustedui, self)._trusted(fp, f) |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
193 |
> ui.__class__ = untrustedui |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
194 |
> EOF |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
195 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
196 |
$ hg showconfig hooks |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
197 |
hooks.pretxnchangegroup.reject_merge_commits=python:hgext.hooklib.reject_merge_commits.hook |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
198 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
199 |
$ hg showconfig hooks --config extensions.untrusted=$TESTTMP/untrusted.py |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
200 |
[1] |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
201 |
|
45498
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
202 |
Update the source repository format and check that shared repo works |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
203 |
|
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
204 |
$ cd ../source |
45549
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
205 |
|
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
206 |
Disable zstd related tests because its not present on pure version |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
207 |
#if zstd |
45498
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
208 |
$ echo "[format]" >> .hg/hgrc |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
209 |
$ echo "revlog-compression=zstd" >> .hg/hgrc |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
210 |
|
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
211 |
$ hg debugupgraderepo --run -q |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
212 |
upgrade will perform the following actions: |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
213 |
|
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
214 |
requirements |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
215 |
preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlogv1, sparserevlog, store |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
216 |
added: revlog-compression-zstd |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
217 |
|
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
218 |
$ hg log -r . |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
219 |
changeset: 1:5f6d8a4bf34a |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
220 |
user: test |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
221 |
date: Thu Jan 01 00:00:00 1970 +0000 |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
222 |
summary: added b |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
223 |
|
45549
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
224 |
#endif |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
225 |
$ echo "[format]" >> .hg/hgrc |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
226 |
$ echo "use-persistent-nodemap=True" >> .hg/hgrc |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
227 |
|
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
228 |
$ hg debugupgraderepo --run -q -R ../shared1 |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
229 |
abort: cannot upgrade repository; unsupported source requirement: shared |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
230 |
[255] |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
231 |
|
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
232 |
$ hg debugupgraderepo --run -q |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
233 |
upgrade will perform the following actions: |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
234 |
|
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
235 |
requirements |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
236 |
preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlogv1, sparserevlog, store (no-zstd !) |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
237 |
preserved: dotencode, exp-sharesafe, fncache, generaldelta, revlog-compression-zstd, revlogv1, sparserevlog, store (zstd !) |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
238 |
added: persistent-nodemap |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
239 |
|
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
240 |
$ hg log -r . |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
241 |
changeset: 1:5f6d8a4bf34a |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
242 |
user: test |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
243 |
date: Thu Jan 01 00:00:00 1970 +0000 |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
244 |
summary: added b |
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
245 |
|
68906595016c
tests: update test-share-safe to work with non-zstd versions
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45498
diff
changeset
|
246 |
|
45498
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
247 |
Shared one should work |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
248 |
$ cd ../shared1 |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
249 |
$ hg log -r . |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
250 |
changeset: 2:155349b645be |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
251 |
tag: tip |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
252 |
user: test |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
253 |
date: Thu Jan 01 00:00:00 1970 +0000 |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
254 |
summary: added c |
78f0bb37f52d
upgrade: support running upgrade if repository has share-safe requirement
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45497
diff
changeset
|
255 |
|
45806
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
256 |
|
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
257 |
Testing that nonsharedrc is loaded for source and not shared |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
258 |
|
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
259 |
$ cd ../source |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
260 |
$ touch .hg/hgrc-not-shared |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
261 |
$ echo "[ui]" >> .hg/hgrc-not-shared |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
262 |
$ echo "traceback=true" >> .hg/hgrc-not-shared |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
263 |
|
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
264 |
$ hg showconfig ui.traceback |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
265 |
true |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
266 |
|
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
267 |
$ HGEDITOR=cat hg config --non-shared |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
268 |
[ui] |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
269 |
traceback=true |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
270 |
|
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
271 |
$ cd ../shared1 |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
272 |
$ hg showconfig ui.traceback |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
273 |
[1] |
88a47cbf063c
config: add a .hg/hgrc-not-shared which won't be shared in share-safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45805
diff
changeset
|
274 |
|
45496
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
275 |
Unsharing works |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
276 |
|
45494
d252f51ab032
share: introduce config option to store requires in .hg/store
Pulkit Goyal <7895pulkit@gmail.com>
parents:
diff
changeset
|
277 |
$ hg unshare |
45496
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
278 |
|
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
279 |
Test that source config is added to the shared one after unshare, and the config |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
280 |
of current repo is still respected over the config which came from source config |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
281 |
$ cd ../cloned |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
282 |
$ hg push ../shared1 |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
283 |
pushing to ../shared1 |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
284 |
searching for changes |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
285 |
adding changesets |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
286 |
adding manifests |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
287 |
adding file changes |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
288 |
error: pretxnchangegroup.reject_merge_commits hook failed: bcde3522682d rejected as merge on the same branch. Please consider rebase. |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
289 |
transaction abort! |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
290 |
rollback completed |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
291 |
abort: bcde3522682d rejected as merge on the same branch. Please consider rebase. |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
292 |
[255] |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
293 |
$ hg showconfig ui.curses -R ../shared1 |
b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45494
diff
changeset
|
294 |
false |
46017
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
295 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
296 |
$ cd ../ |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
297 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
298 |
Test that upgrading using debugupgraderepo works |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
299 |
================================================= |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
300 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
301 |
$ hg init non-share-safe --config format.exp-share-safe=false |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
302 |
$ cd non-share-safe |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
303 |
$ hg debugrequirements |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
304 |
dotencode |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
305 |
fncache |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
306 |
generaldelta |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
307 |
revlogv1 |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
308 |
sparserevlog |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
309 |
store |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
310 |
$ echo foo > foo |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
311 |
$ hg ci -Aqm 'added foo' |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
312 |
$ echo bar > bar |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
313 |
$ hg ci -Aqm 'added bar' |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
314 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
315 |
Create a share before upgrading |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
316 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
317 |
$ cd .. |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
318 |
$ hg share non-share-safe nss-share |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
319 |
updating working directory |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
320 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
321 |
$ hg debugrequirements -R nss-share |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
322 |
dotencode |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
323 |
fncache |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
324 |
generaldelta |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
325 |
revlogv1 |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
326 |
shared |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
327 |
sparserevlog |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
328 |
store |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
329 |
$ cd non-share-safe |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
330 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
331 |
Upgrade |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
332 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
333 |
$ hg debugupgraderepo -q |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
334 |
requirements |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
335 |
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
336 |
added: exp-sharesafe |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
337 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
338 |
$ hg debugupgraderepo --run -q |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
339 |
upgrade will perform the following actions: |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
340 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
341 |
requirements |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
342 |
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
343 |
added: exp-sharesafe |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
344 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
345 |
repository upgraded to share safe mode, existing shares will still work in old non-safe mode. Re-share existing shares to use them in safe mode New shares will be created in safe mode. |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
346 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
347 |
$ hg debugrequirements |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
348 |
dotencode |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
349 |
exp-sharesafe |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
350 |
fncache |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
351 |
generaldelta |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
352 |
revlogv1 |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
353 |
sparserevlog |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
354 |
store |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
355 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
356 |
$ cat .hg/requires |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
357 |
exp-sharesafe |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
358 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
359 |
$ cat .hg/store/requires |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
360 |
dotencode |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
361 |
fncache |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
362 |
generaldelta |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
363 |
revlogv1 |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
364 |
sparserevlog |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
365 |
store |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
366 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
367 |
$ hg log -GT "{node}: {desc}\n" |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
368 |
@ f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
369 |
| |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
370 |
o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
371 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
372 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
373 |
Make sure existing shares still works |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
374 |
|
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
375 |
$ hg log -GT "{node}: {desc}\n" -R ../nss-share |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
376 |
@ f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
377 |
| |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
378 |
o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo |
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
379 |
|
46018
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
380 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
381 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
382 |
Create a safe share from upgrade one |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
383 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
384 |
$ cd .. |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
385 |
$ hg share non-share-safe ss-share |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
386 |
updating working directory |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
387 |
2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
388 |
$ cd ss-share |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
389 |
$ hg log -GT "{node}: {desc}\n" |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
390 |
@ f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
391 |
| |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
392 |
o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
393 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
394 |
$ cd ../non-share-safe |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
395 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
396 |
Test that downgrading works too |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
397 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
398 |
$ cat >> $HGRCPATH <<EOF |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
399 |
> [extensions] |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
400 |
> share = |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
401 |
> [format] |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
402 |
> exp-share-safe = False |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
403 |
> EOF |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
404 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
405 |
$ hg debugupgraderepo -q |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
406 |
requirements |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
407 |
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
408 |
removed: exp-sharesafe |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
409 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
410 |
$ hg debugupgraderepo -q --run |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
411 |
upgrade will perform the following actions: |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
412 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
413 |
requirements |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
414 |
preserved: dotencode, fncache, generaldelta, revlogv1, sparserevlog, store |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
415 |
removed: exp-sharesafe |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
416 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
417 |
repository downgraded to not use share safe mode, existing shares will not work and needs to be reshared. |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
418 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
419 |
$ hg debugrequirements |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
420 |
dotencode |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
421 |
fncache |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
422 |
generaldelta |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
423 |
revlogv1 |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
424 |
sparserevlog |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
425 |
store |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
426 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
427 |
$ cat .hg/requires |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
428 |
dotencode |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
429 |
fncache |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
430 |
generaldelta |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
431 |
revlogv1 |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
432 |
sparserevlog |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
433 |
store |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
434 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
435 |
$ test -f .hg/store/requires |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
436 |
[1] |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
437 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
438 |
$ hg log -GT "{node}: {desc}\n" |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
439 |
@ f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
440 |
| |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
441 |
o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
442 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
443 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
444 |
Make sure existing shares still works |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
445 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
446 |
$ hg log -GT "{node}: {desc}\n" -R ../nss-share |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
447 |
@ f63db81e6dde1d9c78814167f77fb1fb49283f4f: added bar |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
448 |
| |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
449 |
o f3ba8b99bb6f897c87bbc1c07b75c6ddf43a4f77: added foo |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
450 |
|
46017
705c37f22859
upgrade: add support for experimental safe share mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
45846
diff
changeset
|
451 |
$ hg unshare -R ../nss-share |
46018
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
452 |
|
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
453 |
$ hg log -GT "{node}: {desc}\n" -R ../ss-share |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
454 |
abort: share source does not support exp-sharesafe requirement |
c6a1fa42e325
upgrade: add support to downgrade share safe mode
Pulkit Goyal <7895pulkit@gmail.com>
parents:
46017
diff
changeset
|
455 |
[255] |