Show More
@@ -1,204 +1,204 b'' | |||
|
1 | 1 | #require rust |
|
2 | 2 | |
|
3 | 3 | Define an rhg function that will only run if rhg exists |
|
4 | 4 | $ rhg() { |
|
5 |
> if [ -f "$RUNTESTDIR/../rust/target/ |
|
|
6 |
> "$RUNTESTDIR/../rust/target/ |
|
|
5 | > if [ -f "$RUNTESTDIR/../rust/target/release/rhg" ]; then | |
|
6 | > "$RUNTESTDIR/../rust/target/release/rhg" "$@" | |
|
7 | 7 | > else |
|
8 | 8 | > echo "skipped: Cannot find rhg. Try to run cargo build in rust/rhg." |
|
9 | 9 | > exit 80 |
|
10 | 10 | > fi |
|
11 | 11 | > } |
|
12 | 12 | |
|
13 | 13 | Unimplemented command |
|
14 | 14 | $ rhg unimplemented-command |
|
15 | 15 | error: Found argument 'unimplemented-command' which wasn't expected, or isn't valid in this context |
|
16 | 16 | |
|
17 | 17 | USAGE: |
|
18 | 18 | rhg <SUBCOMMAND> |
|
19 | 19 | |
|
20 | 20 | For more information try --help |
|
21 | 21 | [252] |
|
22 | 22 | |
|
23 | 23 | Finding root |
|
24 | 24 | $ rhg root |
|
25 | 25 | abort: no repository found in '$TESTTMP' (.hg not found)! |
|
26 | 26 | [255] |
|
27 | 27 | |
|
28 | 28 | $ hg init repository |
|
29 | 29 | $ cd repository |
|
30 | 30 | $ rhg root |
|
31 | 31 | $TESTTMP/repository |
|
32 | 32 | |
|
33 | 33 | Unwritable file descriptor |
|
34 | 34 | $ rhg root > /dev/full |
|
35 | 35 | abort: No space left on device (os error 28) |
|
36 | 36 | [255] |
|
37 | 37 | |
|
38 | 38 | Deleted repository |
|
39 | 39 | $ rm -rf `pwd` |
|
40 | 40 | $ rhg root |
|
41 | 41 | abort: error getting current working directory: $ENOENT$ |
|
42 | 42 | [255] |
|
43 | 43 | |
|
44 | 44 | Listing tracked files |
|
45 | 45 | $ cd $TESTTMP |
|
46 | 46 | $ hg init repository |
|
47 | 47 | $ cd repository |
|
48 | 48 | $ for i in 1 2 3; do |
|
49 | 49 | > echo $i >> file$i |
|
50 | 50 | > hg add file$i |
|
51 | 51 | > done |
|
52 | 52 | > hg commit -m "commit $i" -q |
|
53 | 53 | |
|
54 | 54 | Listing tracked files from root |
|
55 | 55 | $ rhg files |
|
56 | 56 | file1 |
|
57 | 57 | file2 |
|
58 | 58 | file3 |
|
59 | 59 | |
|
60 | 60 | Listing tracked files from subdirectory |
|
61 | 61 | $ mkdir -p path/to/directory |
|
62 | 62 | $ cd path/to/directory |
|
63 | 63 | $ rhg files |
|
64 | 64 | ../../../file1 |
|
65 | 65 | ../../../file2 |
|
66 | 66 | ../../../file3 |
|
67 | 67 | |
|
68 | 68 | Listing tracked files through broken pipe |
|
69 | 69 | $ rhg files | head -n 1 |
|
70 | 70 | ../../../file1 |
|
71 | 71 | |
|
72 | 72 | Debuging data in inline index |
|
73 | 73 | $ cd $TESTTMP |
|
74 | 74 | $ rm -rf repository |
|
75 | 75 | $ hg init repository |
|
76 | 76 | $ cd repository |
|
77 | 77 | $ for i in 1 2 3 4 5 6; do |
|
78 | 78 | > echo $i >> file-$i |
|
79 | 79 | > hg add file-$i |
|
80 | 80 | > hg commit -m "Commit $i" -q |
|
81 | 81 | > done |
|
82 | 82 | $ rhg debugdata -c 2 |
|
83 | 83 | 8d0267cb034247ebfa5ee58ce59e22e57a492297 |
|
84 | 84 | test |
|
85 | 85 | 0 0 |
|
86 | 86 | file-3 |
|
87 | 87 | |
|
88 | 88 | Commit 3 (no-eol) |
|
89 | 89 | $ rhg debugdata -m 2 |
|
90 | 90 | file-1\x00b8e02f6433738021a065f94175c7cd23db5f05be (esc) |
|
91 | 91 | file-2\x005d9299349fc01ddd25d0070d149b124d8f10411e (esc) |
|
92 | 92 | file-3\x002661d26c649684b482d10f91960cc3db683c38b4 (esc) |
|
93 | 93 | |
|
94 | 94 | Debuging with full node id |
|
95 | 95 | $ rhg debugdata -c `hg log -r 0 -T '{node}'` |
|
96 | 96 | d1d1c679d3053e8926061b6f45ca52009f011e3f |
|
97 | 97 | test |
|
98 | 98 | 0 0 |
|
99 | 99 | file-1 |
|
100 | 100 | |
|
101 | 101 | Commit 1 (no-eol) |
|
102 | 102 | |
|
103 | 103 | Specifying revisions by changeset ID |
|
104 | 104 | $ hg log -T '{node}\n' |
|
105 | 105 | c6ad58c44207b6ff8a4fbbca7045a5edaa7e908b |
|
106 | 106 | d654274993d0149eecc3cc03214f598320211900 |
|
107 | 107 | f646af7e96481d3a5470b695cf30ad8e3ab6c575 |
|
108 | 108 | cf8b83f14ead62b374b6e91a0e9303b85dfd9ed7 |
|
109 | 109 | 91c6f6e73e39318534dc415ea4e8a09c99cd74d6 |
|
110 | 110 | 6ae9681c6d30389694d8701faf24b583cf3ccafe |
|
111 | 111 | $ rhg files -r cf8b83 |
|
112 | 112 | file-1 |
|
113 | 113 | file-2 |
|
114 | 114 | file-3 |
|
115 | 115 | $ rhg cat -r cf8b83 file-2 |
|
116 | 116 | 2 |
|
117 | 117 | $ rhg cat -r c file-2 |
|
118 | 118 | abort: ambiguous revision identifier c |
|
119 | 119 | [255] |
|
120 | 120 | $ rhg cat -r d file-2 |
|
121 | 121 | 2 |
|
122 | 122 | |
|
123 | 123 | Cat files |
|
124 | 124 | $ cd $TESTTMP |
|
125 | 125 | $ rm -rf repository |
|
126 | 126 | $ hg init repository |
|
127 | 127 | $ cd repository |
|
128 | 128 | $ echo "original content" > original |
|
129 | 129 | $ hg add original |
|
130 | 130 | $ hg commit -m "add original" original |
|
131 | 131 | $ rhg cat -r 0 original |
|
132 | 132 | original content |
|
133 | 133 | Cat copied file should not display copy metadata |
|
134 | 134 | $ hg copy original copy_of_original |
|
135 | 135 | $ hg commit -m "add copy of original" |
|
136 | 136 | $ rhg cat -r 1 copy_of_original |
|
137 | 137 | original content |
|
138 | 138 | |
|
139 | 139 | Requirements |
|
140 | 140 | $ rhg debugrequirements |
|
141 | 141 | dotencode |
|
142 | 142 | fncache |
|
143 | 143 | generaldelta |
|
144 | 144 | revlogv1 |
|
145 | 145 | sparserevlog |
|
146 | 146 | store |
|
147 | 147 | |
|
148 | 148 | $ echo indoor-pool >> .hg/requires |
|
149 | 149 | $ rhg files |
|
150 | 150 | [252] |
|
151 | 151 | |
|
152 | 152 | $ rhg cat -r 1 copy_of_original |
|
153 | 153 | [252] |
|
154 | 154 | |
|
155 | 155 | $ rhg debugrequirements |
|
156 | 156 | dotencode |
|
157 | 157 | fncache |
|
158 | 158 | generaldelta |
|
159 | 159 | revlogv1 |
|
160 | 160 | sparserevlog |
|
161 | 161 | store |
|
162 | 162 | indoor-pool |
|
163 | 163 | |
|
164 | 164 | $ echo -e '\xFF' >> .hg/requires |
|
165 | 165 | $ rhg debugrequirements |
|
166 | 166 | abort: .hg/requires is corrupted |
|
167 | 167 | [255] |
|
168 | 168 | |
|
169 | 169 | Persistent nodemap |
|
170 | 170 | $ cd $TESTTMP |
|
171 | 171 | $ rm -rf repository |
|
172 | 172 | $ hg init repository |
|
173 | 173 | $ cd repository |
|
174 | 174 | $ rhg debugrequirements | grep nodemap |
|
175 | 175 | [1] |
|
176 | 176 | $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn" |
|
177 | 177 | $ hg id -r tip |
|
178 | 178 | c3ae8dec9fad tip |
|
179 | 179 | $ ls .hg/store/00changelog* |
|
180 | 180 | .hg/store/00changelog.d |
|
181 | 181 | .hg/store/00changelog.i |
|
182 | 182 | $ rhg files -r c3ae8dec9fad |
|
183 | 183 | of |
|
184 | 184 | |
|
185 | 185 | $ cd $TESTTMP |
|
186 | 186 | $ rm -rf repository |
|
187 | 187 | $ hg --config format.use-persistent-nodemap=True init repository |
|
188 | 188 | $ cd repository |
|
189 | 189 | $ rhg debugrequirements | grep nodemap |
|
190 | 190 | persistent-nodemap |
|
191 | 191 | $ hg debugbuilddag .+5000 --overwritten-file --config "storage.revlog.nodemap.mode=warn" |
|
192 | 192 | $ hg id -r tip |
|
193 | 193 | c3ae8dec9fad tip |
|
194 | 194 | $ ls .hg/store/00changelog* |
|
195 | 195 | .hg/store/00changelog-*.nd (glob) |
|
196 | 196 | .hg/store/00changelog.d |
|
197 | 197 | .hg/store/00changelog.i |
|
198 | 198 | .hg/store/00changelog.n |
|
199 | 199 | |
|
200 | 200 | Specifying revisions by changeset ID |
|
201 | 201 | $ rhg files -r c3ae8dec9fad |
|
202 | 202 | of |
|
203 | 203 | $ rhg cat -r c3ae8dec9fad of |
|
204 | 204 | r5000 |
General Comments 0
You need to be logged in to leave comments.
Login now