author | Martin von Zweigbergk <martinvonz@google.com> |
Tue, 05 Apr 2022 12:06:32 -0700 | |
changeset 49123 | 5d205e476057 |
parent 48800 | 94635b74b18c |
child 49226 | e4b31016e194 |
permissions | -rw-r--r-- |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
1 |
=============================== |
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
2 |
Test the "tracked hint" feature |
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
3 |
=============================== |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
4 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
5 |
The tracked hint feature provide a file that get updated when the set of tracked |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
6 |
files get updated. |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
7 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
8 |
basic setup |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
9 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
10 |
$ cat << EOF >> $HGRCPATH |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
11 |
> [format] |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
12 |
> use-dirstate-tracked-hint=yes |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
13 |
> EOF |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
14 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
15 |
$ hg init tracked-hint-test |
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
16 |
$ cd tracked-hint-test |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
17 |
$ hg debugbuilddag '.+10' -n |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
18 |
$ hg log -G -T '{rev} {desc} {files}\n' |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
19 |
o 10 r10 nf10 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
20 |
| |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
21 |
o 9 r9 nf9 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
22 |
| |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
23 |
o 8 r8 nf8 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
24 |
| |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
25 |
o 7 r7 nf7 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
26 |
| |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
27 |
o 6 r6 nf6 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
28 |
| |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
29 |
o 5 r5 nf5 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
30 |
| |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
31 |
o 4 r4 nf4 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
32 |
| |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
33 |
o 3 r3 nf3 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
34 |
| |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
35 |
o 2 r2 nf2 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
36 |
| |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
37 |
o 1 r1 nf1 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
38 |
| |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
39 |
o 0 r0 nf0 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
40 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
41 |
$ hg up tip |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
42 |
11 files updated, 0 files merged, 0 files removed, 0 files unresolved |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
43 |
$ hg files |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
44 |
nf0 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
45 |
nf1 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
46 |
nf10 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
47 |
nf2 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
48 |
nf3 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
49 |
nf4 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
50 |
nf5 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
51 |
nf6 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
52 |
nf7 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
53 |
nf8 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
54 |
nf9 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
55 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
56 |
key-file exists |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
57 |
----------- |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
58 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
59 |
The tracked hint file should exist |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
60 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
61 |
$ ls -1 .hg/dirstate* |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
62 |
.hg/dirstate |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
63 |
.hg/dirstate-tracked-hint |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
64 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
65 |
key-file stay the same if the tracked set is unchanged |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
66 |
------------------------------------------------------ |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
67 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
68 |
(copy its content for later comparison) |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
69 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
70 |
$ cp .hg/dirstate-tracked-hint ../key-bck |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
71 |
$ echo foo >> nf0 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
72 |
$ sleep 1 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
73 |
$ hg status |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
74 |
M nf0 |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
75 |
$ diff --brief .hg/dirstate-tracked-hint ../key-bck |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
76 |
$ hg revert -C nf0 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
77 |
$ sleep 1 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
78 |
$ hg status |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
79 |
$ diff --brief .hg/dirstate-tracked-hint ../key-bck |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
80 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
81 |
key-file change if the tracked set is changed manually |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
82 |
------------------------------------------------------ |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
83 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
84 |
adding a file to tracking |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
85 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
86 |
$ cp .hg/dirstate-tracked-hint ../key-bck |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
87 |
$ echo x > x |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
88 |
$ hg add x |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
89 |
$ diff --brief .hg/dirstate-tracked-hint ../key-bck |
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
90 |
Files .hg/dirstate-tracked-hint and ../key-bck differ |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
91 |
[1] |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
92 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
93 |
remove a file from tracking |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
94 |
(forget) |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
95 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
96 |
$ cp .hg/dirstate-tracked-hint ../key-bck |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
97 |
$ hg forget x |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
98 |
$ diff --brief .hg/dirstate-tracked-hint ../key-bck |
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
99 |
Files .hg/dirstate-tracked-hint and ../key-bck differ |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
100 |
[1] |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
101 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
102 |
(remove) |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
103 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
104 |
$ cp .hg/dirstate-tracked-hint ../key-bck |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
105 |
$ hg remove nf1 |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
106 |
$ diff --brief .hg/dirstate-tracked-hint ../key-bck |
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
107 |
Files .hg/dirstate-tracked-hint and ../key-bck differ |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
108 |
[1] |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
109 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
110 |
key-file changes on revert (when applicable) |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
111 |
-------------------------------------------- |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
112 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
113 |
$ cp .hg/dirstate-tracked-hint ../key-bck |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
114 |
$ hg status |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
115 |
R nf1 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
116 |
? x |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
117 |
$ hg revert --all |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
118 |
undeleting nf1 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
119 |
$ hg status |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
120 |
? x |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
121 |
$ diff --brief .hg/dirstate-tracked-hint ../key-bck |
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
122 |
Files .hg/dirstate-tracked-hint and ../key-bck differ |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
123 |
[1] |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
124 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
125 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
126 |
`hg update` does affect the key-file (when needed) |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
127 |
-------------------------------------------------- |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
128 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
129 |
update changing the tracked set |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
130 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
131 |
(removing) |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
132 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
133 |
$ cp .hg/dirstate-tracked-hint ../key-bck |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
134 |
$ hg status --rev . --rev '.#generations[-1]' |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
135 |
R nf10 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
136 |
$ hg up '.#generations[-1]' |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
137 |
0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
138 |
$ diff --brief .hg/dirstate-tracked-hint ../key-bck |
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
139 |
Files .hg/dirstate-tracked-hint and ../key-bck differ |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
140 |
[1] |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
141 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
142 |
(adding) |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
143 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
144 |
$ cp .hg/dirstate-tracked-hint ../key-bck |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
145 |
$ hg status --rev . --rev '.#generations[1]' |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
146 |
A nf10 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
147 |
$ hg up '.#generations[1]' |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
148 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
149 |
$ diff --brief .hg/dirstate-tracked-hint ../key-bck |
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
150 |
Files .hg/dirstate-tracked-hint and ../key-bck differ |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
151 |
[1] |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
152 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
153 |
update not affecting the tracked set |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
154 |
|
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
155 |
$ echo foo >> nf0 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
156 |
$ hg commit -m foo |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
157 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
158 |
$ cp .hg/dirstate-tracked-hint ../key-bck |
48698
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
159 |
$ hg status --rev . --rev '.#generations[-1]' |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
160 |
M nf0 |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
161 |
$ hg up '.#generations[-1]' |
568f63b5a30f
dirstate: introduce a "tracked-key" feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff
changeset
|
162 |
1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
163 |
$ diff --brief .hg/dirstate-tracked-hint ../key-bck |
48790
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
164 |
|
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
165 |
Test upgrade and downgrade |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
166 |
========================== |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
167 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
168 |
$ ls .hg/dirstate-tracked-hint |
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
169 |
.hg/dirstate-tracked-hint |
48790
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
170 |
$ hg debugrequires | grep 'tracked' |
48791
1af95465961a
tracked-key: update the requirement value
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48790
diff
changeset
|
171 |
dirstate-tracked-key-v1 |
48790
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
172 |
|
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
173 |
downgrade |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
174 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
175 |
$ hg debugupgraderepo --config format.use-dirstate-tracked-hint=no --run --quiet |
48790
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
176 |
upgrade will perform the following actions: |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
177 |
|
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
178 |
requirements |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
179 |
preserved: * (glob) |
48791
1af95465961a
tracked-key: update the requirement value
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48790
diff
changeset
|
180 |
removed: dirstate-tracked-key-v1 |
48790
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
181 |
|
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
182 |
no revlogs to process |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
183 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
184 |
$ ls -1 .hg/dirstate-tracked-hint |
48800
94635b74b18c
windows: generalize output for test-status-tracked-key.t
Raphaël Gomès <rgomes@octobus.net>
parents:
48793
diff
changeset
|
185 |
ls: *.hg/dirstate-tracked-hint*: $ENOENT$ (glob) |
48790
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
186 |
[2] |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
187 |
$ hg debugrequires | grep 'tracked' |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
188 |
[1] |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
189 |
|
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
190 |
upgrade |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
191 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
192 |
$ hg debugupgraderepo --config format.use-dirstate-tracked-hint=yes --run --quiet |
48790
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
193 |
upgrade will perform the following actions: |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
194 |
|
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
195 |
requirements |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
196 |
preserved: * (glob) |
48791
1af95465961a
tracked-key: update the requirement value
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48790
diff
changeset
|
197 |
added: dirstate-tracked-key-v1 |
48790
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
198 |
|
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
199 |
no revlogs to process |
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
200 |
|
48793
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
201 |
$ ls -1 .hg/dirstate-tracked-hint |
6e559391f96e
tracked-key: remove the dual write and rename to tracked-hint
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48792
diff
changeset
|
202 |
.hg/dirstate-tracked-hint |
48790
5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48774
diff
changeset
|
203 |
$ hg debugrequires | grep 'tracked' |
48791
1af95465961a
tracked-key: update the requirement value
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
48790
diff
changeset
|
204 |
dirstate-tracked-key-v1 |