Mercurial > hg
annotate tests/test-fix-topology.t @ 44558:ea40fea992e0
tests: simplify test-fix-topology.t slightly by using a `(case !)`
Differential Revision: https://phab.mercurial-scm.org/D8283
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 12 Mar 2020 16:25:22 -0700 |
parents | 2ecf5c24d0cd |
children | 40f4a75938ba |
rev | line source |
---|---|
37560
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
1 A script that implements uppercasing all letters in a file. |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
2 |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
3 $ UPPERCASEPY="$TESTTMP/uppercase.py" |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
4 $ cat > $UPPERCASEPY <<EOF |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
5 > import sys |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
6 > from mercurial.utils.procutil import setbinary |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
7 > setbinary(sys.stdin) |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
8 > setbinary(sys.stdout) |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
9 > sys.stdout.write(sys.stdin.read().upper()) |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
10 > EOF |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
11 $ TESTLINES="foo\nbar\nbaz\n" |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38420
diff
changeset
|
12 $ printf $TESTLINES | "$PYTHON" $UPPERCASEPY |
37560
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
13 FOO |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
14 BAR |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
15 BAZ |
41ba336d9f1e
fix: use a portable python script instead of sed in test
Danny Hooper <hooper@google.com>
parents:
37183
diff
changeset
|
16 |
37183
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
17 Tests for the fix extension's behavior around non-trivial history topologies. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
18 Looks for correct incremental fixing and reproduction of parent/child |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
19 relationships. We indicate fixed file content by uppercasing it. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
20 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
21 $ cat >> $HGRCPATH <<EOF |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
22 > [extensions] |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
23 > fix = |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
24 > [fix] |
39707
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
38420
diff
changeset
|
25 > uppercase-whole-file:command="$PYTHON" $UPPERCASEPY |
40533
2ecf5c24d0cd
fix: rename :fileset subconfig to :pattern
Danny Hooper <hooper@google.com>
parents:
39707
diff
changeset
|
26 > uppercase-whole-file:pattern=set:** |
37183
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
27 > EOF |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
28 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
29 This tests the only behavior that should really be affected by obsolescence, so |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
30 we'll test it with evolution off and on. This only changes the revision |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
31 numbers, if all is well. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
32 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
33 #testcases obsstore-off obsstore-on |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
34 #if obsstore-on |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
35 $ cat >> $HGRCPATH <<EOF |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
36 > [experimental] |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
37 > evolution.createmarkers=True |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
38 > evolution.allowunstable=True |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
39 > EOF |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
40 #endif |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
41 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
42 Setting up the test topology. Scroll down to see the graph produced. We make it |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
43 clear which files were modified in each revision. It's enough to test at the |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
44 file granularity, because that demonstrates which baserevs were diffed against. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
45 The computation of changed lines is orthogonal and tested separately. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
46 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
47 $ hg init repo |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
48 $ cd repo |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
49 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
50 $ printf "aaaa\n" > a |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
51 $ hg commit -Am "change A" |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
52 adding a |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
53 $ printf "bbbb\n" > b |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
54 $ hg commit -Am "change B" |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
55 adding b |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
56 $ printf "cccc\n" > c |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
57 $ hg commit -Am "change C" |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
58 adding c |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
59 $ hg checkout 0 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
60 0 files updated, 0 files merged, 2 files removed, 0 files unresolved |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
61 $ printf "dddd\n" > d |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
62 $ hg commit -Am "change D" |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
63 adding d |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
64 created new head |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
65 $ hg merge -r 2 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
66 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
67 (branch merge, don't forget to commit) |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
68 $ printf "eeee\n" > e |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
69 $ hg commit -Am "change E" |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
70 adding e |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
71 $ hg checkout 0 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
72 0 files updated, 0 files merged, 4 files removed, 0 files unresolved |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
73 $ printf "ffff\n" > f |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
74 $ hg commit -Am "change F" |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
75 adding f |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
76 created new head |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
77 $ hg checkout 0 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
78 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
79 $ printf "gggg\n" > g |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
80 $ hg commit -Am "change G" |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
81 adding g |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
82 created new head |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
83 $ hg merge -r 5 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
84 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
85 (branch merge, don't forget to commit) |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
86 $ printf "hhhh\n" > h |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
87 $ hg commit -Am "change H" |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
88 adding h |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
89 $ hg merge -r 4 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
90 4 files updated, 0 files merged, 0 files removed, 0 files unresolved |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
91 (branch merge, don't forget to commit) |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
92 $ printf "iiii\n" > i |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
93 $ hg commit -Am "change I" |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
94 adding i |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
95 $ hg checkout 2 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
96 0 files updated, 0 files merged, 6 files removed, 0 files unresolved |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
97 $ printf "jjjj\n" > j |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
98 $ hg commit -Am "change J" |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
99 adding j |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
100 created new head |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
101 $ hg checkout 7 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
102 3 files updated, 0 files merged, 3 files removed, 0 files unresolved |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
103 $ printf "kkkk\n" > k |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
104 $ hg add |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
105 adding k |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
106 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
107 $ hg log --graph --template '{rev} {desc}\n' |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
108 o 9 change J |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
109 | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
110 | o 8 change I |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
111 | |\ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
112 | | @ 7 change H |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
113 | | |\ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
114 | | | o 6 change G |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
115 | | | | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
116 | | o | 5 change F |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
117 | | |/ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
118 | o | 4 change E |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
119 |/| | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
120 | o | 3 change D |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
121 | |/ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
122 o | 2 change C |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
123 | | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
124 o | 1 change B |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
125 |/ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
126 o 0 change A |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
127 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
128 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
129 Fix all but the root revision and its four children. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
130 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
131 $ hg fix -r '2|4|7|8|9' --working-dir |
44558
ea40fea992e0
tests: simplify test-fix-topology.t slightly by using a `(case !)`
Martin von Zweigbergk <martinvonz@google.com>
parents:
40533
diff
changeset
|
132 saved backup bundle to * (glob) (obsstore-off !) |
37183
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
133 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
134 The five revisions remain, but the other revisions were fixed and replaced. All |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
135 parent pointers have been accurately set to reproduce the previous topology |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
136 (though it is rendered in a slightly different order now). |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
137 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
138 #if obsstore-on |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
139 $ hg log --graph --template '{rev} {desc}\n' |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
140 o 14 change J |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
141 | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
142 | o 13 change I |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
143 | |\ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
144 | | @ 12 change H |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
145 | | |\ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
146 | o | | 11 change E |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
147 |/| | | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
148 o | | | 10 change C |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
149 | | | | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
150 | | | o 6 change G |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
151 | | | | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
152 | | o | 5 change F |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
153 | | |/ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
154 | o / 3 change D |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
155 | |/ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
156 o / 1 change B |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
157 |/ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
158 o 0 change A |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
159 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
160 $ C=10 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
161 $ E=11 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
162 $ H=12 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
163 $ I=13 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
164 $ J=14 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
165 #else |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
166 $ hg log --graph --template '{rev} {desc}\n' |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
167 o 9 change J |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
168 | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
169 | o 8 change I |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
170 | |\ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
171 | | @ 7 change H |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
172 | | |\ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
173 | o | | 6 change E |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
174 |/| | | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
175 o | | | 5 change C |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
176 | | | | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
177 | | | o 4 change G |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
178 | | | | |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
179 | | o | 3 change F |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
180 | | |/ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
181 | o / 2 change D |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
182 | |/ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
183 o / 1 change B |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
184 |/ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
185 o 0 change A |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
186 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
187 $ C=5 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
188 $ E=6 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
189 $ H=7 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
190 $ I=8 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
191 $ J=9 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
192 #endif |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
193 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
194 Change C is a root of the set being fixed, so all we fix is what has changed |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
195 since its parent. That parent, change B, is its baserev. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
196 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
197 $ hg cat -r $C 'set:**' |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
198 aaaa |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
199 bbbb |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
200 CCCC |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
201 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
202 Change E is a merge with only one parent being fixed. Its baserevs are the |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
203 unfixed parent plus the baserevs of the other parent. This evaluates to changes |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
204 B and D. We now have to decide what it means to incrementally fix a merge |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
205 commit. We choose to fix anything that has changed versus any baserev. Only the |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
206 undisturbed content of the common ancestor, change A, is unfixed. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
207 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
208 $ hg cat -r $E 'set:**' |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
209 aaaa |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
210 BBBB |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
211 CCCC |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
212 DDDD |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
213 EEEE |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
214 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
215 Change H is a merge with neither parent being fixed. This is essentially |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
216 equivalent to the previous case because there is still only one baserev for |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
217 each parent of the merge. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
218 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
219 $ hg cat -r $H 'set:**' |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
220 aaaa |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
221 FFFF |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
222 GGGG |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
223 HHHH |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
224 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
225 Change I is a merge that has four baserevs; two from each parent. We handle |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
226 multiple baserevs in the same way regardless of how many came from each parent. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
227 So, fixing change H will fix any files that were not exactly the same in each |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
228 baserev. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
229 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
230 $ hg cat -r $I 'set:**' |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
231 aaaa |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
232 BBBB |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
233 CCCC |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
234 DDDD |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
235 EEEE |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
236 FFFF |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
237 GGGG |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
238 HHHH |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
239 IIII |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
240 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
241 Change J is a simple case with one baserev, but its baserev is not its parent, |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
242 change C. Its baserev is its grandparent, change B. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
243 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
244 $ hg cat -r $J 'set:**' |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
245 aaaa |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
246 bbbb |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
247 CCCC |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
248 JJJJ |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
249 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
250 The working copy was dirty, so it is treated much like a revision. The baserevs |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
251 for the working copy are inherited from its parent, change H, because it is |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
252 also being fixed. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
253 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
254 $ cat * |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
255 aaaa |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
256 FFFF |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
257 GGGG |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
258 HHHH |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
259 KKKK |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
260 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
261 Change A was never a baserev because none of its children were to be fixed. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
262 |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
263 $ cd .. |
ded5ea279a93
fix: new extension for automatically modifying file contents
Danny Hooper <hooper@google.com>
parents:
diff
changeset
|
264 |
37595
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
265 The --all flag should fix anything that wouldn't cause a problem if you fixed |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
266 it, including the working copy. Obsolete revisions are not fixed because that |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
267 could cause divergence. Public revisions would cause an abort because they are |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
268 immutable. We can fix orphans because their successors are still just orphans |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
269 of the original obsolete parent. When obsolesence is off, we're just fixing and |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
270 replacing anything that isn't public. |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
271 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
272 $ hg init fixall |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
273 $ cd fixall |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
274 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
275 #if obsstore-on |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
276 $ printf "one\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
277 $ hg commit -Aqm "first" |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
278 $ hg phase --public |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
279 $ hg tag --local root |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
280 $ printf "two\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
281 $ hg commit -m "second" |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
282 $ printf "three\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
283 $ hg commit -m "third" --secret |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
284 $ hg tag --local secret |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
285 $ hg checkout root |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
286 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
287 $ printf "four\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
288 $ hg commit -m "fourth" |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
289 created new head |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
290 $ printf "five\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
291 $ hg commit -m "fifth" |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
292 $ hg tag --local replaced |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
293 $ printf "six\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
294 $ hg commit -m "sixth" |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
295 $ hg checkout replaced |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
296 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
297 $ printf "seven\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
298 $ hg commit --amend |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
299 1 new orphan changesets |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
300 $ hg checkout secret |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
301 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
302 $ printf "uncommitted\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
303 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
304 $ hg log --graph --template '{rev} {desc} {phase}\n' |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
305 o 6 fifth draft |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
306 | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
307 | * 5 sixth draft |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
308 | | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
309 | x 4 fifth draft |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
310 |/ |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
311 o 3 fourth draft |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
312 | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
313 | @ 2 third secret |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
314 | | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
315 | o 1 second draft |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
316 |/ |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
317 o 0 first public |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
318 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
319 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
320 $ hg fix --all |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
321 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
322 $ hg log --graph --template '{rev} {desc}\n' -r 'sort(all(), topo)' --hidden |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
323 o 11 fifth |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
324 | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
325 o 9 fourth |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
326 | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
327 | @ 8 third |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
328 | | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
329 | o 7 second |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
330 |/ |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
331 | * 10 sixth |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
332 | | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
333 | | x 5 sixth |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
334 | |/ |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
335 | x 4 fifth |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
336 | | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
337 | | x 6 fifth |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
338 | |/ |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
339 | x 3 fourth |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
340 |/ |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
341 | x 2 third |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
342 | | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
343 | x 1 second |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
344 |/ |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
345 o 0 first |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
346 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
347 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
348 $ hg cat -r 7 foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
349 TWO |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
350 $ hg cat -r 8 foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
351 THREE |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
352 $ hg cat -r 9 foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
353 FOUR |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
354 $ hg cat -r 10 foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
355 SIX |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
356 $ hg cat -r 11 foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
357 SEVEN |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
358 $ cat foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
359 UNCOMMITTED |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
360 #else |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
361 $ printf "one\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
362 $ hg commit -Aqm "first" |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
363 $ hg phase --public |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
364 $ hg tag --local root |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
365 $ printf "two\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
366 $ hg commit -m "second" |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
367 $ printf "three\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
368 $ hg commit -m "third" --secret |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
369 $ hg tag --local secret |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
370 $ hg checkout root |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
371 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
372 $ printf "four\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
373 $ hg commit -m "fourth" |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
374 created new head |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
375 $ printf "uncommitted\n" > foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
376 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
377 $ hg log --graph --template '{rev} {desc} {phase}\n' |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
378 @ 3 fourth draft |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
379 | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
380 | o 2 third secret |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
381 | | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
382 | o 1 second draft |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
383 |/ |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
384 o 0 first public |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
385 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
386 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
387 $ hg fix --all |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
388 saved backup bundle to * (glob) |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
389 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
390 $ hg log --graph --template '{rev} {desc} {phase}\n' |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
391 @ 3 fourth draft |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
392 | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
393 | o 2 third secret |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
394 | | |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
395 | o 1 second draft |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
396 |/ |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
397 o 0 first public |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
398 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
399 $ hg cat -r 0 foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
400 one |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
401 $ hg cat -r 1 foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
402 TWO |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
403 $ hg cat -r 2 foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
404 THREE |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
405 $ hg cat -r 3 foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
406 FOUR |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
407 $ cat foo.whole |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
408 UNCOMMITTED |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
409 #endif |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
410 |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
411 $ cd .. |
e2506748b47f
fix: add --all flag to fix non-public non-obsolete revisions
Danny Hooper <hooper@google.com>
parents:
37560
diff
changeset
|
412 |