Show More
@@ -1,38 +1,53 | |||
|
1 | 1 | #!/bin/sh |
|
2 | 2 | |
|
3 | 3 | mkdir test |
|
4 | 4 | cd test |
|
5 | 5 | hg init |
|
6 | 6 | echo foo>foo |
|
7 | 7 | hg addremove |
|
8 | 8 | hg commit -m 1 |
|
9 | 9 | echo bar>bar |
|
10 | 10 | hg addremove |
|
11 | 11 | hg commit -m 2 |
|
12 | 12 | mkdir baz |
|
13 | 13 | echo bletch>baz/bletch |
|
14 | 14 | hg addremove |
|
15 | 15 | hg commit -m 3 |
|
16 | 16 | echo "[web]" >> .hg/hgrc |
|
17 | 17 | echo "name = test-archive" >> .hg/hgrc |
|
18 | 18 | echo "allowzip = true" >> .hg/hgrc |
|
19 | 19 | echo "allowgz = true" >> .hg/hgrc |
|
20 | 20 | echo "allowbz2 = true" >> .hg/hgrc |
|
21 | 21 | hg serve -p 20059 -d --pid-file=hg.pid |
|
22 | 22 | |
|
23 | 23 | TIP=`hg id -v | cut -f1 -d' '` |
|
24 | 24 | QTIP=`hg id -q` |
|
25 | 25 | cat > getarchive.py <<EOF |
|
26 | 26 | import sys, urllib2 |
|
27 | 27 | node, archive = sys.argv[1:] |
|
28 | 28 | f = urllib2.urlopen('http://127.0.0.1:20059/?cmd=archive;node=%s;type=%s' |
|
29 | 29 | % (node, archive)) |
|
30 | 30 | sys.stdout.write(f.read()) |
|
31 | 31 | EOF |
|
32 | 32 | http_proxy= python getarchive.py "$TIP" gz | gunzip -dc - | tar tf - | sed "s/$QTIP/TIP/" |
|
33 | 33 | http_proxy= python getarchive.py "$TIP" bz2 | bunzip2 -dc - | tar tf - | sed "s/$QTIP/TIP/" |
|
34 | 34 | http_proxy= python getarchive.py "$TIP" zip > archive.zip |
|
35 | 35 | unzip -t archive.zip | sed "s/$QTIP/TIP/" |
|
36 | 36 | |
|
37 | 37 | kill `cat hg.pid` |
|
38 | 38 | sleep 1 # wait for server to scream and die |
|
39 | ||
|
40 | hg archive -t tar test.tar | |
|
41 | tar tf test.tar | |
|
42 | ||
|
43 | hg archive -t tbz2 -X baz test.tar.bz2 | |
|
44 | bunzip2 -dc test.tar.bz2 | tar tf - | |
|
45 | ||
|
46 | hg archive -t tgz -p %b-%h test-%h.tar.gz | |
|
47 | gzip -dc test-$QTIP.tar.gz | tar tf - | sed "s/$QTIP/TIP/" | |
|
48 | ||
|
49 | hg archive -t zip -p /illegal test.zip | |
|
50 | hg archive -t zip -p very/../bad test.zip | |
|
51 | ||
|
52 | hg archive -t zip -r 2 test.zip | |
|
53 | unzip -t test.zip |
@@ -1,14 +1,35 | |||
|
1 | 1 | adding foo |
|
2 | 2 | adding bar |
|
3 | 3 | adding baz/bletch |
|
4 | test-archive-TIP/.hg_archival.txt | |
|
4 | 5 | test-archive-TIP/bar |
|
5 | 6 | test-archive-TIP/baz/bletch |
|
6 | 7 | test-archive-TIP/foo |
|
8 | test-archive-TIP/.hg_archival.txt | |
|
7 | 9 | test-archive-TIP/bar |
|
8 | 10 | test-archive-TIP/baz/bletch |
|
9 | 11 | test-archive-TIP/foo |
|
10 | 12 | Archive: archive.zip |
|
13 | testing: test-archive-TIP/.hg_archival.txt OK | |
|
11 | 14 | testing: test-archive-TIP/bar OK |
|
12 | 15 | testing: test-archive-TIP/baz/bletch OK |
|
13 | 16 | testing: test-archive-TIP/foo OK |
|
14 | 17 | No errors detected in compressed data of archive.zip. |
|
18 | test/.hg_archival.txt | |
|
19 | test/bar | |
|
20 | test/baz/bletch | |
|
21 | test/foo | |
|
22 | test/.hg_archival.txt | |
|
23 | test/bar | |
|
24 | test/foo | |
|
25 | test-TIP/.hg_archival.txt | |
|
26 | test-TIP/bar | |
|
27 | test-TIP/baz/bletch | |
|
28 | test-TIP/foo | |
|
29 | abort: archive prefix contains illegal components | |
|
30 | Archive: test.zip | |
|
31 | testing: test/.hg_archival.txt OK | |
|
32 | testing: test/bar OK | |
|
33 | testing: test/baz/bletch OK | |
|
34 | testing: test/foo OK | |
|
35 | No errors detected in compressed data of test.zip. |
@@ -1,253 +1,255 | |||
|
1 | 1 | Mercurial Distributed SCM |
|
2 | 2 | |
|
3 | 3 | basic commands (use "hg help" for the full list or option "-v" for details): |
|
4 | 4 | |
|
5 | 5 | add add the specified files on the next commit |
|
6 | 6 | annotate show changeset information per file line |
|
7 | 7 | clone make a copy of an existing repository |
|
8 | 8 | commit commit the specified files or all outstanding changes |
|
9 | 9 | diff diff repository (or selected files) |
|
10 | 10 | export dump the header and diffs for one or more changesets |
|
11 | 11 | init create a new repository in the given directory |
|
12 | 12 | log show revision history of entire repository or files |
|
13 | 13 | parents show the parents of the working dir or revision |
|
14 | 14 | pull pull changes from the specified source |
|
15 | 15 | push push changes to the specified destination |
|
16 | 16 | remove remove the specified files on the next commit |
|
17 | 17 | revert revert modified files or dirs back to their unmodified states |
|
18 | 18 | serve export the repository via HTTP |
|
19 | 19 | status show changed files in the working directory |
|
20 | 20 | update update or merge working directory |
|
21 | 21 | add add the specified files on the next commit |
|
22 | 22 | annotate show changeset information per file line |
|
23 | 23 | clone make a copy of an existing repository |
|
24 | 24 | commit commit the specified files or all outstanding changes |
|
25 | 25 | diff diff repository (or selected files) |
|
26 | 26 | export dump the header and diffs for one or more changesets |
|
27 | 27 | init create a new repository in the given directory |
|
28 | 28 | log show revision history of entire repository or files |
|
29 | 29 | parents show the parents of the working dir or revision |
|
30 | 30 | pull pull changes from the specified source |
|
31 | 31 | push push changes to the specified destination |
|
32 | 32 | remove remove the specified files on the next commit |
|
33 | 33 | revert revert modified files or dirs back to their unmodified states |
|
34 | 34 | serve export the repository via HTTP |
|
35 | 35 | status show changed files in the working directory |
|
36 | 36 | update update or merge working directory |
|
37 | 37 | Mercurial Distributed SCM |
|
38 | 38 | |
|
39 | 39 | list of commands (use "hg help -v" to show aliases and global options): |
|
40 | 40 | |
|
41 | 41 | add add the specified files on the next commit |
|
42 | 42 | addremove add all new files, delete all missing files |
|
43 | 43 | annotate show changeset information per file line |
|
44 | archive create unversioned archive of a repository revision | |
|
44 | 45 | bundle create a changegroup file |
|
45 | 46 | cat output the latest or given revisions of files |
|
46 | 47 | clone make a copy of an existing repository |
|
47 | 48 | commit commit the specified files or all outstanding changes |
|
48 | 49 | copy mark files as copied for the next commit |
|
49 | 50 | diff diff repository (or selected files) |
|
50 | 51 | export dump the header and diffs for one or more changesets |
|
51 | 52 | forget don't add the specified files on the next commit |
|
52 | 53 | grep search for a pattern in specified files and revisions |
|
53 | 54 | heads show current repository heads |
|
54 | 55 | help show help for a given command or all commands |
|
55 | 56 | identify print information about the working copy |
|
56 | 57 | import import an ordered set of patches |
|
57 | 58 | incoming show new changesets found in source |
|
58 | 59 | init create a new repository in the given directory |
|
59 | 60 | locate locate files matching specific patterns |
|
60 | 61 | log show revision history of entire repository or files |
|
61 | 62 | manifest output the latest or given revision of the project manifest |
|
62 | 63 | merge Merge working directory with another revision |
|
63 | 64 | outgoing show changesets not found in destination |
|
64 | 65 | parents show the parents of the working dir or revision |
|
65 | 66 | paths show definition of symbolic path names |
|
66 | 67 | pull pull changes from the specified source |
|
67 | 68 | push push changes to the specified destination |
|
68 | 69 | recover roll back an interrupted transaction |
|
69 | 70 | remove remove the specified files on the next commit |
|
70 | 71 | rename rename files; equivalent of copy + remove |
|
71 | 72 | revert revert modified files or dirs back to their unmodified states |
|
72 | 73 | root print the root (top) of the current working dir |
|
73 | 74 | serve export the repository via HTTP |
|
74 | 75 | status show changed files in the working directory |
|
75 | 76 | tag add a tag for the current tip or a given revision |
|
76 | 77 | tags list repository tags |
|
77 | 78 | tip show the tip revision |
|
78 | 79 | unbundle apply a changegroup file |
|
79 | 80 | undo undo the last commit or pull |
|
80 | 81 | update update or merge working directory |
|
81 | 82 | verify verify the integrity of the repository |
|
82 | 83 | version output version and copyright information |
|
83 | 84 | add add the specified files on the next commit |
|
84 | 85 | addremove add all new files, delete all missing files |
|
85 | 86 | annotate show changeset information per file line |
|
87 | archive create unversioned archive of a repository revision | |
|
86 | 88 | bundle create a changegroup file |
|
87 | 89 | cat output the latest or given revisions of files |
|
88 | 90 | clone make a copy of an existing repository |
|
89 | 91 | commit commit the specified files or all outstanding changes |
|
90 | 92 | copy mark files as copied for the next commit |
|
91 | 93 | diff diff repository (or selected files) |
|
92 | 94 | export dump the header and diffs for one or more changesets |
|
93 | 95 | forget don't add the specified files on the next commit |
|
94 | 96 | grep search for a pattern in specified files and revisions |
|
95 | 97 | heads show current repository heads |
|
96 | 98 | help show help for a given command or all commands |
|
97 | 99 | identify print information about the working copy |
|
98 | 100 | import import an ordered set of patches |
|
99 | 101 | incoming show new changesets found in source |
|
100 | 102 | init create a new repository in the given directory |
|
101 | 103 | locate locate files matching specific patterns |
|
102 | 104 | log show revision history of entire repository or files |
|
103 | 105 | manifest output the latest or given revision of the project manifest |
|
104 | 106 | merge Merge working directory with another revision |
|
105 | 107 | outgoing show changesets not found in destination |
|
106 | 108 | parents show the parents of the working dir or revision |
|
107 | 109 | paths show definition of symbolic path names |
|
108 | 110 | pull pull changes from the specified source |
|
109 | 111 | push push changes to the specified destination |
|
110 | 112 | recover roll back an interrupted transaction |
|
111 | 113 | remove remove the specified files on the next commit |
|
112 | 114 | rename rename files; equivalent of copy + remove |
|
113 | 115 | revert revert modified files or dirs back to their unmodified states |
|
114 | 116 | root print the root (top) of the current working dir |
|
115 | 117 | serve export the repository via HTTP |
|
116 | 118 | status show changed files in the working directory |
|
117 | 119 | tag add a tag for the current tip or a given revision |
|
118 | 120 | tags list repository tags |
|
119 | 121 | tip show the tip revision |
|
120 | 122 | unbundle apply a changegroup file |
|
121 | 123 | undo undo the last commit or pull |
|
122 | 124 | update update or merge working directory |
|
123 | 125 | verify verify the integrity of the repository |
|
124 | 126 | version output version and copyright information |
|
125 | 127 | hg add [OPTION]... [FILE]... |
|
126 | 128 | |
|
127 | 129 | add the specified files on the next commit |
|
128 | 130 | |
|
129 | 131 | Schedule files to be version controlled and added to the repository. |
|
130 | 132 | |
|
131 | 133 | The files will be added to the repository at the next commit. |
|
132 | 134 | |
|
133 | 135 | If no names are given, add all files in the repository. |
|
134 | 136 | |
|
135 | 137 | options: |
|
136 | 138 | |
|
137 | 139 | -I --include include names matching the given patterns |
|
138 | 140 | -X --exclude exclude names matching the given patterns |
|
139 | 141 | hg add: option --skjdfks not recognized |
|
140 | 142 | hg add [OPTION]... [FILE]... |
|
141 | 143 | |
|
142 | 144 | add the specified files on the next commit |
|
143 | 145 | |
|
144 | 146 | Schedule files to be version controlled and added to the repository. |
|
145 | 147 | |
|
146 | 148 | The files will be added to the repository at the next commit. |
|
147 | 149 | |
|
148 | 150 | If no names are given, add all files in the repository. |
|
149 | 151 | |
|
150 | 152 | options: |
|
151 | 153 | |
|
152 | 154 | -I --include include names matching the given patterns |
|
153 | 155 | -X --exclude exclude names matching the given patterns |
|
154 | 156 | hg diff [-a] [-I] [-X] [-r REV1 [-r REV2]] [FILE]... |
|
155 | 157 | |
|
156 | 158 | diff repository (or selected files) |
|
157 | 159 | |
|
158 | 160 | Show differences between revisions for the specified files. |
|
159 | 161 | |
|
160 | 162 | Differences between files are shown using the unified diff format. |
|
161 | 163 | |
|
162 | 164 | When two revision arguments are given, then changes are shown |
|
163 | 165 | between those revisions. If only one revision is specified then |
|
164 | 166 | that revision is compared to the working directory, and, when no |
|
165 | 167 | revisions are specified, the working directory files are compared |
|
166 | 168 | to its parent. |
|
167 | 169 | |
|
168 | 170 | Without the -a option, diff will avoid generating diffs of files |
|
169 | 171 | it detects as binary. With -a, diff will generate a diff anyway, |
|
170 | 172 | probably with undesirable results. |
|
171 | 173 | |
|
172 | 174 | options: |
|
173 | 175 | |
|
174 | 176 | -r --rev revision |
|
175 | 177 | -a --text treat all files as text |
|
176 | 178 | -p --show-function show which function each change is in |
|
177 | 179 | -w --ignore-all-space ignore white space when comparing lines |
|
178 | 180 | -I --include include names matching the given patterns |
|
179 | 181 | -X --exclude exclude names matching the given patterns |
|
180 | 182 | hg status [OPTION]... [FILE]... |
|
181 | 183 | |
|
182 | 184 | show changed files in the working directory |
|
183 | 185 | |
|
184 | 186 | Show changed files in the repository. If names are |
|
185 | 187 | given, only files that match are shown. |
|
186 | 188 | |
|
187 | 189 | The codes used to show the status of files are: |
|
188 | 190 | M = modified |
|
189 | 191 | A = added |
|
190 | 192 | R = removed |
|
191 | 193 | ! = deleted, but still tracked |
|
192 | 194 | ? = not tracked |
|
193 | 195 | I = ignored (not shown by default) |
|
194 | 196 | |
|
195 | 197 | aliases: st |
|
196 | 198 | |
|
197 | 199 | options: |
|
198 | 200 | |
|
199 | 201 | -m --modified show only modified files |
|
200 | 202 | -a --added show only added files |
|
201 | 203 | -r --removed show only removed files |
|
202 | 204 | -d --deleted show only deleted (but tracked) files |
|
203 | 205 | -u --unknown show only unknown (not tracked) files |
|
204 | 206 | -i --ignored show ignored files |
|
205 | 207 | -n --no-status hide status prefix |
|
206 | 208 | -0 --print0 end filenames with NUL, for use with xargs |
|
207 | 209 | -I --include include names matching the given patterns |
|
208 | 210 | -X --exclude exclude names matching the given patterns |
|
209 | 211 | hg status [OPTION]... [FILE]... |
|
210 | 212 | |
|
211 | 213 | show changed files in the working directory |
|
212 | 214 | hg: unknown command 'foo' |
|
213 | 215 | Mercurial Distributed SCM |
|
214 | 216 | |
|
215 | 217 | basic commands (use "hg help" for the full list or option "-v" for details): |
|
216 | 218 | |
|
217 | 219 | add add the specified files on the next commit |
|
218 | 220 | annotate show changeset information per file line |
|
219 | 221 | clone make a copy of an existing repository |
|
220 | 222 | commit commit the specified files or all outstanding changes |
|
221 | 223 | diff diff repository (or selected files) |
|
222 | 224 | export dump the header and diffs for one or more changesets |
|
223 | 225 | init create a new repository in the given directory |
|
224 | 226 | log show revision history of entire repository or files |
|
225 | 227 | parents show the parents of the working dir or revision |
|
226 | 228 | pull pull changes from the specified source |
|
227 | 229 | push push changes to the specified destination |
|
228 | 230 | remove remove the specified files on the next commit |
|
229 | 231 | revert revert modified files or dirs back to their unmodified states |
|
230 | 232 | serve export the repository via HTTP |
|
231 | 233 | status show changed files in the working directory |
|
232 | 234 | update update or merge working directory |
|
233 | 235 | hg: unknown command 'skjdfks' |
|
234 | 236 | Mercurial Distributed SCM |
|
235 | 237 | |
|
236 | 238 | basic commands (use "hg help" for the full list or option "-v" for details): |
|
237 | 239 | |
|
238 | 240 | add add the specified files on the next commit |
|
239 | 241 | annotate show changeset information per file line |
|
240 | 242 | clone make a copy of an existing repository |
|
241 | 243 | commit commit the specified files or all outstanding changes |
|
242 | 244 | diff diff repository (or selected files) |
|
243 | 245 | export dump the header and diffs for one or more changesets |
|
244 | 246 | init create a new repository in the given directory |
|
245 | 247 | log show revision history of entire repository or files |
|
246 | 248 | parents show the parents of the working dir or revision |
|
247 | 249 | pull pull changes from the specified source |
|
248 | 250 | push push changes to the specified destination |
|
249 | 251 | remove remove the specified files on the next commit |
|
250 | 252 | revert revert modified files or dirs back to their unmodified states |
|
251 | 253 | serve export the repository via HTTP |
|
252 | 254 | status show changed files in the working directory |
|
253 | 255 | update update or merge working directory |
General Comments 0
You need to be logged in to leave comments.
Login now