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