##// END OF EJS Templates
tests: use 'hghave serve' to guard tests that requires serve daemon management
Mads Kiilerich -
r15446:c5c9ca37 default
parent child Browse files
Show More
@@ -1,317 +1,321 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2 """Test the running system for features availability. Exit with zero
2 """Test the running system for features availability. Exit with zero
3 if all features are there, non-zero otherwise. If a feature name is
3 if all features are there, non-zero otherwise. If a feature name is
4 prefixed with "no-", the absence of feature is tested.
4 prefixed with "no-", the absence of feature is tested.
5 """
5 """
6 import optparse
6 import optparse
7 import os
7 import os
8 import re
8 import re
9 import sys
9 import sys
10 import tempfile
10 import tempfile
11
11
12 tempprefix = 'hg-hghave-'
12 tempprefix = 'hg-hghave-'
13
13
14 def matchoutput(cmd, regexp, ignorestatus=False):
14 def matchoutput(cmd, regexp, ignorestatus=False):
15 """Return True if cmd executes successfully and its output
15 """Return True if cmd executes successfully and its output
16 is matched by the supplied regular expression.
16 is matched by the supplied regular expression.
17 """
17 """
18 r = re.compile(regexp)
18 r = re.compile(regexp)
19 fh = os.popen(cmd)
19 fh = os.popen(cmd)
20 s = fh.read()
20 s = fh.read()
21 try:
21 try:
22 ret = fh.close()
22 ret = fh.close()
23 except IOError:
23 except IOError:
24 # Happen in Windows test environment
24 # Happen in Windows test environment
25 ret = 1
25 ret = 1
26 return (ignorestatus or ret is None) and r.search(s)
26 return (ignorestatus or ret is None) and r.search(s)
27
27
28 def has_baz():
28 def has_baz():
29 return matchoutput('baz --version 2>&1', r'baz Bazaar version')
29 return matchoutput('baz --version 2>&1', r'baz Bazaar version')
30
30
31 def has_bzr():
31 def has_bzr():
32 try:
32 try:
33 import bzrlib
33 import bzrlib
34 return bzrlib.__doc__ != None
34 return bzrlib.__doc__ != None
35 except ImportError:
35 except ImportError:
36 return False
36 return False
37
37
38 def has_bzr114():
38 def has_bzr114():
39 try:
39 try:
40 import bzrlib
40 import bzrlib
41 return (bzrlib.__doc__ != None
41 return (bzrlib.__doc__ != None
42 and bzrlib.version_info[:2] >= (1, 14))
42 and bzrlib.version_info[:2] >= (1, 14))
43 except ImportError:
43 except ImportError:
44 return False
44 return False
45
45
46 def has_cvs():
46 def has_cvs():
47 re = r'Concurrent Versions System.*?server'
47 re = r'Concurrent Versions System.*?server'
48 return matchoutput('cvs --version 2>&1', re)
48 return matchoutput('cvs --version 2>&1', re)
49
49
50 def has_darcs():
50 def has_darcs():
51 return matchoutput('darcs --version', r'2\.[2-9]', True)
51 return matchoutput('darcs --version', r'2\.[2-9]', True)
52
52
53 def has_mtn():
53 def has_mtn():
54 return matchoutput('mtn --version', r'monotone', True) and not matchoutput(
54 return matchoutput('mtn --version', r'monotone', True) and not matchoutput(
55 'mtn --version', r'monotone 0\.', True)
55 'mtn --version', r'monotone 0\.', True)
56
56
57 def has_eol_in_paths():
57 def has_eol_in_paths():
58 try:
58 try:
59 fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r')
59 fd, path = tempfile.mkstemp(prefix=tempprefix, suffix='\n\r')
60 os.close(fd)
60 os.close(fd)
61 os.remove(path)
61 os.remove(path)
62 return True
62 return True
63 except:
63 except:
64 return False
64 return False
65
65
66 def has_executablebit():
66 def has_executablebit():
67 fd, path = tempfile.mkstemp(prefix=tempprefix)
67 fd, path = tempfile.mkstemp(prefix=tempprefix)
68 os.close(fd)
68 os.close(fd)
69 try:
69 try:
70 s = os.lstat(path).st_mode
70 s = os.lstat(path).st_mode
71 os.chmod(path, s | 0100)
71 os.chmod(path, s | 0100)
72 return (os.lstat(path).st_mode & 0100 != 0)
72 return (os.lstat(path).st_mode & 0100 != 0)
73 finally:
73 finally:
74 os.remove(path)
74 os.remove(path)
75
75
76 def has_icasefs():
76 def has_icasefs():
77 # Stolen from mercurial.util
77 # Stolen from mercurial.util
78 fd, path = tempfile.mkstemp(prefix=tempprefix, dir='.')
78 fd, path = tempfile.mkstemp(prefix=tempprefix, dir='.')
79 os.close(fd)
79 os.close(fd)
80 try:
80 try:
81 s1 = os.stat(path)
81 s1 = os.stat(path)
82 d, b = os.path.split(path)
82 d, b = os.path.split(path)
83 p2 = os.path.join(d, b.upper())
83 p2 = os.path.join(d, b.upper())
84 if path == p2:
84 if path == p2:
85 p2 = os.path.join(d, b.lower())
85 p2 = os.path.join(d, b.lower())
86 try:
86 try:
87 s2 = os.stat(p2)
87 s2 = os.stat(p2)
88 return s2 == s1
88 return s2 == s1
89 except:
89 except:
90 return False
90 return False
91 finally:
91 finally:
92 os.remove(path)
92 os.remove(path)
93
93
94 def has_inotify():
94 def has_inotify():
95 try:
95 try:
96 import hgext.inotify.linux.watcher
96 import hgext.inotify.linux.watcher
97 return True
97 return True
98 except ImportError:
98 except ImportError:
99 return False
99 return False
100
100
101 def has_fifo():
101 def has_fifo():
102 return hasattr(os, "mkfifo")
102 return hasattr(os, "mkfifo")
103
103
104 def has_cacheable_fs():
104 def has_cacheable_fs():
105 from mercurial import util
105 from mercurial import util
106
106
107 fd, path = tempfile.mkstemp(prefix=tempprefix)
107 fd, path = tempfile.mkstemp(prefix=tempprefix)
108 os.close(fd)
108 os.close(fd)
109 try:
109 try:
110 return util.cachestat(path).cacheable()
110 return util.cachestat(path).cacheable()
111 finally:
111 finally:
112 os.remove(path)
112 os.remove(path)
113
113
114 def has_lsprof():
114 def has_lsprof():
115 try:
115 try:
116 import _lsprof
116 import _lsprof
117 return True
117 return True
118 except ImportError:
118 except ImportError:
119 return False
119 return False
120
120
121 def has_gettext():
121 def has_gettext():
122 return matchoutput('msgfmt --version', 'GNU gettext-tools')
122 return matchoutput('msgfmt --version', 'GNU gettext-tools')
123
123
124 def has_git():
124 def has_git():
125 return matchoutput('git --version 2>&1', r'^git version')
125 return matchoutput('git --version 2>&1', r'^git version')
126
126
127 def has_docutils():
127 def has_docutils():
128 try:
128 try:
129 from docutils.core import publish_cmdline
129 from docutils.core import publish_cmdline
130 return True
130 return True
131 except ImportError:
131 except ImportError:
132 return False
132 return False
133
133
134 def getsvnversion():
134 def getsvnversion():
135 m = matchoutput('svn --version 2>&1', r'^svn,\s+version\s+(\d+)\.(\d+)')
135 m = matchoutput('svn --version 2>&1', r'^svn,\s+version\s+(\d+)\.(\d+)')
136 if not m:
136 if not m:
137 return (0, 0)
137 return (0, 0)
138 return (int(m.group(1)), int(m.group(2)))
138 return (int(m.group(1)), int(m.group(2)))
139
139
140 def has_svn15():
140 def has_svn15():
141 return getsvnversion() >= (1, 5)
141 return getsvnversion() >= (1, 5)
142
142
143 def has_svn13():
143 def has_svn13():
144 return getsvnversion() >= (1, 3)
144 return getsvnversion() >= (1, 3)
145
145
146 def has_svn():
146 def has_svn():
147 return matchoutput('svn --version 2>&1', r'^svn, version') and \
147 return matchoutput('svn --version 2>&1', r'^svn, version') and \
148 matchoutput('svnadmin --version 2>&1', r'^svnadmin, version')
148 matchoutput('svnadmin --version 2>&1', r'^svnadmin, version')
149
149
150 def has_svn_bindings():
150 def has_svn_bindings():
151 try:
151 try:
152 import svn.core
152 import svn.core
153 version = svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR
153 version = svn.core.SVN_VER_MAJOR, svn.core.SVN_VER_MINOR
154 if version < (1, 4):
154 if version < (1, 4):
155 return False
155 return False
156 return True
156 return True
157 except ImportError:
157 except ImportError:
158 return False
158 return False
159
159
160 def has_p4():
160 def has_p4():
161 return matchoutput('p4 -V', r'Rev\. P4/') and matchoutput('p4d -V', r'Rev\. P4D/')
161 return matchoutput('p4 -V', r'Rev\. P4/') and matchoutput('p4d -V', r'Rev\. P4D/')
162
162
163 def has_symlink():
163 def has_symlink():
164 return hasattr(os, "symlink") # FIXME: should also check file system and os
164 return hasattr(os, "symlink") # FIXME: should also check file system and os
165
165
166 def has_tla():
166 def has_tla():
167 return matchoutput('tla --version 2>&1', r'The GNU Arch Revision')
167 return matchoutput('tla --version 2>&1', r'The GNU Arch Revision')
168
168
169 def has_gpg():
169 def has_gpg():
170 return matchoutput('gpg --version 2>&1', r'GnuPG')
170 return matchoutput('gpg --version 2>&1', r'GnuPG')
171
171
172 def has_unix_permissions():
172 def has_unix_permissions():
173 d = tempfile.mkdtemp(prefix=tempprefix, dir=".")
173 d = tempfile.mkdtemp(prefix=tempprefix, dir=".")
174 try:
174 try:
175 fname = os.path.join(d, 'foo')
175 fname = os.path.join(d, 'foo')
176 for umask in (077, 007, 022):
176 for umask in (077, 007, 022):
177 os.umask(umask)
177 os.umask(umask)
178 f = open(fname, 'w')
178 f = open(fname, 'w')
179 f.close()
179 f.close()
180 mode = os.stat(fname).st_mode
180 mode = os.stat(fname).st_mode
181 os.unlink(fname)
181 os.unlink(fname)
182 if mode & 0777 != ~umask & 0666:
182 if mode & 0777 != ~umask & 0666:
183 return False
183 return False
184 return True
184 return True
185 finally:
185 finally:
186 os.rmdir(d)
186 os.rmdir(d)
187
187
188 def has_pyflakes():
188 def has_pyflakes():
189 return matchoutput('echo "import re" 2>&1 | pyflakes',
189 return matchoutput('echo "import re" 2>&1 | pyflakes',
190 r"<stdin>:1: 're' imported but unused",
190 r"<stdin>:1: 're' imported but unused",
191 True)
191 True)
192
192
193 def has_pygments():
193 def has_pygments():
194 try:
194 try:
195 import pygments
195 import pygments
196 return True
196 return True
197 except ImportError:
197 except ImportError:
198 return False
198 return False
199
199
200 def has_outer_repo():
200 def has_outer_repo():
201 return matchoutput('hg root 2>&1', r'')
201 return matchoutput('hg root 2>&1', r'')
202
202
203 def has_ssl():
203 def has_ssl():
204 try:
204 try:
205 import ssl
205 import ssl
206 import OpenSSL
206 import OpenSSL
207 OpenSSL.SSL.Context
207 OpenSSL.SSL.Context
208 return True
208 return True
209 except ImportError:
209 except ImportError:
210 return False
210 return False
211
211
212 def has_windows():
212 def has_windows():
213 return os.name == 'nt'
213 return os.name == 'nt'
214
214
215 def has_system_sh():
215 def has_system_sh():
216 return os.name != 'nt'
216 return os.name != 'nt'
217
217
218 def has_serve():
219 return os.name != 'nt' # gross approximation
220
218 checks = {
221 checks = {
219 "baz": (has_baz, "GNU Arch baz client"),
222 "baz": (has_baz, "GNU Arch baz client"),
220 "bzr": (has_bzr, "Canonical's Bazaar client"),
223 "bzr": (has_bzr, "Canonical's Bazaar client"),
221 "bzr114": (has_bzr114, "Canonical's Bazaar client >= 1.14"),
224 "bzr114": (has_bzr114, "Canonical's Bazaar client >= 1.14"),
222 "cacheable": (has_cacheable_fs, "cacheable filesystem"),
225 "cacheable": (has_cacheable_fs, "cacheable filesystem"),
223 "cvs": (has_cvs, "cvs client/server"),
226 "cvs": (has_cvs, "cvs client/server"),
224 "darcs": (has_darcs, "darcs client"),
227 "darcs": (has_darcs, "darcs client"),
225 "docutils": (has_docutils, "Docutils text processing library"),
228 "docutils": (has_docutils, "Docutils text processing library"),
226 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
229 "eol-in-paths": (has_eol_in_paths, "end-of-lines in paths"),
227 "execbit": (has_executablebit, "executable bit"),
230 "execbit": (has_executablebit, "executable bit"),
228 "fifo": (has_fifo, "named pipes"),
231 "fifo": (has_fifo, "named pipes"),
229 "gettext": (has_gettext, "GNU Gettext (msgfmt)"),
232 "gettext": (has_gettext, "GNU Gettext (msgfmt)"),
230 "git": (has_git, "git command line client"),
233 "git": (has_git, "git command line client"),
231 "gpg": (has_gpg, "gpg client"),
234 "gpg": (has_gpg, "gpg client"),
232 "icasefs": (has_icasefs, "case insensitive file system"),
235 "icasefs": (has_icasefs, "case insensitive file system"),
233 "inotify": (has_inotify, "inotify extension support"),
236 "inotify": (has_inotify, "inotify extension support"),
234 "lsprof": (has_lsprof, "python lsprof module"),
237 "lsprof": (has_lsprof, "python lsprof module"),
235 "mtn": (has_mtn, "monotone client (>= 1.0)"),
238 "mtn": (has_mtn, "monotone client (>= 1.0)"),
236 "outer-repo": (has_outer_repo, "outer repo"),
239 "outer-repo": (has_outer_repo, "outer repo"),
237 "p4": (has_p4, "Perforce server and client"),
240 "p4": (has_p4, "Perforce server and client"),
238 "pyflakes": (has_pyflakes, "Pyflakes python linter"),
241 "pyflakes": (has_pyflakes, "Pyflakes python linter"),
239 "pygments": (has_pygments, "Pygments source highlighting library"),
242 "pygments": (has_pygments, "Pygments source highlighting library"),
243 "serve": (has_serve, "platform and python can manage 'hg serve -d'"),
240 "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"),
244 "ssl": (has_ssl, "python >= 2.6 ssl module and python OpenSSL"),
241 "svn": (has_svn, "subversion client and admin tools"),
245 "svn": (has_svn, "subversion client and admin tools"),
242 "svn13": (has_svn13, "subversion client and admin tools >= 1.3"),
246 "svn13": (has_svn13, "subversion client and admin tools >= 1.3"),
243 "svn15": (has_svn15, "subversion client and admin tools >= 1.5"),
247 "svn15": (has_svn15, "subversion client and admin tools >= 1.5"),
244 "svn-bindings": (has_svn_bindings, "subversion python bindings"),
248 "svn-bindings": (has_svn_bindings, "subversion python bindings"),
245 "symlink": (has_symlink, "symbolic links"),
249 "symlink": (has_symlink, "symbolic links"),
246 "system-sh": (has_system_sh, "system() uses sh"),
250 "system-sh": (has_system_sh, "system() uses sh"),
247 "tla": (has_tla, "GNU Arch tla client"),
251 "tla": (has_tla, "GNU Arch tla client"),
248 "unix-permissions": (has_unix_permissions, "unix-style permissions"),
252 "unix-permissions": (has_unix_permissions, "unix-style permissions"),
249 "windows": (has_windows, "Windows"),
253 "windows": (has_windows, "Windows"),
250 }
254 }
251
255
252 def list_features():
256 def list_features():
253 for name, feature in checks.iteritems():
257 for name, feature in checks.iteritems():
254 desc = feature[1]
258 desc = feature[1]
255 print name + ':', desc
259 print name + ':', desc
256
260
257 def test_features():
261 def test_features():
258 failed = 0
262 failed = 0
259 for name, feature in checks.iteritems():
263 for name, feature in checks.iteritems():
260 check, _ = feature
264 check, _ = feature
261 try:
265 try:
262 check()
266 check()
263 except Exception, e:
267 except Exception, e:
264 print "feature %s failed: %s" % (name, e)
268 print "feature %s failed: %s" % (name, e)
265 failed += 1
269 failed += 1
266 return failed
270 return failed
267
271
268 parser = optparse.OptionParser("%prog [options] [features]")
272 parser = optparse.OptionParser("%prog [options] [features]")
269 parser.add_option("--test-features", action="store_true",
273 parser.add_option("--test-features", action="store_true",
270 help="test available features")
274 help="test available features")
271 parser.add_option("--list-features", action="store_true",
275 parser.add_option("--list-features", action="store_true",
272 help="list available features")
276 help="list available features")
273 parser.add_option("-q", "--quiet", action="store_true",
277 parser.add_option("-q", "--quiet", action="store_true",
274 help="check features silently")
278 help="check features silently")
275
279
276 if __name__ == '__main__':
280 if __name__ == '__main__':
277 options, args = parser.parse_args()
281 options, args = parser.parse_args()
278 if options.list_features:
282 if options.list_features:
279 list_features()
283 list_features()
280 sys.exit(0)
284 sys.exit(0)
281
285
282 if options.test_features:
286 if options.test_features:
283 sys.exit(test_features())
287 sys.exit(test_features())
284
288
285 quiet = options.quiet
289 quiet = options.quiet
286
290
287 failures = 0
291 failures = 0
288
292
289 def error(msg):
293 def error(msg):
290 global failures
294 global failures
291 if not quiet:
295 if not quiet:
292 sys.stderr.write(msg + '\n')
296 sys.stderr.write(msg + '\n')
293 failures += 1
297 failures += 1
294
298
295 for feature in args:
299 for feature in args:
296 negate = feature.startswith('no-')
300 negate = feature.startswith('no-')
297 if negate:
301 if negate:
298 feature = feature[3:]
302 feature = feature[3:]
299
303
300 if feature not in checks:
304 if feature not in checks:
301 error('skipped: unknown feature: ' + feature)
305 error('skipped: unknown feature: ' + feature)
302 continue
306 continue
303
307
304 check, desc = checks[feature]
308 check, desc = checks[feature]
305 try:
309 try:
306 available = check()
310 available = check()
307 except Exception, e:
311 except Exception, e:
308 error('hghave check failed: ' + feature)
312 error('hghave check failed: ' + feature)
309 continue
313 continue
310
314
311 if not negate and not available:
315 if not negate and not available:
312 error('skipped: missing feature: ' + desc)
316 error('skipped: missing feature: ' + desc)
313 elif negate and available:
317 elif negate and available:
314 error('skipped: system supports %s' % desc)
318 error('skipped: system supports %s' % desc)
315
319
316 if failures != 0:
320 if failures != 0:
317 sys.exit(1)
321 sys.exit(1)
@@ -1,265 +1,267 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ hg init test
3 $ hg init test
2 $ cd test
4 $ cd test
3 $ echo foo>foo
5 $ echo foo>foo
4 $ hg commit -Am 1 -d '1 0'
6 $ hg commit -Am 1 -d '1 0'
5 adding foo
7 adding foo
6 $ echo bar>bar
8 $ echo bar>bar
7 $ hg commit -Am 2 -d '2 0'
9 $ hg commit -Am 2 -d '2 0'
8 adding bar
10 adding bar
9 $ mkdir baz
11 $ mkdir baz
10 $ echo bletch>baz/bletch
12 $ echo bletch>baz/bletch
11 $ hg commit -Am 3 -d '1000000000 0'
13 $ hg commit -Am 3 -d '1000000000 0'
12 adding baz/bletch
14 adding baz/bletch
13 $ echo "[web]" >> .hg/hgrc
15 $ echo "[web]" >> .hg/hgrc
14 $ echo "name = test-archive" >> .hg/hgrc
16 $ echo "name = test-archive" >> .hg/hgrc
15 $ cp .hg/hgrc .hg/hgrc-base
17 $ cp .hg/hgrc .hg/hgrc-base
16 > test_archtype() {
18 > test_archtype() {
17 > echo "allow_archive = $1" >> .hg/hgrc
19 > echo "allow_archive = $1" >> .hg/hgrc
18 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
20 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
19 > cat hg.pid >> $DAEMON_PIDS
21 > cat hg.pid >> $DAEMON_PIDS
20 > echo % $1 allowed should give 200
22 > echo % $1 allowed should give 200
21 > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$2" | head -n 1
23 > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$2" | head -n 1
22 > echo % $3 and $4 disallowed should both give 403
24 > echo % $3 and $4 disallowed should both give 403
23 > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$3" | head -n 1
25 > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$3" | head -n 1
24 > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$4" | head -n 1
26 > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$4" | head -n 1
25 > "$TESTDIR/killdaemons.py"
27 > "$TESTDIR/killdaemons.py"
26 > cat errors.log
28 > cat errors.log
27 > cp .hg/hgrc-base .hg/hgrc
29 > cp .hg/hgrc-base .hg/hgrc
28 > }
30 > }
29
31
30 check http return codes
32 check http return codes
31
33
32 $ test_archtype gz tar.gz tar.bz2 zip
34 $ test_archtype gz tar.gz tar.bz2 zip
33 % gz allowed should give 200
35 % gz allowed should give 200
34 200 Script output follows
36 200 Script output follows
35 % tar.bz2 and zip disallowed should both give 403
37 % tar.bz2 and zip disallowed should both give 403
36 403 Archive type not allowed: bz2
38 403 Archive type not allowed: bz2
37 403 Archive type not allowed: zip
39 403 Archive type not allowed: zip
38 $ test_archtype bz2 tar.bz2 zip tar.gz
40 $ test_archtype bz2 tar.bz2 zip tar.gz
39 % bz2 allowed should give 200
41 % bz2 allowed should give 200
40 200 Script output follows
42 200 Script output follows
41 % zip and tar.gz disallowed should both give 403
43 % zip and tar.gz disallowed should both give 403
42 403 Archive type not allowed: zip
44 403 Archive type not allowed: zip
43 403 Archive type not allowed: gz
45 403 Archive type not allowed: gz
44 $ test_archtype zip zip tar.gz tar.bz2
46 $ test_archtype zip zip tar.gz tar.bz2
45 % zip allowed should give 200
47 % zip allowed should give 200
46 200 Script output follows
48 200 Script output follows
47 % tar.gz and tar.bz2 disallowed should both give 403
49 % tar.gz and tar.bz2 disallowed should both give 403
48 403 Archive type not allowed: gz
50 403 Archive type not allowed: gz
49 403 Archive type not allowed: bz2
51 403 Archive type not allowed: bz2
50
52
51 $ echo "allow_archive = gz bz2 zip" >> .hg/hgrc
53 $ echo "allow_archive = gz bz2 zip" >> .hg/hgrc
52 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
54 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
53 $ cat hg.pid >> $DAEMON_PIDS
55 $ cat hg.pid >> $DAEMON_PIDS
54
56
55 invalid arch type should give 404
57 invalid arch type should give 404
56
58
57 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.invalid" | head -n 1
59 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.invalid" | head -n 1
58 404 Unsupported archive type: None
60 404 Unsupported archive type: None
59
61
60 $ TIP=`hg id -v | cut -f1 -d' '`
62 $ TIP=`hg id -v | cut -f1 -d' '`
61 $ QTIP=`hg id -q`
63 $ QTIP=`hg id -q`
62 $ cat > getarchive.py <<EOF
64 $ cat > getarchive.py <<EOF
63 > import os, sys, urllib2
65 > import os, sys, urllib2
64 > try:
66 > try:
65 > # Set stdout to binary mode for win32 platforms
67 > # Set stdout to binary mode for win32 platforms
66 > import msvcrt
68 > import msvcrt
67 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
69 > msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
68 > except ImportError:
70 > except ImportError:
69 > pass
71 > pass
70 > node, archive = sys.argv[1:]
72 > node, archive = sys.argv[1:]
71 > f = urllib2.urlopen('http://127.0.0.1:%s/?cmd=archive;node=%s;type=%s'
73 > f = urllib2.urlopen('http://127.0.0.1:%s/?cmd=archive;node=%s;type=%s'
72 > % (os.environ['HGPORT'], node, archive))
74 > % (os.environ['HGPORT'], node, archive))
73 > sys.stdout.write(f.read())
75 > sys.stdout.write(f.read())
74 > EOF
76 > EOF
75 $ python getarchive.py "$TIP" gz | gunzip | tar tf - 2>/dev/null
77 $ python getarchive.py "$TIP" gz | gunzip | tar tf - 2>/dev/null
76 test-archive-2c0277f05ed4/.hg_archival.txt
78 test-archive-2c0277f05ed4/.hg_archival.txt
77 test-archive-2c0277f05ed4/bar
79 test-archive-2c0277f05ed4/bar
78 test-archive-2c0277f05ed4/baz/bletch
80 test-archive-2c0277f05ed4/baz/bletch
79 test-archive-2c0277f05ed4/foo
81 test-archive-2c0277f05ed4/foo
80 $ python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - 2>/dev/null
82 $ python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - 2>/dev/null
81 test-archive-2c0277f05ed4/.hg_archival.txt
83 test-archive-2c0277f05ed4/.hg_archival.txt
82 test-archive-2c0277f05ed4/bar
84 test-archive-2c0277f05ed4/bar
83 test-archive-2c0277f05ed4/baz/bletch
85 test-archive-2c0277f05ed4/baz/bletch
84 test-archive-2c0277f05ed4/foo
86 test-archive-2c0277f05ed4/foo
85 $ python getarchive.py "$TIP" zip > archive.zip
87 $ python getarchive.py "$TIP" zip > archive.zip
86 $ unzip -t archive.zip
88 $ unzip -t archive.zip
87 Archive: archive.zip
89 Archive: archive.zip
88 testing: test-archive-2c0277f05ed4/.hg_archival.txt OK
90 testing: test-archive-2c0277f05ed4/.hg_archival.txt OK
89 testing: test-archive-2c0277f05ed4/bar OK
91 testing: test-archive-2c0277f05ed4/bar OK
90 testing: test-archive-2c0277f05ed4/baz/bletch OK
92 testing: test-archive-2c0277f05ed4/baz/bletch OK
91 testing: test-archive-2c0277f05ed4/foo OK
93 testing: test-archive-2c0277f05ed4/foo OK
92 No errors detected in compressed data of archive.zip.
94 No errors detected in compressed data of archive.zip.
93
95
94 $ "$TESTDIR/killdaemons.py"
96 $ "$TESTDIR/killdaemons.py"
95
97
96 $ hg archive -t tar test.tar
98 $ hg archive -t tar test.tar
97 $ tar tf test.tar
99 $ tar tf test.tar
98 test/.hg_archival.txt
100 test/.hg_archival.txt
99 test/bar
101 test/bar
100 test/baz/bletch
102 test/baz/bletch
101 test/foo
103 test/foo
102
104
103 $ hg archive -t tbz2 -X baz test.tar.bz2
105 $ hg archive -t tbz2 -X baz test.tar.bz2
104 $ bunzip2 -dc test.tar.bz2 | tar tf - 2>/dev/null
106 $ bunzip2 -dc test.tar.bz2 | tar tf - 2>/dev/null
105 test/.hg_archival.txt
107 test/.hg_archival.txt
106 test/bar
108 test/bar
107 test/foo
109 test/foo
108
110
109 $ hg archive -t tgz -p %b-%h test-%h.tar.gz
111 $ hg archive -t tgz -p %b-%h test-%h.tar.gz
110 $ gzip -dc test-$QTIP.tar.gz | tar tf - 2>/dev/null
112 $ gzip -dc test-$QTIP.tar.gz | tar tf - 2>/dev/null
111 test-2c0277f05ed4/.hg_archival.txt
113 test-2c0277f05ed4/.hg_archival.txt
112 test-2c0277f05ed4/bar
114 test-2c0277f05ed4/bar
113 test-2c0277f05ed4/baz/bletch
115 test-2c0277f05ed4/baz/bletch
114 test-2c0277f05ed4/foo
116 test-2c0277f05ed4/foo
115
117
116 $ hg archive autodetected_test.tar
118 $ hg archive autodetected_test.tar
117 $ tar tf autodetected_test.tar
119 $ tar tf autodetected_test.tar
118 autodetected_test/.hg_archival.txt
120 autodetected_test/.hg_archival.txt
119 autodetected_test/bar
121 autodetected_test/bar
120 autodetected_test/baz/bletch
122 autodetected_test/baz/bletch
121 autodetected_test/foo
123 autodetected_test/foo
122
124
123 The '-t' should override autodetection
125 The '-t' should override autodetection
124
126
125 $ hg archive -t tar autodetect_override_test.zip
127 $ hg archive -t tar autodetect_override_test.zip
126 $ tar tf autodetect_override_test.zip
128 $ tar tf autodetect_override_test.zip
127 autodetect_override_test.zip/.hg_archival.txt
129 autodetect_override_test.zip/.hg_archival.txt
128 autodetect_override_test.zip/bar
130 autodetect_override_test.zip/bar
129 autodetect_override_test.zip/baz/bletch
131 autodetect_override_test.zip/baz/bletch
130 autodetect_override_test.zip/foo
132 autodetect_override_test.zip/foo
131
133
132 $ for ext in tar tar.gz tgz tar.bz2 tbz2 zip; do
134 $ for ext in tar tar.gz tgz tar.bz2 tbz2 zip; do
133 > hg archive auto_test.$ext
135 > hg archive auto_test.$ext
134 > if [ -d auto_test.$ext ]; then
136 > if [ -d auto_test.$ext ]; then
135 > echo "extension $ext was not autodetected."
137 > echo "extension $ext was not autodetected."
136 > fi
138 > fi
137 > done
139 > done
138
140
139 $ cat > md5comp.py <<EOF
141 $ cat > md5comp.py <<EOF
140 > try:
142 > try:
141 > from hashlib import md5
143 > from hashlib import md5
142 > except ImportError:
144 > except ImportError:
143 > from md5 import md5
145 > from md5 import md5
144 > import sys
146 > import sys
145 > f1, f2 = sys.argv[1:3]
147 > f1, f2 = sys.argv[1:3]
146 > h1 = md5(file(f1, 'rb').read()).hexdigest()
148 > h1 = md5(file(f1, 'rb').read()).hexdigest()
147 > h2 = md5(file(f2, 'rb').read()).hexdigest()
149 > h2 = md5(file(f2, 'rb').read()).hexdigest()
148 > print h1 == h2 or "md5 differ: " + repr((h1, h2))
150 > print h1 == h2 or "md5 differ: " + repr((h1, h2))
149 > EOF
151 > EOF
150
152
151 archive name is stored in the archive, so create similar archives and
153 archive name is stored in the archive, so create similar archives and
152 rename them afterwards.
154 rename them afterwards.
153
155
154 $ hg archive -t tgz tip.tar.gz
156 $ hg archive -t tgz tip.tar.gz
155 $ mv tip.tar.gz tip1.tar.gz
157 $ mv tip.tar.gz tip1.tar.gz
156 $ sleep 1
158 $ sleep 1
157 $ hg archive -t tgz tip.tar.gz
159 $ hg archive -t tgz tip.tar.gz
158 $ mv tip.tar.gz tip2.tar.gz
160 $ mv tip.tar.gz tip2.tar.gz
159 $ python md5comp.py tip1.tar.gz tip2.tar.gz
161 $ python md5comp.py tip1.tar.gz tip2.tar.gz
160 True
162 True
161
163
162 $ hg archive -t zip -p /illegal test.zip
164 $ hg archive -t zip -p /illegal test.zip
163 abort: archive prefix contains illegal components
165 abort: archive prefix contains illegal components
164 [255]
166 [255]
165 $ hg archive -t zip -p very/../bad test.zip
167 $ hg archive -t zip -p very/../bad test.zip
166
168
167 $ hg archive --config ui.archivemeta=false -t zip -r 2 test.zip
169 $ hg archive --config ui.archivemeta=false -t zip -r 2 test.zip
168 $ unzip -t test.zip
170 $ unzip -t test.zip
169 Archive: test.zip
171 Archive: test.zip
170 testing: test/bar OK
172 testing: test/bar OK
171 testing: test/baz/bletch OK
173 testing: test/baz/bletch OK
172 testing: test/foo OK
174 testing: test/foo OK
173 No errors detected in compressed data of test.zip.
175 No errors detected in compressed data of test.zip.
174
176
175 $ hg archive -t tar - | tar tf - 2>/dev/null
177 $ hg archive -t tar - | tar tf - 2>/dev/null
176 test-2c0277f05ed4/.hg_archival.txt
178 test-2c0277f05ed4/.hg_archival.txt
177 test-2c0277f05ed4/bar
179 test-2c0277f05ed4/bar
178 test-2c0277f05ed4/baz/bletch
180 test-2c0277f05ed4/baz/bletch
179 test-2c0277f05ed4/foo
181 test-2c0277f05ed4/foo
180
182
181 $ hg archive -r 0 -t tar rev-%r.tar
183 $ hg archive -r 0 -t tar rev-%r.tar
182 $ if [ -f rev-0.tar ]; then
184 $ if [ -f rev-0.tar ]; then
183 $ fi
185 $ fi
184
186
185 test .hg_archival.txt
187 test .hg_archival.txt
186
188
187 $ hg archive ../test-tags
189 $ hg archive ../test-tags
188 $ cat ../test-tags/.hg_archival.txt
190 $ cat ../test-tags/.hg_archival.txt
189 repo: daa7f7c60e0a224faa4ff77ca41b2760562af264
191 repo: daa7f7c60e0a224faa4ff77ca41b2760562af264
190 node: 2c0277f05ed49d1c8328fb9ba92fba7a5ebcb33e
192 node: 2c0277f05ed49d1c8328fb9ba92fba7a5ebcb33e
191 branch: default
193 branch: default
192 latesttag: null
194 latesttag: null
193 latesttagdistance: 3
195 latesttagdistance: 3
194 $ hg tag -r 2 mytag
196 $ hg tag -r 2 mytag
195 $ hg tag -r 2 anothertag
197 $ hg tag -r 2 anothertag
196 $ hg archive -r 2 ../test-lasttag
198 $ hg archive -r 2 ../test-lasttag
197 $ cat ../test-lasttag/.hg_archival.txt
199 $ cat ../test-lasttag/.hg_archival.txt
198 repo: daa7f7c60e0a224faa4ff77ca41b2760562af264
200 repo: daa7f7c60e0a224faa4ff77ca41b2760562af264
199 node: 2c0277f05ed49d1c8328fb9ba92fba7a5ebcb33e
201 node: 2c0277f05ed49d1c8328fb9ba92fba7a5ebcb33e
200 branch: default
202 branch: default
201 tag: anothertag
203 tag: anothertag
202 tag: mytag
204 tag: mytag
203
205
204 $ hg archive -t bogus test.bogus
206 $ hg archive -t bogus test.bogus
205 abort: unknown archive type 'bogus'
207 abort: unknown archive type 'bogus'
206 [255]
208 [255]
207
209
208 enable progress extension:
210 enable progress extension:
209
211
210 $ cp $HGRCPATH $HGRCPATH.no-progress
212 $ cp $HGRCPATH $HGRCPATH.no-progress
211 $ cat >> $HGRCPATH <<EOF
213 $ cat >> $HGRCPATH <<EOF
212 > [extensions]
214 > [extensions]
213 > progress =
215 > progress =
214 > [progress]
216 > [progress]
215 > assume-tty = 1
217 > assume-tty = 1
216 > format = topic bar number
218 > format = topic bar number
217 > delay = 0
219 > delay = 0
218 > refresh = 0
220 > refresh = 0
219 > width = 60
221 > width = 60
220 > EOF
222 > EOF
221
223
222 $ hg archive ../with-progress 2>&1 | $TESTDIR/filtercr.py
224 $ hg archive ../with-progress 2>&1 | $TESTDIR/filtercr.py
223
225
224 archiving [ ] 0/4
226 archiving [ ] 0/4
225 archiving [ ] 0/4
227 archiving [ ] 0/4
226 archiving [=========> ] 1/4
228 archiving [=========> ] 1/4
227 archiving [=========> ] 1/4
229 archiving [=========> ] 1/4
228 archiving [====================> ] 2/4
230 archiving [====================> ] 2/4
229 archiving [====================> ] 2/4
231 archiving [====================> ] 2/4
230 archiving [===============================> ] 3/4
232 archiving [===============================> ] 3/4
231 archiving [===============================> ] 3/4
233 archiving [===============================> ] 3/4
232 archiving [==========================================>] 4/4
234 archiving [==========================================>] 4/4
233 archiving [==========================================>] 4/4
235 archiving [==========================================>] 4/4
234 \r (esc)
236 \r (esc)
235
237
236 cleanup after progress extension test:
238 cleanup after progress extension test:
237
239
238 $ cp $HGRCPATH.no-progress $HGRCPATH
240 $ cp $HGRCPATH.no-progress $HGRCPATH
239
241
240 server errors
242 server errors
241
243
242 $ cat errors.log
244 $ cat errors.log
243
245
244 empty repo
246 empty repo
245
247
246 $ hg init ../empty
248 $ hg init ../empty
247 $ cd ../empty
249 $ cd ../empty
248 $ hg archive ../test-empty
250 $ hg archive ../test-empty
249 abort: no working directory: please specify a revision
251 abort: no working directory: please specify a revision
250 [255]
252 [255]
251
253
252 old file -- date clamped to 1980
254 old file -- date clamped to 1980
253
255
254 $ touch -t 197501010000 old
256 $ touch -t 197501010000 old
255 $ hg add old
257 $ hg add old
256 $ hg commit -m old
258 $ hg commit -m old
257 $ hg archive ../old.zip
259 $ hg archive ../old.zip
258 $ unzip -l ../old.zip
260 $ unzip -l ../old.zip
259 Archive: ../old.zip
261 Archive: ../old.zip
260 \s*Length.* (re)
262 \s*Length.* (re)
261 *-----* (glob)
263 *-----* (glob)
262 *147*80*00:00*old/.hg_archival.txt (glob)
264 *147*80*00:00*old/.hg_archival.txt (glob)
263 *0*80*00:00*old/old (glob)
265 *0*80*00:00*old/old (glob)
264 *-----* (glob)
266 *-----* (glob)
265 \s*147\s+2 files (re)
267 \s*147\s+2 files (re)
@@ -1,30 +1,32 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ hg clone http://localhost:$HGPORT/ copy
3 $ hg clone http://localhost:$HGPORT/ copy
2 abort: error: Connection refused
4 abort: error: Connection refused
3 [255]
5 [255]
4
6
5 $ test -d copy || echo copy: No such file or directory
7 $ test -d copy || echo copy: No such file or directory
6 copy: No such file or directory
8 copy: No such file or directory
7
9
8 $ cat > dumb.py <<EOF
10 $ cat > dumb.py <<EOF
9 > import BaseHTTPServer, SimpleHTTPServer, os, signal
11 > import BaseHTTPServer, SimpleHTTPServer, os, signal
10 > def run(server_class=BaseHTTPServer.HTTPServer,
12 > def run(server_class=BaseHTTPServer.HTTPServer,
11 > handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
13 > handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
12 > server_address = ('localhost', int(os.environ['HGPORT']))
14 > server_address = ('localhost', int(os.environ['HGPORT']))
13 > httpd = server_class(server_address, handler_class)
15 > httpd = server_class(server_address, handler_class)
14 > httpd.serve_forever()
16 > httpd.serve_forever()
15 > signal.signal(signal.SIGTERM, lambda x: sys.exit(0))
17 > signal.signal(signal.SIGTERM, lambda x: sys.exit(0))
16 > run()
18 > run()
17 > EOF
19 > EOF
18
20
19 $ python dumb.py 2>/dev/null &
21 $ python dumb.py 2>/dev/null &
20 $ echo $! >> $DAEMON_PIDS
22 $ echo $! >> $DAEMON_PIDS
21
23
22 give the server some time to start running
24 give the server some time to start running
23
25
24 $ sleep 1
26 $ sleep 1
25
27
26 $ hg clone http://localhost:$HGPORT/foo copy2 2>&1
28 $ hg clone http://localhost:$HGPORT/foo copy2 2>&1
27 abort: HTTP Error 404: * (glob)
29 abort: HTTP Error 404: * (glob)
28 [255]
30 [255]
29
31
30 $ kill $!
32 $ kill $!
@@ -1,193 +1,195 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 initialize
3 initialize
2
4
3 $ hg init a
5 $ hg init a
4 $ cd a
6 $ cd a
5 $ echo 'test' > test
7 $ echo 'test' > test
6 $ hg commit -Am'test'
8 $ hg commit -Am'test'
7 adding test
9 adding test
8
10
9 set bookmarks
11 set bookmarks
10
12
11 $ hg bookmark X
13 $ hg bookmark X
12 $ hg bookmark Y
14 $ hg bookmark Y
13 $ hg bookmark Z
15 $ hg bookmark Z
14
16
15 import bookmark by name
17 import bookmark by name
16
18
17 $ hg init ../b
19 $ hg init ../b
18 $ cd ../b
20 $ cd ../b
19 $ hg book Y
21 $ hg book Y
20 $ hg book
22 $ hg book
21 * Y -1:000000000000
23 * Y -1:000000000000
22 $ hg pull ../a
24 $ hg pull ../a
23 pulling from ../a
25 pulling from ../a
24 requesting all changes
26 requesting all changes
25 adding changesets
27 adding changesets
26 adding manifests
28 adding manifests
27 adding file changes
29 adding file changes
28 added 1 changesets with 1 changes to 1 files
30 added 1 changesets with 1 changes to 1 files
29 updating bookmark Y
31 updating bookmark Y
30 (run 'hg update' to get a working copy)
32 (run 'hg update' to get a working copy)
31 $ hg bookmarks
33 $ hg bookmarks
32 Y 0:4e3505fd9583
34 Y 0:4e3505fd9583
33 $ hg debugpushkey ../a namespaces
35 $ hg debugpushkey ../a namespaces
34 bookmarks
36 bookmarks
35 namespaces
37 namespaces
36 $ hg debugpushkey ../a bookmarks
38 $ hg debugpushkey ../a bookmarks
37 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
39 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
38 X 4e3505fd95835d721066b76e75dbb8cc554d7f77
40 X 4e3505fd95835d721066b76e75dbb8cc554d7f77
39 Z 4e3505fd95835d721066b76e75dbb8cc554d7f77
41 Z 4e3505fd95835d721066b76e75dbb8cc554d7f77
40 $ hg pull -B X ../a
42 $ hg pull -B X ../a
41 pulling from ../a
43 pulling from ../a
42 no changes found
44 no changes found
43 importing bookmark X
45 importing bookmark X
44 $ hg bookmark
46 $ hg bookmark
45 X 0:4e3505fd9583
47 X 0:4e3505fd9583
46 Y 0:4e3505fd9583
48 Y 0:4e3505fd9583
47
49
48 export bookmark by name
50 export bookmark by name
49
51
50 $ hg bookmark W
52 $ hg bookmark W
51 $ hg bookmark foo
53 $ hg bookmark foo
52 $ hg bookmark foobar
54 $ hg bookmark foobar
53 $ hg push -B W ../a
55 $ hg push -B W ../a
54 pushing to ../a
56 pushing to ../a
55 searching for changes
57 searching for changes
56 no changes found
58 no changes found
57 exporting bookmark W
59 exporting bookmark W
58 $ hg -R ../a bookmarks
60 $ hg -R ../a bookmarks
59 W -1:000000000000
61 W -1:000000000000
60 X 0:4e3505fd9583
62 X 0:4e3505fd9583
61 Y 0:4e3505fd9583
63 Y 0:4e3505fd9583
62 * Z 0:4e3505fd9583
64 * Z 0:4e3505fd9583
63
65
64 delete a remote bookmark
66 delete a remote bookmark
65
67
66 $ hg book -d W
68 $ hg book -d W
67 $ hg push -B W ../a
69 $ hg push -B W ../a
68 pushing to ../a
70 pushing to ../a
69 searching for changes
71 searching for changes
70 no changes found
72 no changes found
71 deleting remote bookmark W
73 deleting remote bookmark W
72
74
73 push/pull name that doesn't exist
75 push/pull name that doesn't exist
74
76
75 $ hg push -B badname ../a
77 $ hg push -B badname ../a
76 pushing to ../a
78 pushing to ../a
77 searching for changes
79 searching for changes
78 no changes found
80 no changes found
79 bookmark badname does not exist on the local or remote repository!
81 bookmark badname does not exist on the local or remote repository!
80 [2]
82 [2]
81 $ hg pull -B anotherbadname ../a
83 $ hg pull -B anotherbadname ../a
82 pulling from ../a
84 pulling from ../a
83 abort: remote bookmark anotherbadname not found!
85 abort: remote bookmark anotherbadname not found!
84 [255]
86 [255]
85
87
86 divergent bookmarks
88 divergent bookmarks
87
89
88 $ cd ../a
90 $ cd ../a
89 $ echo c1 > f1
91 $ echo c1 > f1
90 $ hg ci -Am1
92 $ hg ci -Am1
91 adding f1
93 adding f1
92 $ hg book -f X
94 $ hg book -f X
93 $ hg book
95 $ hg book
94 * X 1:0d2164f0ce0d
96 * X 1:0d2164f0ce0d
95 Y 0:4e3505fd9583
97 Y 0:4e3505fd9583
96 Z 1:0d2164f0ce0d
98 Z 1:0d2164f0ce0d
97
99
98 $ cd ../b
100 $ cd ../b
99 $ hg up
101 $ hg up
100 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
102 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
101 $ echo c2 > f2
103 $ echo c2 > f2
102 $ hg ci -Am2
104 $ hg ci -Am2
103 adding f2
105 adding f2
104 $ hg book -f X
106 $ hg book -f X
105 $ hg book
107 $ hg book
106 * X 1:9b140be10808
108 * X 1:9b140be10808
107 Y 0:4e3505fd9583
109 Y 0:4e3505fd9583
108 foo -1:000000000000
110 foo -1:000000000000
109 foobar -1:000000000000
111 foobar -1:000000000000
110
112
111 $ hg pull ../a
113 $ hg pull ../a
112 pulling from ../a
114 pulling from ../a
113 searching for changes
115 searching for changes
114 adding changesets
116 adding changesets
115 adding manifests
117 adding manifests
116 adding file changes
118 adding file changes
117 added 1 changesets with 1 changes to 1 files (+1 heads)
119 added 1 changesets with 1 changes to 1 files (+1 heads)
118 not updating divergent bookmark X
120 not updating divergent bookmark X
119 (run 'hg heads' to see heads, 'hg merge' to merge)
121 (run 'hg heads' to see heads, 'hg merge' to merge)
120 $ hg book
122 $ hg book
121 * X 1:9b140be10808
123 * X 1:9b140be10808
122 Y 0:4e3505fd9583
124 Y 0:4e3505fd9583
123 foo -1:000000000000
125 foo -1:000000000000
124 foobar -1:000000000000
126 foobar -1:000000000000
125 $ hg push -f ../a
127 $ hg push -f ../a
126 pushing to ../a
128 pushing to ../a
127 searching for changes
129 searching for changes
128 adding changesets
130 adding changesets
129 adding manifests
131 adding manifests
130 adding file changes
132 adding file changes
131 added 1 changesets with 1 changes to 1 files (+1 heads)
133 added 1 changesets with 1 changes to 1 files (+1 heads)
132 $ hg -R ../a book
134 $ hg -R ../a book
133 * X 1:0d2164f0ce0d
135 * X 1:0d2164f0ce0d
134 Y 0:4e3505fd9583
136 Y 0:4e3505fd9583
135 Z 1:0d2164f0ce0d
137 Z 1:0d2164f0ce0d
136
138
137 hgweb
139 hgweb
138
140
139 $ cat <<EOF > .hg/hgrc
141 $ cat <<EOF > .hg/hgrc
140 > [web]
142 > [web]
141 > push_ssl = false
143 > push_ssl = false
142 > allow_push = *
144 > allow_push = *
143 > EOF
145 > EOF
144
146
145 $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
147 $ hg serve -p $HGPORT -d --pid-file=../hg.pid -E errors.log
146 $ cat ../hg.pid >> $DAEMON_PIDS
148 $ cat ../hg.pid >> $DAEMON_PIDS
147 $ cd ../a
149 $ cd ../a
148
150
149 $ hg debugpushkey http://localhost:$HGPORT/ namespaces
151 $ hg debugpushkey http://localhost:$HGPORT/ namespaces
150 bookmarks
152 bookmarks
151 namespaces
153 namespaces
152 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
154 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
153 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
155 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
154 X 9b140be1080824d768c5a4691a564088eede71f9
156 X 9b140be1080824d768c5a4691a564088eede71f9
155 foo 0000000000000000000000000000000000000000
157 foo 0000000000000000000000000000000000000000
156 foobar 0000000000000000000000000000000000000000
158 foobar 0000000000000000000000000000000000000000
157 $ hg out -B http://localhost:$HGPORT/
159 $ hg out -B http://localhost:$HGPORT/
158 comparing with http://localhost:$HGPORT/
160 comparing with http://localhost:$HGPORT/
159 searching for changed bookmarks
161 searching for changed bookmarks
160 Z 0d2164f0ce0d
162 Z 0d2164f0ce0d
161 $ hg push -B Z http://localhost:$HGPORT/
163 $ hg push -B Z http://localhost:$HGPORT/
162 pushing to http://localhost:$HGPORT/
164 pushing to http://localhost:$HGPORT/
163 searching for changes
165 searching for changes
164 no changes found
166 no changes found
165 exporting bookmark Z
167 exporting bookmark Z
166 $ hg book -d Z
168 $ hg book -d Z
167 $ hg in -B http://localhost:$HGPORT/
169 $ hg in -B http://localhost:$HGPORT/
168 comparing with http://localhost:$HGPORT/
170 comparing with http://localhost:$HGPORT/
169 searching for changed bookmarks
171 searching for changed bookmarks
170 Z 0d2164f0ce0d
172 Z 0d2164f0ce0d
171 foo 000000000000
173 foo 000000000000
172 foobar 000000000000
174 foobar 000000000000
173 $ hg pull -B Z http://localhost:$HGPORT/
175 $ hg pull -B Z http://localhost:$HGPORT/
174 pulling from http://localhost:$HGPORT/
176 pulling from http://localhost:$HGPORT/
175 no changes found
177 no changes found
176 not updating divergent bookmark X
178 not updating divergent bookmark X
177 importing bookmark Z
179 importing bookmark Z
178 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
180 $ hg clone http://localhost:$HGPORT/ cloned-bookmarks
179 requesting all changes
181 requesting all changes
180 adding changesets
182 adding changesets
181 adding manifests
183 adding manifests
182 adding file changes
184 adding file changes
183 added 3 changesets with 3 changes to 3 files (+1 heads)
185 added 3 changesets with 3 changes to 3 files (+1 heads)
184 updating to branch default
186 updating to branch default
185 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
187 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
186 $ hg -R cloned-bookmarks bookmarks
188 $ hg -R cloned-bookmarks bookmarks
187 X 1:9b140be10808
189 X 1:9b140be10808
188 Y 0:4e3505fd9583
190 Y 0:4e3505fd9583
189 Z 2:0d2164f0ce0d
191 Z 2:0d2164f0ce0d
190 foo -1:000000000000
192 foo -1:000000000000
191 foobar -1:000000000000
193 foobar -1:000000000000
192
194
193 $ kill `cat ../hg.pid`
195 $ kill `cat ../hg.pid`
@@ -1,405 +1,407 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
2 $ echo "fetch=" >> $HGRCPATH
4 $ echo "fetch=" >> $HGRCPATH
3
5
4 test fetch with default branches only
6 test fetch with default branches only
5
7
6 $ hg init a
8 $ hg init a
7 $ echo a > a/a
9 $ echo a > a/a
8 $ hg --cwd a commit -Ama
10 $ hg --cwd a commit -Ama
9 adding a
11 adding a
10 $ hg clone a b
12 $ hg clone a b
11 updating to branch default
13 updating to branch default
12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
14 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13 $ hg clone a c
15 $ hg clone a c
14 updating to branch default
16 updating to branch default
15 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 $ echo b > a/b
18 $ echo b > a/b
17 $ hg --cwd a commit -Amb
19 $ hg --cwd a commit -Amb
18 adding b
20 adding b
19 $ hg --cwd a parents -q
21 $ hg --cwd a parents -q
20 1:d2ae7f538514
22 1:d2ae7f538514
21
23
22 should pull one change
24 should pull one change
23
25
24 $ hg --cwd b fetch ../a
26 $ hg --cwd b fetch ../a
25 pulling from ../a
27 pulling from ../a
26 searching for changes
28 searching for changes
27 adding changesets
29 adding changesets
28 adding manifests
30 adding manifests
29 adding file changes
31 adding file changes
30 added 1 changesets with 1 changes to 1 files
32 added 1 changesets with 1 changes to 1 files
31 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32 $ hg --cwd b parents -q
34 $ hg --cwd b parents -q
33 1:d2ae7f538514
35 1:d2ae7f538514
34 $ echo c > c/c
36 $ echo c > c/c
35 $ hg --cwd c commit -Amc
37 $ hg --cwd c commit -Amc
36 adding c
38 adding c
37 $ hg clone c d
39 $ hg clone c d
38 updating to branch default
40 updating to branch default
39 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
41 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
40 $ hg clone c e
42 $ hg clone c e
41 updating to branch default
43 updating to branch default
42 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
44 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
43
45
44 We cannot use the default commit message if fetching from a local
46 We cannot use the default commit message if fetching from a local
45 repo, because the path of the repo will be included in the commit
47 repo, because the path of the repo will be included in the commit
46 message, making every commit appear different.
48 message, making every commit appear different.
47 should merge c into a
49 should merge c into a
48
50
49 $ hg --cwd c fetch -d '0 0' -m 'automated merge' ../a
51 $ hg --cwd c fetch -d '0 0' -m 'automated merge' ../a
50 pulling from ../a
52 pulling from ../a
51 searching for changes
53 searching for changes
52 adding changesets
54 adding changesets
53 adding manifests
55 adding manifests
54 adding file changes
56 adding file changes
55 added 1 changesets with 1 changes to 1 files (+1 heads)
57 added 1 changesets with 1 changes to 1 files (+1 heads)
56 updating to 2:d2ae7f538514
58 updating to 2:d2ae7f538514
57 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
59 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
58 merging with 1:d36c0562f908
60 merging with 1:d36c0562f908
59 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
60 new changeset 3:a323a0c43ec4 merges remote changes with local
62 new changeset 3:a323a0c43ec4 merges remote changes with local
61 $ ls c
63 $ ls c
62 a
64 a
63 b
65 b
64 c
66 c
65 $ hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid
67 $ hg --cwd a serve -a localhost -p $HGPORT -d --pid-file=hg.pid
66 $ cat a/hg.pid >> "$DAEMON_PIDS"
68 $ cat a/hg.pid >> "$DAEMON_PIDS"
67
69
68 fetch over http, no auth
70 fetch over http, no auth
69
71
70 $ hg --cwd d fetch http://localhost:$HGPORT/
72 $ hg --cwd d fetch http://localhost:$HGPORT/
71 pulling from http://localhost:$HGPORT/
73 pulling from http://localhost:$HGPORT/
72 searching for changes
74 searching for changes
73 adding changesets
75 adding changesets
74 adding manifests
76 adding manifests
75 adding file changes
77 adding file changes
76 added 1 changesets with 1 changes to 1 files (+1 heads)
78 added 1 changesets with 1 changes to 1 files (+1 heads)
77 updating to 2:d2ae7f538514
79 updating to 2:d2ae7f538514
78 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
80 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
79 merging with 1:d36c0562f908
81 merging with 1:d36c0562f908
80 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
82 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
81 new changeset 3:* merges remote changes with local (glob)
83 new changeset 3:* merges remote changes with local (glob)
82 $ hg --cwd d tip --template '{desc}\n'
84 $ hg --cwd d tip --template '{desc}\n'
83 Automated merge with http://localhost:$HGPORT/
85 Automated merge with http://localhost:$HGPORT/
84
86
85 fetch over http with auth (should be hidden in desc)
87 fetch over http with auth (should be hidden in desc)
86
88
87 $ hg --cwd e fetch http://user:password@localhost:$HGPORT/
89 $ hg --cwd e fetch http://user:password@localhost:$HGPORT/
88 pulling from http://user:***@localhost:$HGPORT/
90 pulling from http://user:***@localhost:$HGPORT/
89 searching for changes
91 searching for changes
90 adding changesets
92 adding changesets
91 adding manifests
93 adding manifests
92 adding file changes
94 adding file changes
93 added 1 changesets with 1 changes to 1 files (+1 heads)
95 added 1 changesets with 1 changes to 1 files (+1 heads)
94 updating to 2:d2ae7f538514
96 updating to 2:d2ae7f538514
95 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
97 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
96 merging with 1:d36c0562f908
98 merging with 1:d36c0562f908
97 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
98 new changeset 3:* merges remote changes with local (glob)
100 new changeset 3:* merges remote changes with local (glob)
99 $ hg --cwd e tip --template '{desc}\n'
101 $ hg --cwd e tip --template '{desc}\n'
100 Automated merge with http://localhost:$HGPORT/
102 Automated merge with http://localhost:$HGPORT/
101 $ hg clone a f
103 $ hg clone a f
102 updating to branch default
104 updating to branch default
103 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
105 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
104 $ hg clone a g
106 $ hg clone a g
105 updating to branch default
107 updating to branch default
106 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
108 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
107 $ echo f > f/f
109 $ echo f > f/f
108 $ hg --cwd f ci -Amf
110 $ hg --cwd f ci -Amf
109 adding f
111 adding f
110 $ echo g > g/g
112 $ echo g > g/g
111 $ hg --cwd g ci -Amg
113 $ hg --cwd g ci -Amg
112 adding g
114 adding g
113 $ hg clone -q f h
115 $ hg clone -q f h
114 $ hg clone -q g i
116 $ hg clone -q g i
115
117
116 should merge f into g
118 should merge f into g
117
119
118 $ hg --cwd g fetch -d '0 0' --switch -m 'automated merge' ../f
120 $ hg --cwd g fetch -d '0 0' --switch -m 'automated merge' ../f
119 pulling from ../f
121 pulling from ../f
120 searching for changes
122 searching for changes
121 adding changesets
123 adding changesets
122 adding manifests
124 adding manifests
123 adding file changes
125 adding file changes
124 added 1 changesets with 1 changes to 1 files (+1 heads)
126 added 1 changesets with 1 changes to 1 files (+1 heads)
125 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
127 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
126 merging with 3:6343ca3eff20
128 merging with 3:6343ca3eff20
127 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
129 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
128 new changeset 4:f7faa0b7d3c6 merges remote changes with local
130 new changeset 4:f7faa0b7d3c6 merges remote changes with local
129 $ rm i/g
131 $ rm i/g
130
132
131 should abort, because i is modified
133 should abort, because i is modified
132
134
133 $ hg --cwd i fetch ../h
135 $ hg --cwd i fetch ../h
134 abort: working directory is missing some files
136 abort: working directory is missing some files
135 [255]
137 [255]
136
138
137 test fetch with named branches
139 test fetch with named branches
138
140
139 $ hg init nbase
141 $ hg init nbase
140 $ echo base > nbase/a
142 $ echo base > nbase/a
141 $ hg -R nbase ci -Am base
143 $ hg -R nbase ci -Am base
142 adding a
144 adding a
143 $ hg -R nbase branch a
145 $ hg -R nbase branch a
144 marked working directory as branch a
146 marked working directory as branch a
145 $ echo a > nbase/a
147 $ echo a > nbase/a
146 $ hg -R nbase ci -m a
148 $ hg -R nbase ci -m a
147 $ hg -R nbase up -C 0
149 $ hg -R nbase up -C 0
148 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
150 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
149 $ hg -R nbase branch b
151 $ hg -R nbase branch b
150 marked working directory as branch b
152 marked working directory as branch b
151 $ echo b > nbase/b
153 $ echo b > nbase/b
152 $ hg -R nbase ci -Am b
154 $ hg -R nbase ci -Am b
153 adding b
155 adding b
154
156
155 pull in change on foreign branch
157 pull in change on foreign branch
156
158
157 $ hg clone nbase n1
159 $ hg clone nbase n1
158 updating to branch default
160 updating to branch default
159 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
161 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
160 $ hg clone nbase n2
162 $ hg clone nbase n2
161 updating to branch default
163 updating to branch default
162 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
164 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
163 $ hg -R n1 up -C a
165 $ hg -R n1 up -C a
164 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
166 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
165 $ echo aa > n1/a
167 $ echo aa > n1/a
166 $ hg -R n1 ci -m a1
168 $ hg -R n1 ci -m a1
167 $ hg -R n2 up -C b
169 $ hg -R n2 up -C b
168 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
169 $ hg -R n2 fetch -m 'merge' n1
171 $ hg -R n2 fetch -m 'merge' n1
170 pulling from n1
172 pulling from n1
171 searching for changes
173 searching for changes
172 adding changesets
174 adding changesets
173 adding manifests
175 adding manifests
174 adding file changes
176 adding file changes
175 added 1 changesets with 1 changes to 1 files
177 added 1 changesets with 1 changes to 1 files
176
178
177 parent should be 2 (no automatic update)
179 parent should be 2 (no automatic update)
178
180
179 $ hg -R n2 parents --template '{rev}\n'
181 $ hg -R n2 parents --template '{rev}\n'
180 2
182 2
181 $ rm -fr n1 n2
183 $ rm -fr n1 n2
182
184
183 pull in changes on both foreign and local branches
185 pull in changes on both foreign and local branches
184
186
185 $ hg clone nbase n1
187 $ hg clone nbase n1
186 updating to branch default
188 updating to branch default
187 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
189 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
188 $ hg clone nbase n2
190 $ hg clone nbase n2
189 updating to branch default
191 updating to branch default
190 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
192 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
191 $ hg -R n1 up -C a
193 $ hg -R n1 up -C a
192 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
194 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
193 $ echo aa > n1/a
195 $ echo aa > n1/a
194 $ hg -R n1 ci -m a1
196 $ hg -R n1 ci -m a1
195 $ hg -R n1 up -C b
197 $ hg -R n1 up -C b
196 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
198 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
197 $ echo bb > n1/b
199 $ echo bb > n1/b
198 $ hg -R n1 ci -m b1
200 $ hg -R n1 ci -m b1
199 $ hg -R n2 up -C b
201 $ hg -R n2 up -C b
200 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
202 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
201 $ hg -R n2 fetch -m 'merge' n1
203 $ hg -R n2 fetch -m 'merge' n1
202 pulling from n1
204 pulling from n1
203 searching for changes
205 searching for changes
204 adding changesets
206 adding changesets
205 adding manifests
207 adding manifests
206 adding file changes
208 adding file changes
207 added 2 changesets with 2 changes to 2 files
209 added 2 changesets with 2 changes to 2 files
208 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
210 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
209
211
210 parent should be 4 (fast forward)
212 parent should be 4 (fast forward)
211
213
212 $ hg -R n2 parents --template '{rev}\n'
214 $ hg -R n2 parents --template '{rev}\n'
213 4
215 4
214 $ rm -fr n1 n2
216 $ rm -fr n1 n2
215
217
216 pull changes on foreign (2 new heads) and local (1 new head) branches
218 pull changes on foreign (2 new heads) and local (1 new head) branches
217 with a local change
219 with a local change
218
220
219 $ hg clone nbase n1
221 $ hg clone nbase n1
220 updating to branch default
222 updating to branch default
221 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
223 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
222 $ hg clone nbase n2
224 $ hg clone nbase n2
223 updating to branch default
225 updating to branch default
224 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
226 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
225 $ hg -R n1 up -C a
227 $ hg -R n1 up -C a
226 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
228 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
227 $ echo a1 > n1/a
229 $ echo a1 > n1/a
228 $ hg -R n1 ci -m a1
230 $ hg -R n1 ci -m a1
229 $ hg -R n1 up -C b
231 $ hg -R n1 up -C b
230 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
232 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
231 $ echo bb > n1/b
233 $ echo bb > n1/b
232 $ hg -R n1 ci -m b1
234 $ hg -R n1 ci -m b1
233 $ hg -R n1 up -C 1
235 $ hg -R n1 up -C 1
234 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
236 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
235 $ echo a2 > n1/a
237 $ echo a2 > n1/a
236 $ hg -R n1 ci -m a2
238 $ hg -R n1 ci -m a2
237 created new head
239 created new head
238 $ hg -R n2 up -C b
240 $ hg -R n2 up -C b
239 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
241 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
240 $ echo change >> n2/c
242 $ echo change >> n2/c
241 $ hg -R n2 ci -A -m local
243 $ hg -R n2 ci -A -m local
242 adding c
244 adding c
243 $ hg -R n2 fetch -d '0 0' -m 'merge' n1
245 $ hg -R n2 fetch -d '0 0' -m 'merge' n1
244 pulling from n1
246 pulling from n1
245 searching for changes
247 searching for changes
246 adding changesets
248 adding changesets
247 adding manifests
249 adding manifests
248 adding file changes
250 adding file changes
249 added 3 changesets with 3 changes to 2 files (+2 heads)
251 added 3 changesets with 3 changes to 2 files (+2 heads)
250 updating to 5:3c4a837a864f
252 updating to 5:3c4a837a864f
251 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
253 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
252 merging with 3:1267f84a9ea5
254 merging with 3:1267f84a9ea5
253 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
255 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
254 new changeset 7:2cf2a1261f21 merges remote changes with local
256 new changeset 7:2cf2a1261f21 merges remote changes with local
255
257
256 parent should be 7 (new merge changeset)
258 parent should be 7 (new merge changeset)
257
259
258 $ hg -R n2 parents --template '{rev}\n'
260 $ hg -R n2 parents --template '{rev}\n'
259 7
261 7
260 $ rm -fr n1 n2
262 $ rm -fr n1 n2
261
263
262 pull in changes on foreign (merge of local branch) and local (2 new
264 pull in changes on foreign (merge of local branch) and local (2 new
263 heads) with a local change
265 heads) with a local change
264
266
265 $ hg clone nbase n1
267 $ hg clone nbase n1
266 updating to branch default
268 updating to branch default
267 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
269 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
268 $ hg clone nbase n2
270 $ hg clone nbase n2
269 updating to branch default
271 updating to branch default
270 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
272 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
271 $ hg -R n1 up -C a
273 $ hg -R n1 up -C a
272 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
274 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
273 $ hg -R n1 merge b
275 $ hg -R n1 merge b
274 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
276 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
275 (branch merge, don't forget to commit)
277 (branch merge, don't forget to commit)
276 $ hg -R n1 ci -m merge
278 $ hg -R n1 ci -m merge
277 $ hg -R n1 up -C 2
279 $ hg -R n1 up -C 2
278 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
280 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
279 $ echo c > n1/a
281 $ echo c > n1/a
280 $ hg -R n1 ci -m c
282 $ hg -R n1 ci -m c
281 $ hg -R n1 up -C 2
283 $ hg -R n1 up -C 2
282 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
284 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
283 $ echo cc > n1/a
285 $ echo cc > n1/a
284 $ hg -R n1 ci -m cc
286 $ hg -R n1 ci -m cc
285 created new head
287 created new head
286 $ hg -R n2 up -C b
288 $ hg -R n2 up -C b
287 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
289 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
288 $ echo change >> n2/b
290 $ echo change >> n2/b
289 $ hg -R n2 ci -A -m local
291 $ hg -R n2 ci -A -m local
290 $ hg -R n2 fetch -m 'merge' n1
292 $ hg -R n2 fetch -m 'merge' n1
291 pulling from n1
293 pulling from n1
292 searching for changes
294 searching for changes
293 adding changesets
295 adding changesets
294 adding manifests
296 adding manifests
295 adding file changes
297 adding file changes
296 added 3 changesets with 2 changes to 1 files (+2 heads)
298 added 3 changesets with 2 changes to 1 files (+2 heads)
297 not merging with 1 other new branch heads (use "hg heads ." and "hg merge" to merge them)
299 not merging with 1 other new branch heads (use "hg heads ." and "hg merge" to merge them)
298 [1]
300 [1]
299
301
300 parent should be 3 (fetch did not merge anything)
302 parent should be 3 (fetch did not merge anything)
301
303
302 $ hg -R n2 parents --template '{rev}\n'
304 $ hg -R n2 parents --template '{rev}\n'
303 3
305 3
304 $ rm -fr n1 n2
306 $ rm -fr n1 n2
305
307
306 pull in change on different branch than dirstate
308 pull in change on different branch than dirstate
307
309
308 $ hg init n1
310 $ hg init n1
309 $ echo a > n1/a
311 $ echo a > n1/a
310 $ hg -R n1 ci -Am initial
312 $ hg -R n1 ci -Am initial
311 adding a
313 adding a
312 $ hg clone n1 n2
314 $ hg clone n1 n2
313 updating to branch default
315 updating to branch default
314 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
316 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
315 $ echo b > n1/a
317 $ echo b > n1/a
316 $ hg -R n1 ci -m next
318 $ hg -R n1 ci -m next
317 $ hg -R n2 branch topic
319 $ hg -R n2 branch topic
318 marked working directory as branch topic
320 marked working directory as branch topic
319 $ hg -R n2 fetch -m merge n1
321 $ hg -R n2 fetch -m merge n1
320 abort: working dir not at branch tip (use "hg update" to check out branch tip)
322 abort: working dir not at branch tip (use "hg update" to check out branch tip)
321 [255]
323 [255]
322
324
323 parent should be 0 (fetch did not update or merge anything)
325 parent should be 0 (fetch did not update or merge anything)
324
326
325 $ hg -R n2 parents --template '{rev}\n'
327 $ hg -R n2 parents --template '{rev}\n'
326 0
328 0
327 $ rm -fr n1 n2
329 $ rm -fr n1 n2
328
330
329 test fetch with inactive branches
331 test fetch with inactive branches
330
332
331 $ hg init ib1
333 $ hg init ib1
332 $ echo a > ib1/a
334 $ echo a > ib1/a
333 $ hg --cwd ib1 ci -Am base
335 $ hg --cwd ib1 ci -Am base
334 adding a
336 adding a
335 $ hg --cwd ib1 branch second
337 $ hg --cwd ib1 branch second
336 marked working directory as branch second
338 marked working directory as branch second
337 $ echo b > ib1/b
339 $ echo b > ib1/b
338 $ hg --cwd ib1 ci -Am onsecond
340 $ hg --cwd ib1 ci -Am onsecond
339 adding b
341 adding b
340 $ hg --cwd ib1 branch -f default
342 $ hg --cwd ib1 branch -f default
341 marked working directory as branch default
343 marked working directory as branch default
342 $ echo c > ib1/c
344 $ echo c > ib1/c
343 $ hg --cwd ib1 ci -Am newdefault
345 $ hg --cwd ib1 ci -Am newdefault
344 adding c
346 adding c
345 created new head
347 created new head
346 $ hg clone ib1 ib2
348 $ hg clone ib1 ib2
347 updating to branch default
349 updating to branch default
348 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
350 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
349
351
350 fetch should succeed
352 fetch should succeed
351
353
352 $ hg --cwd ib2 fetch ../ib1
354 $ hg --cwd ib2 fetch ../ib1
353 pulling from ../ib1
355 pulling from ../ib1
354 searching for changes
356 searching for changes
355 no changes found
357 no changes found
356 $ rm -fr ib1 ib2
358 $ rm -fr ib1 ib2
357
359
358 test issue1726
360 test issue1726
359
361
360 $ hg init i1726r1
362 $ hg init i1726r1
361 $ echo a > i1726r1/a
363 $ echo a > i1726r1/a
362 $ hg --cwd i1726r1 ci -Am base
364 $ hg --cwd i1726r1 ci -Am base
363 adding a
365 adding a
364 $ hg clone i1726r1 i1726r2
366 $ hg clone i1726r1 i1726r2
365 updating to branch default
367 updating to branch default
366 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
368 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
367 $ echo b > i1726r1/a
369 $ echo b > i1726r1/a
368 $ hg --cwd i1726r1 ci -m second
370 $ hg --cwd i1726r1 ci -m second
369 $ echo c > i1726r2/a
371 $ echo c > i1726r2/a
370 $ hg --cwd i1726r2 ci -m third
372 $ hg --cwd i1726r2 ci -m third
371 $ HGMERGE=true hg --cwd i1726r2 fetch ../i1726r1
373 $ HGMERGE=true hg --cwd i1726r2 fetch ../i1726r1
372 pulling from ../i1726r1
374 pulling from ../i1726r1
373 searching for changes
375 searching for changes
374 adding changesets
376 adding changesets
375 adding manifests
377 adding manifests
376 adding file changes
378 adding file changes
377 added 1 changesets with 1 changes to 1 files (+1 heads)
379 added 1 changesets with 1 changes to 1 files (+1 heads)
378 updating to 2:7837755a2789
380 updating to 2:7837755a2789
379 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
381 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
380 merging with 1:d1f0c6c48ebd
382 merging with 1:d1f0c6c48ebd
381 merging a
383 merging a
382 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
384 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
383 new changeset 3:* merges remote changes with local (glob)
385 new changeset 3:* merges remote changes with local (glob)
384 $ hg --cwd i1726r2 heads default --template '{rev}\n'
386 $ hg --cwd i1726r2 heads default --template '{rev}\n'
385 3
387 3
386
388
387 test issue2047
389 test issue2047
388
390
389 $ hg -q init i2047a
391 $ hg -q init i2047a
390 $ cd i2047a
392 $ cd i2047a
391 $ echo a > a
393 $ echo a > a
392 $ hg -q ci -Am a
394 $ hg -q ci -Am a
393 $ hg -q branch stable
395 $ hg -q branch stable
394 $ echo b > b
396 $ echo b > b
395 $ hg -q ci -Am b
397 $ hg -q ci -Am b
396 $ cd ..
398 $ cd ..
397 $ hg -q clone -r 0 i2047a i2047b
399 $ hg -q clone -r 0 i2047a i2047b
398 $ cd i2047b
400 $ cd i2047b
399 $ hg fetch ../i2047a
401 $ hg fetch ../i2047a
400 pulling from ../i2047a
402 pulling from ../i2047a
401 searching for changes
403 searching for changes
402 adding changesets
404 adding changesets
403 adding manifests
405 adding manifests
404 adding file changes
406 adding file changes
405 added 1 changesets with 1 changes to 1 files
407 added 1 changesets with 1 changes to 1 files
@@ -1,253 +1,254 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 = Test the getbundle() protocol function =
3 = Test the getbundle() protocol function =
3
4
4 Enable graphlog extension:
5 Enable graphlog extension:
5
6
6 $ echo "[extensions]" >> $HGRCPATH
7 $ echo "[extensions]" >> $HGRCPATH
7 $ echo "graphlog=" >> $HGRCPATH
8 $ echo "graphlog=" >> $HGRCPATH
8
9
9 Create a test repository:
10 Create a test repository:
10
11
11 $ hg init repo
12 $ hg init repo
12 $ cd repo
13 $ cd repo
13 $ hg debugbuilddag -n -m '+2 :fork +5 :p1 *fork +6 :p2 /p1 :m1 +3' > /dev/null
14 $ hg debugbuilddag -n -m '+2 :fork +5 :p1 *fork +6 :p2 /p1 :m1 +3' > /dev/null
14 $ hg glog --template '{node}\n'
15 $ hg glog --template '{node}\n'
15 o 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da
16 o 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da
16 |
17 |
17 o 4801a72e5d88cb515b0c7e40fae34180f3f837f2
18 o 4801a72e5d88cb515b0c7e40fae34180f3f837f2
18 |
19 |
19 o 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
20 o 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
20 |
21 |
21 o 8365676dbab05860ce0d9110f2af51368b961bbd
22 o 8365676dbab05860ce0d9110f2af51368b961bbd
22 |\
23 |\
23 | o 5686dbbd9fc46cb806599c878d02fe1cb56b83d3
24 | o 5686dbbd9fc46cb806599c878d02fe1cb56b83d3
24 | |
25 | |
25 | o 13c0170174366b441dc68e8e33757232fa744458
26 | o 13c0170174366b441dc68e8e33757232fa744458
26 | |
27 | |
27 | o 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
28 | o 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
28 | |
29 | |
29 | o 700b7e19db54103633c4bf4a6a6b6d55f4d50c03
30 | o 700b7e19db54103633c4bf4a6a6b6d55f4d50c03
30 | |
31 | |
31 | o 928b5f94cdb278bb536eba552de348a4e92ef24d
32 | o 928b5f94cdb278bb536eba552de348a4e92ef24d
32 | |
33 | |
33 | o f34414c64173e0ecb61b25dc55e116dbbcc89bee
34 | o f34414c64173e0ecb61b25dc55e116dbbcc89bee
34 | |
35 | |
35 | o 8931463777131cd73923e560b760061f2aa8a4bc
36 | o 8931463777131cd73923e560b760061f2aa8a4bc
36 | |
37 | |
37 o | 6621d79f61b23ec74cf4b69464343d9e0980ec8b
38 o | 6621d79f61b23ec74cf4b69464343d9e0980ec8b
38 | |
39 | |
39 o | bac16991d12ff45f9dc43c52da1946dfadb83e80
40 o | bac16991d12ff45f9dc43c52da1946dfadb83e80
40 | |
41 | |
41 o | ff42371d57168345fdf1a3aac66a51f6a45d41d2
42 o | ff42371d57168345fdf1a3aac66a51f6a45d41d2
42 | |
43 | |
43 o | d5f6e1ea452285324836a49d7d3c2a63cfed1d31
44 o | d5f6e1ea452285324836a49d7d3c2a63cfed1d31
44 | |
45 | |
45 o | 713346a995c363120712aed1aee7e04afd867638
46 o | 713346a995c363120712aed1aee7e04afd867638
46 |/
47 |/
47 o 29a4d1f17bd3f0779ca0525bebb1cfb51067c738
48 o 29a4d1f17bd3f0779ca0525bebb1cfb51067c738
48 |
49 |
49 o 7704483d56b2a7b5db54dcee7c62378ac629b348
50 o 7704483d56b2a7b5db54dcee7c62378ac629b348
50
51
51 $ cd ..
52 $ cd ..
52
53
53
54
54 = Test locally =
55 = Test locally =
55
56
56 Get everything:
57 Get everything:
57
58
58 $ hg debuggetbundle repo bundle
59 $ hg debuggetbundle repo bundle
59 $ hg debugbundle bundle
60 $ hg debugbundle bundle
60 7704483d56b2a7b5db54dcee7c62378ac629b348
61 7704483d56b2a7b5db54dcee7c62378ac629b348
61 29a4d1f17bd3f0779ca0525bebb1cfb51067c738
62 29a4d1f17bd3f0779ca0525bebb1cfb51067c738
62 713346a995c363120712aed1aee7e04afd867638
63 713346a995c363120712aed1aee7e04afd867638
63 d5f6e1ea452285324836a49d7d3c2a63cfed1d31
64 d5f6e1ea452285324836a49d7d3c2a63cfed1d31
64 ff42371d57168345fdf1a3aac66a51f6a45d41d2
65 ff42371d57168345fdf1a3aac66a51f6a45d41d2
65 bac16991d12ff45f9dc43c52da1946dfadb83e80
66 bac16991d12ff45f9dc43c52da1946dfadb83e80
66 6621d79f61b23ec74cf4b69464343d9e0980ec8b
67 6621d79f61b23ec74cf4b69464343d9e0980ec8b
67 8931463777131cd73923e560b760061f2aa8a4bc
68 8931463777131cd73923e560b760061f2aa8a4bc
68 f34414c64173e0ecb61b25dc55e116dbbcc89bee
69 f34414c64173e0ecb61b25dc55e116dbbcc89bee
69 928b5f94cdb278bb536eba552de348a4e92ef24d
70 928b5f94cdb278bb536eba552de348a4e92ef24d
70 700b7e19db54103633c4bf4a6a6b6d55f4d50c03
71 700b7e19db54103633c4bf4a6a6b6d55f4d50c03
71 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
72 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
72 13c0170174366b441dc68e8e33757232fa744458
73 13c0170174366b441dc68e8e33757232fa744458
73 5686dbbd9fc46cb806599c878d02fe1cb56b83d3
74 5686dbbd9fc46cb806599c878d02fe1cb56b83d3
74 8365676dbab05860ce0d9110f2af51368b961bbd
75 8365676dbab05860ce0d9110f2af51368b961bbd
75 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
76 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
76 4801a72e5d88cb515b0c7e40fae34180f3f837f2
77 4801a72e5d88cb515b0c7e40fae34180f3f837f2
77 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da
78 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da
78
79
79 Get part of linear run:
80 Get part of linear run:
80
81
81 $ hg debuggetbundle repo bundle -H 4801a72e5d88cb515b0c7e40fae34180f3f837f2 -C 8365676dbab05860ce0d9110f2af51368b961bbd
82 $ hg debuggetbundle repo bundle -H 4801a72e5d88cb515b0c7e40fae34180f3f837f2 -C 8365676dbab05860ce0d9110f2af51368b961bbd
82 $ hg debugbundle bundle
83 $ hg debugbundle bundle
83 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
84 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
84 4801a72e5d88cb515b0c7e40fae34180f3f837f2
85 4801a72e5d88cb515b0c7e40fae34180f3f837f2
85
86
86 Get missing branch and merge:
87 Get missing branch and merge:
87
88
88 $ hg debuggetbundle repo bundle -H 4801a72e5d88cb515b0c7e40fae34180f3f837f2 -C 13c0170174366b441dc68e8e33757232fa744458
89 $ hg debuggetbundle repo bundle -H 4801a72e5d88cb515b0c7e40fae34180f3f837f2 -C 13c0170174366b441dc68e8e33757232fa744458
89 $ hg debugbundle bundle
90 $ hg debugbundle bundle
90 713346a995c363120712aed1aee7e04afd867638
91 713346a995c363120712aed1aee7e04afd867638
91 d5f6e1ea452285324836a49d7d3c2a63cfed1d31
92 d5f6e1ea452285324836a49d7d3c2a63cfed1d31
92 ff42371d57168345fdf1a3aac66a51f6a45d41d2
93 ff42371d57168345fdf1a3aac66a51f6a45d41d2
93 bac16991d12ff45f9dc43c52da1946dfadb83e80
94 bac16991d12ff45f9dc43c52da1946dfadb83e80
94 6621d79f61b23ec74cf4b69464343d9e0980ec8b
95 6621d79f61b23ec74cf4b69464343d9e0980ec8b
95 5686dbbd9fc46cb806599c878d02fe1cb56b83d3
96 5686dbbd9fc46cb806599c878d02fe1cb56b83d3
96 8365676dbab05860ce0d9110f2af51368b961bbd
97 8365676dbab05860ce0d9110f2af51368b961bbd
97 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
98 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
98 4801a72e5d88cb515b0c7e40fae34180f3f837f2
99 4801a72e5d88cb515b0c7e40fae34180f3f837f2
99
100
100 Get from only one head:
101 Get from only one head:
101
102
102 $ hg debuggetbundle repo bundle -H 928b5f94cdb278bb536eba552de348a4e92ef24d -C 29a4d1f17bd3f0779ca0525bebb1cfb51067c738
103 $ hg debuggetbundle repo bundle -H 928b5f94cdb278bb536eba552de348a4e92ef24d -C 29a4d1f17bd3f0779ca0525bebb1cfb51067c738
103 $ hg debugbundle bundle
104 $ hg debugbundle bundle
104 8931463777131cd73923e560b760061f2aa8a4bc
105 8931463777131cd73923e560b760061f2aa8a4bc
105 f34414c64173e0ecb61b25dc55e116dbbcc89bee
106 f34414c64173e0ecb61b25dc55e116dbbcc89bee
106 928b5f94cdb278bb536eba552de348a4e92ef24d
107 928b5f94cdb278bb536eba552de348a4e92ef24d
107
108
108 Get parts of two branches:
109 Get parts of two branches:
109
110
110 $ hg debuggetbundle repo bundle -H 13c0170174366b441dc68e8e33757232fa744458 -C 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 -H bac16991d12ff45f9dc43c52da1946dfadb83e80 -C d5f6e1ea452285324836a49d7d3c2a63cfed1d31
111 $ hg debuggetbundle repo bundle -H 13c0170174366b441dc68e8e33757232fa744458 -C 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 -H bac16991d12ff45f9dc43c52da1946dfadb83e80 -C d5f6e1ea452285324836a49d7d3c2a63cfed1d31
111 $ hg debugbundle bundle
112 $ hg debugbundle bundle
112 ff42371d57168345fdf1a3aac66a51f6a45d41d2
113 ff42371d57168345fdf1a3aac66a51f6a45d41d2
113 bac16991d12ff45f9dc43c52da1946dfadb83e80
114 bac16991d12ff45f9dc43c52da1946dfadb83e80
114 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
115 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
115 13c0170174366b441dc68e8e33757232fa744458
116 13c0170174366b441dc68e8e33757232fa744458
116
117
117 Check that we get all needed file changes:
118 Check that we get all needed file changes:
118
119
119 $ hg debugbundle bundle --all
120 $ hg debugbundle bundle --all
120 format: id, p1, p2, cset, delta base, len(delta)
121 format: id, p1, p2, cset, delta base, len(delta)
121
122
122 changelog
123 changelog
123 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 99
124 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 99
124 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 99
125 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 99
125 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 bac16991d12ff45f9dc43c52da1946dfadb83e80 102
126 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 bac16991d12ff45f9dc43c52da1946dfadb83e80 102
126 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 102
127 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 102
127
128
128 manifest
129 manifest
129 dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 591f732a3faf1fb903815273f3c199a514a61ccb 113
130 dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 591f732a3faf1fb903815273f3c199a514a61ccb 113
130 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 dac7984588fc4eea7acbf39693a9c1b06f5b175d 113
131 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 dac7984588fc4eea7acbf39693a9c1b06f5b175d 113
131 eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0772616e6b48a76afb6c1458e193cbb3dae2e4ff 295
132 eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0772616e6b48a76afb6c1458e193cbb3dae2e4ff 295
132 b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 eb498cd9af6c44108e43041e951ce829e29f6c80 114
133 b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 eb498cd9af6c44108e43041e951ce829e29f6c80 114
133
134
134 mf
135 mf
135 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 17
136 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 17
136 c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 18
137 c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 18
137 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 c7b583de053293870e145f45bd2d61643563fd06 149
138 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 c7b583de053293870e145f45bd2d61643563fd06 149
138 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 266ee3c0302a5a18f1cf96817ac79a51836179e9 19
139 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 266ee3c0302a5a18f1cf96817ac79a51836179e9 19
139
140
140 nf11
141 nf11
141 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 16
142 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 16
142
143
143 nf12
144 nf12
144 ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 0000000000000000000000000000000000000000 16
145 ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 0000000000000000000000000000000000000000 16
145
146
146 nf4
147 nf4
147 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 15
148 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 15
148
149
149 nf5
150 nf5
150 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 0000000000000000000000000000000000000000 15
151 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 0000000000000000000000000000000000000000 15
151
152
152 Get branch and merge:
153 Get branch and merge:
153
154
154 $ hg debuggetbundle repo bundle -C 7704483d56b2a7b5db54dcee7c62378ac629b348 -H 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
155 $ hg debuggetbundle repo bundle -C 7704483d56b2a7b5db54dcee7c62378ac629b348 -H 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
155 $ hg debugbundle bundle
156 $ hg debugbundle bundle
156 29a4d1f17bd3f0779ca0525bebb1cfb51067c738
157 29a4d1f17bd3f0779ca0525bebb1cfb51067c738
157 713346a995c363120712aed1aee7e04afd867638
158 713346a995c363120712aed1aee7e04afd867638
158 d5f6e1ea452285324836a49d7d3c2a63cfed1d31
159 d5f6e1ea452285324836a49d7d3c2a63cfed1d31
159 ff42371d57168345fdf1a3aac66a51f6a45d41d2
160 ff42371d57168345fdf1a3aac66a51f6a45d41d2
160 bac16991d12ff45f9dc43c52da1946dfadb83e80
161 bac16991d12ff45f9dc43c52da1946dfadb83e80
161 6621d79f61b23ec74cf4b69464343d9e0980ec8b
162 6621d79f61b23ec74cf4b69464343d9e0980ec8b
162 8931463777131cd73923e560b760061f2aa8a4bc
163 8931463777131cd73923e560b760061f2aa8a4bc
163 f34414c64173e0ecb61b25dc55e116dbbcc89bee
164 f34414c64173e0ecb61b25dc55e116dbbcc89bee
164 928b5f94cdb278bb536eba552de348a4e92ef24d
165 928b5f94cdb278bb536eba552de348a4e92ef24d
165 700b7e19db54103633c4bf4a6a6b6d55f4d50c03
166 700b7e19db54103633c4bf4a6a6b6d55f4d50c03
166 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
167 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
167 13c0170174366b441dc68e8e33757232fa744458
168 13c0170174366b441dc68e8e33757232fa744458
168 5686dbbd9fc46cb806599c878d02fe1cb56b83d3
169 5686dbbd9fc46cb806599c878d02fe1cb56b83d3
169 8365676dbab05860ce0d9110f2af51368b961bbd
170 8365676dbab05860ce0d9110f2af51368b961bbd
170 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
171 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
171
172
172
173
173 = Test via HTTP =
174 = Test via HTTP =
174
175
175 Get everything:
176 Get everything:
176
177
177 $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log
178 $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log
178 $ cat hg.pid >> $DAEMON_PIDS
179 $ cat hg.pid >> $DAEMON_PIDS
179 $ hg debuggetbundle http://localhost:$HGPORT/ bundle
180 $ hg debuggetbundle http://localhost:$HGPORT/ bundle
180 $ hg debugbundle bundle
181 $ hg debugbundle bundle
181 7704483d56b2a7b5db54dcee7c62378ac629b348
182 7704483d56b2a7b5db54dcee7c62378ac629b348
182 29a4d1f17bd3f0779ca0525bebb1cfb51067c738
183 29a4d1f17bd3f0779ca0525bebb1cfb51067c738
183 713346a995c363120712aed1aee7e04afd867638
184 713346a995c363120712aed1aee7e04afd867638
184 d5f6e1ea452285324836a49d7d3c2a63cfed1d31
185 d5f6e1ea452285324836a49d7d3c2a63cfed1d31
185 ff42371d57168345fdf1a3aac66a51f6a45d41d2
186 ff42371d57168345fdf1a3aac66a51f6a45d41d2
186 bac16991d12ff45f9dc43c52da1946dfadb83e80
187 bac16991d12ff45f9dc43c52da1946dfadb83e80
187 6621d79f61b23ec74cf4b69464343d9e0980ec8b
188 6621d79f61b23ec74cf4b69464343d9e0980ec8b
188 8931463777131cd73923e560b760061f2aa8a4bc
189 8931463777131cd73923e560b760061f2aa8a4bc
189 f34414c64173e0ecb61b25dc55e116dbbcc89bee
190 f34414c64173e0ecb61b25dc55e116dbbcc89bee
190 928b5f94cdb278bb536eba552de348a4e92ef24d
191 928b5f94cdb278bb536eba552de348a4e92ef24d
191 700b7e19db54103633c4bf4a6a6b6d55f4d50c03
192 700b7e19db54103633c4bf4a6a6b6d55f4d50c03
192 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
193 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
193 13c0170174366b441dc68e8e33757232fa744458
194 13c0170174366b441dc68e8e33757232fa744458
194 5686dbbd9fc46cb806599c878d02fe1cb56b83d3
195 5686dbbd9fc46cb806599c878d02fe1cb56b83d3
195 8365676dbab05860ce0d9110f2af51368b961bbd
196 8365676dbab05860ce0d9110f2af51368b961bbd
196 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
197 0b2f73f04880d9cb6a5cd8a757f0db0ad01e32c3
197 4801a72e5d88cb515b0c7e40fae34180f3f837f2
198 4801a72e5d88cb515b0c7e40fae34180f3f837f2
198 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da
199 10c14a2cc935e1d8c31f9e98587dcf27fb08a6da
199
200
200 Get parts of two branches:
201 Get parts of two branches:
201
202
202 $ hg debuggetbundle http://localhost:$HGPORT/ bundle -H 13c0170174366b441dc68e8e33757232fa744458 -C 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 -H bac16991d12ff45f9dc43c52da1946dfadb83e80 -C d5f6e1ea452285324836a49d7d3c2a63cfed1d31
203 $ hg debuggetbundle http://localhost:$HGPORT/ bundle -H 13c0170174366b441dc68e8e33757232fa744458 -C 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 -H bac16991d12ff45f9dc43c52da1946dfadb83e80 -C d5f6e1ea452285324836a49d7d3c2a63cfed1d31
203 $ hg debugbundle bundle
204 $ hg debugbundle bundle
204 ff42371d57168345fdf1a3aac66a51f6a45d41d2
205 ff42371d57168345fdf1a3aac66a51f6a45d41d2
205 bac16991d12ff45f9dc43c52da1946dfadb83e80
206 bac16991d12ff45f9dc43c52da1946dfadb83e80
206 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
207 63476832d8ec6558cf9bbe3cbe0c757e5cf18043
207 13c0170174366b441dc68e8e33757232fa744458
208 13c0170174366b441dc68e8e33757232fa744458
208
209
209 Check that we get all needed file changes:
210 Check that we get all needed file changes:
210
211
211 $ hg debugbundle bundle --all
212 $ hg debugbundle bundle --all
212 format: id, p1, p2, cset, delta base, len(delta)
213 format: id, p1, p2, cset, delta base, len(delta)
213
214
214 changelog
215 changelog
215 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 99
216 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 d5f6e1ea452285324836a49d7d3c2a63cfed1d31 99
216 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 99
217 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 ff42371d57168345fdf1a3aac66a51f6a45d41d2 99
217 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 bac16991d12ff45f9dc43c52da1946dfadb83e80 102
218 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 700b7e19db54103633c4bf4a6a6b6d55f4d50c03 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 bac16991d12ff45f9dc43c52da1946dfadb83e80 102
218 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 102
219 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 102
219
220
220 manifest
221 manifest
221 dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 591f732a3faf1fb903815273f3c199a514a61ccb 113
222 dac7984588fc4eea7acbf39693a9c1b06f5b175d 591f732a3faf1fb903815273f3c199a514a61ccb 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 591f732a3faf1fb903815273f3c199a514a61ccb 113
222 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 dac7984588fc4eea7acbf39693a9c1b06f5b175d 113
223 0772616e6b48a76afb6c1458e193cbb3dae2e4ff dac7984588fc4eea7acbf39693a9c1b06f5b175d 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 dac7984588fc4eea7acbf39693a9c1b06f5b175d 113
223 eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0772616e6b48a76afb6c1458e193cbb3dae2e4ff 295
224 eb498cd9af6c44108e43041e951ce829e29f6c80 bff2f4817ced57b386caf7c4e3e36a4bc9af7e93 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0772616e6b48a76afb6c1458e193cbb3dae2e4ff 295
224 b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 eb498cd9af6c44108e43041e951ce829e29f6c80 114
225 b15709c071ddd2d93188508ba156196ab4f19620 eb498cd9af6c44108e43041e951ce829e29f6c80 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 eb498cd9af6c44108e43041e951ce829e29f6c80 114
225
226
226 mf
227 mf
227 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 17
228 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 301ca08d026bb72cb4258a9d211bdf7ca0bcd810 17
228 c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 18
229 c7b583de053293870e145f45bd2d61643563fd06 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 4f73f97080266ab8e0c0561ca8d0da3eaf65b695 18
229 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 c7b583de053293870e145f45bd2d61643563fd06 149
230 266ee3c0302a5a18f1cf96817ac79a51836179e9 edc0f6b8db80d68ae6aff2b19f7e5347ab68fa63 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 c7b583de053293870e145f45bd2d61643563fd06 149
230 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 266ee3c0302a5a18f1cf96817ac79a51836179e9 19
231 698c6a36220548cd3903ca7dada27c59aa500c52 266ee3c0302a5a18f1cf96817ac79a51836179e9 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 266ee3c0302a5a18f1cf96817ac79a51836179e9 19
231
232
232 nf11
233 nf11
233 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 16
234 33fbc651630ffa7ccbebfe4eb91320a873e7291c 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 63476832d8ec6558cf9bbe3cbe0c757e5cf18043 0000000000000000000000000000000000000000 16
234
235
235 nf12
236 nf12
236 ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 0000000000000000000000000000000000000000 16
237 ddce0544363f037e9fb889faca058f52dc01c0a5 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 13c0170174366b441dc68e8e33757232fa744458 0000000000000000000000000000000000000000 16
237
238
238 nf4
239 nf4
239 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 15
240 3c1407305701051cbed9f9cb9a68bdfb5997c235 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 ff42371d57168345fdf1a3aac66a51f6a45d41d2 0000000000000000000000000000000000000000 15
240
241
241 nf5
242 nf5
242 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 0000000000000000000000000000000000000000 15
243 0dbd89c185f53a1727c54cd1ce256482fa23968e 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 bac16991d12ff45f9dc43c52da1946dfadb83e80 0000000000000000000000000000000000000000 15
243
244
244 Verify we hit the HTTP server:
245 Verify we hit the HTTP server:
245
246
246 $ cat access.log
247 $ cat access.log
247 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
248 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
248 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - (glob)
249 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - (glob)
249 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
250 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
250 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=700b7e19db54103633c4bf4a6a6b6d55f4d50c03+d5f6e1ea452285324836a49d7d3c2a63cfed1d31&heads=13c0170174366b441dc68e8e33757232fa744458+bac16991d12ff45f9dc43c52da1946dfadb83e80 (glob)
251 * - - [*] "GET /?cmd=getbundle HTTP/1.1" 200 - x-hgarg-1:common=700b7e19db54103633c4bf4a6a6b6d55f4d50c03+d5f6e1ea452285324836a49d7d3c2a63cfed1d31&heads=13c0170174366b441dc68e8e33757232fa744458+bac16991d12ff45f9dc43c52da1946dfadb83e80 (glob)
251
252
252 $ cat error.log
253 $ cat error.log
253
254
@@ -1,1157 +1,1159 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 An attempt at more fully testing the hgweb web interface.
3 An attempt at more fully testing the hgweb web interface.
2 The following things are tested elsewhere and are therefore omitted:
4 The following things are tested elsewhere and are therefore omitted:
3 - archive, tested in test-archive
5 - archive, tested in test-archive
4 - unbundle, tested in test-push-http
6 - unbundle, tested in test-push-http
5 - changegroupsubset, tested in test-pull
7 - changegroupsubset, tested in test-pull
6
8
7 Set up the repo
9 Set up the repo
8
10
9 $ hg init test
11 $ hg init test
10 $ cd test
12 $ cd test
11 $ mkdir da
13 $ mkdir da
12 $ echo foo > da/foo
14 $ echo foo > da/foo
13 $ echo foo > foo
15 $ echo foo > foo
14 $ hg ci -Ambase
16 $ hg ci -Ambase
15 adding da/foo
17 adding da/foo
16 adding foo
18 adding foo
17 $ hg tag 1.0
19 $ hg tag 1.0
18 $ hg bookmark something
20 $ hg bookmark something
19 $ hg bookmark -r0 anotherthing
21 $ hg bookmark -r0 anotherthing
20 $ echo another > foo
22 $ echo another > foo
21 $ hg branch stable
23 $ hg branch stable
22 marked working directory as branch stable
24 marked working directory as branch stable
23 $ hg ci -Ambranch
25 $ hg ci -Ambranch
24 $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
26 $ hg serve --config server.uncompressed=False -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
25 $ cat hg.pid >> $DAEMON_PIDS
27 $ cat hg.pid >> $DAEMON_PIDS
26
28
27 Logs and changes
29 Logs and changes
28
30
29 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom'
31 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom'
30 200 Script output follows
32 200 Script output follows
31
33
32 <?xml version="1.0" encoding="ascii"?>
34 <?xml version="1.0" encoding="ascii"?>
33 <feed xmlns="http://www.w3.org/2005/Atom">
35 <feed xmlns="http://www.w3.org/2005/Atom">
34 <!-- Changelog -->
36 <!-- Changelog -->
35 <id>http://*:$HGPORT/</id> (glob)
37 <id>http://*:$HGPORT/</id> (glob)
36 <link rel="self" href="http://*:$HGPORT/atom-log"/> (glob)
38 <link rel="self" href="http://*:$HGPORT/atom-log"/> (glob)
37 <link rel="alternate" href="http://*:$HGPORT/"/> (glob)
39 <link rel="alternate" href="http://*:$HGPORT/"/> (glob)
38 <title>test Changelog</title>
40 <title>test Changelog</title>
39 <updated>1970-01-01T00:00:00+00:00</updated>
41 <updated>1970-01-01T00:00:00+00:00</updated>
40
42
41 <entry>
43 <entry>
42 <title>branch</title>
44 <title>branch</title>
43 <id>http://*:$HGPORT/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id> (glob)
45 <id>http://*:$HGPORT/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id> (glob)
44 <link href="http://*:$HGPORT/rev/1d22e65f027e"/> (glob)
46 <link href="http://*:$HGPORT/rev/1d22e65f027e"/> (glob)
45 <author>
47 <author>
46 <name>test</name>
48 <name>test</name>
47 <email>&#116;&#101;&#115;&#116;</email>
49 <email>&#116;&#101;&#115;&#116;</email>
48 </author>
50 </author>
49 <updated>1970-01-01T00:00:00+00:00</updated>
51 <updated>1970-01-01T00:00:00+00:00</updated>
50 <published>1970-01-01T00:00:00+00:00</published>
52 <published>1970-01-01T00:00:00+00:00</published>
51 <content type="xhtml">
53 <content type="xhtml">
52 <div xmlns="http://www.w3.org/1999/xhtml">
54 <div xmlns="http://www.w3.org/1999/xhtml">
53 <pre xml:space="preserve">branch</pre>
55 <pre xml:space="preserve">branch</pre>
54 </div>
56 </div>
55 </content>
57 </content>
56 </entry>
58 </entry>
57 <entry>
59 <entry>
58 <title>Added tag 1.0 for changeset 2ef0ac749a14</title>
60 <title>Added tag 1.0 for changeset 2ef0ac749a14</title>
59 <id>http://*:$HGPORT/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id> (glob)
61 <id>http://*:$HGPORT/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id> (glob)
60 <link href="http://*:$HGPORT/rev/a4f92ed23982"/> (glob)
62 <link href="http://*:$HGPORT/rev/a4f92ed23982"/> (glob)
61 <author>
63 <author>
62 <name>test</name>
64 <name>test</name>
63 <email>&#116;&#101;&#115;&#116;</email>
65 <email>&#116;&#101;&#115;&#116;</email>
64 </author>
66 </author>
65 <updated>1970-01-01T00:00:00+00:00</updated>
67 <updated>1970-01-01T00:00:00+00:00</updated>
66 <published>1970-01-01T00:00:00+00:00</published>
68 <published>1970-01-01T00:00:00+00:00</published>
67 <content type="xhtml">
69 <content type="xhtml">
68 <div xmlns="http://www.w3.org/1999/xhtml">
70 <div xmlns="http://www.w3.org/1999/xhtml">
69 <pre xml:space="preserve">Added tag 1.0 for changeset 2ef0ac749a14</pre>
71 <pre xml:space="preserve">Added tag 1.0 for changeset 2ef0ac749a14</pre>
70 </div>
72 </div>
71 </content>
73 </content>
72 </entry>
74 </entry>
73 <entry>
75 <entry>
74 <title>base</title>
76 <title>base</title>
75 <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
77 <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
76 <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
78 <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
77 <author>
79 <author>
78 <name>test</name>
80 <name>test</name>
79 <email>&#116;&#101;&#115;&#116;</email>
81 <email>&#116;&#101;&#115;&#116;</email>
80 </author>
82 </author>
81 <updated>1970-01-01T00:00:00+00:00</updated>
83 <updated>1970-01-01T00:00:00+00:00</updated>
82 <published>1970-01-01T00:00:00+00:00</published>
84 <published>1970-01-01T00:00:00+00:00</published>
83 <content type="xhtml">
85 <content type="xhtml">
84 <div xmlns="http://www.w3.org/1999/xhtml">
86 <div xmlns="http://www.w3.org/1999/xhtml">
85 <pre xml:space="preserve">base</pre>
87 <pre xml:space="preserve">base</pre>
86 </div>
88 </div>
87 </content>
89 </content>
88 </entry>
90 </entry>
89
91
90 </feed>
92 </feed>
91 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom'
93 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom'
92 200 Script output follows
94 200 Script output follows
93
95
94 <?xml version="1.0" encoding="ascii"?>
96 <?xml version="1.0" encoding="ascii"?>
95 <feed xmlns="http://www.w3.org/2005/Atom">
97 <feed xmlns="http://www.w3.org/2005/Atom">
96 <!-- Changelog -->
98 <!-- Changelog -->
97 <id>http://*:$HGPORT/</id> (glob)
99 <id>http://*:$HGPORT/</id> (glob)
98 <link rel="self" href="http://*:$HGPORT/atom-log"/> (glob)
100 <link rel="self" href="http://*:$HGPORT/atom-log"/> (glob)
99 <link rel="alternate" href="http://*:$HGPORT/"/> (glob)
101 <link rel="alternate" href="http://*:$HGPORT/"/> (glob)
100 <title>test Changelog</title>
102 <title>test Changelog</title>
101 <updated>1970-01-01T00:00:00+00:00</updated>
103 <updated>1970-01-01T00:00:00+00:00</updated>
102
104
103 <entry>
105 <entry>
104 <title>branch</title>
106 <title>branch</title>
105 <id>http://*:$HGPORT/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id> (glob)
107 <id>http://*:$HGPORT/#changeset-1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe</id> (glob)
106 <link href="http://*:$HGPORT/rev/1d22e65f027e"/> (glob)
108 <link href="http://*:$HGPORT/rev/1d22e65f027e"/> (glob)
107 <author>
109 <author>
108 <name>test</name>
110 <name>test</name>
109 <email>&#116;&#101;&#115;&#116;</email>
111 <email>&#116;&#101;&#115;&#116;</email>
110 </author>
112 </author>
111 <updated>1970-01-01T00:00:00+00:00</updated>
113 <updated>1970-01-01T00:00:00+00:00</updated>
112 <published>1970-01-01T00:00:00+00:00</published>
114 <published>1970-01-01T00:00:00+00:00</published>
113 <content type="xhtml">
115 <content type="xhtml">
114 <div xmlns="http://www.w3.org/1999/xhtml">
116 <div xmlns="http://www.w3.org/1999/xhtml">
115 <pre xml:space="preserve">branch</pre>
117 <pre xml:space="preserve">branch</pre>
116 </div>
118 </div>
117 </content>
119 </content>
118 </entry>
120 </entry>
119 <entry>
121 <entry>
120 <title>Added tag 1.0 for changeset 2ef0ac749a14</title>
122 <title>Added tag 1.0 for changeset 2ef0ac749a14</title>
121 <id>http://*:$HGPORT/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id> (glob)
123 <id>http://*:$HGPORT/#changeset-a4f92ed23982be056b9852de5dfe873eaac7f0de</id> (glob)
122 <link href="http://*:$HGPORT/rev/a4f92ed23982"/> (glob)
124 <link href="http://*:$HGPORT/rev/a4f92ed23982"/> (glob)
123 <author>
125 <author>
124 <name>test</name>
126 <name>test</name>
125 <email>&#116;&#101;&#115;&#116;</email>
127 <email>&#116;&#101;&#115;&#116;</email>
126 </author>
128 </author>
127 <updated>1970-01-01T00:00:00+00:00</updated>
129 <updated>1970-01-01T00:00:00+00:00</updated>
128 <published>1970-01-01T00:00:00+00:00</published>
130 <published>1970-01-01T00:00:00+00:00</published>
129 <content type="xhtml">
131 <content type="xhtml">
130 <div xmlns="http://www.w3.org/1999/xhtml">
132 <div xmlns="http://www.w3.org/1999/xhtml">
131 <pre xml:space="preserve">Added tag 1.0 for changeset 2ef0ac749a14</pre>
133 <pre xml:space="preserve">Added tag 1.0 for changeset 2ef0ac749a14</pre>
132 </div>
134 </div>
133 </content>
135 </content>
134 </entry>
136 </entry>
135 <entry>
137 <entry>
136 <title>base</title>
138 <title>base</title>
137 <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
139 <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
138 <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
140 <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
139 <author>
141 <author>
140 <name>test</name>
142 <name>test</name>
141 <email>&#116;&#101;&#115;&#116;</email>
143 <email>&#116;&#101;&#115;&#116;</email>
142 </author>
144 </author>
143 <updated>1970-01-01T00:00:00+00:00</updated>
145 <updated>1970-01-01T00:00:00+00:00</updated>
144 <published>1970-01-01T00:00:00+00:00</published>
146 <published>1970-01-01T00:00:00+00:00</published>
145 <content type="xhtml">
147 <content type="xhtml">
146 <div xmlns="http://www.w3.org/1999/xhtml">
148 <div xmlns="http://www.w3.org/1999/xhtml">
147 <pre xml:space="preserve">base</pre>
149 <pre xml:space="preserve">base</pre>
148 </div>
150 </div>
149 </content>
151 </content>
150 </entry>
152 </entry>
151
153
152 </feed>
154 </feed>
153 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom'
155 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom'
154 200 Script output follows
156 200 Script output follows
155
157
156 <?xml version="1.0" encoding="ascii"?>
158 <?xml version="1.0" encoding="ascii"?>
157 <feed xmlns="http://www.w3.org/2005/Atom">
159 <feed xmlns="http://www.w3.org/2005/Atom">
158 <id>http://*:$HGPORT/atom-log/tip/foo</id> (glob)
160 <id>http://*:$HGPORT/atom-log/tip/foo</id> (glob)
159 <link rel="self" href="http://*:$HGPORT/atom-log/tip/foo"/> (glob)
161 <link rel="self" href="http://*:$HGPORT/atom-log/tip/foo"/> (glob)
160 <title>test: foo history</title>
162 <title>test: foo history</title>
161 <updated>1970-01-01T00:00:00+00:00</updated>
163 <updated>1970-01-01T00:00:00+00:00</updated>
162
164
163 <entry>
165 <entry>
164 <title>base</title>
166 <title>base</title>
165 <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
167 <id>http://*:$HGPORT/#changeset-2ef0ac749a14e4f57a5a822464a0902c6f7f448f</id> (glob)
166 <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
168 <link href="http://*:$HGPORT/rev/2ef0ac749a14"/> (glob)
167 <author>
169 <author>
168 <name>test</name>
170 <name>test</name>
169 <email>&#116;&#101;&#115;&#116;</email>
171 <email>&#116;&#101;&#115;&#116;</email>
170 </author>
172 </author>
171 <updated>1970-01-01T00:00:00+00:00</updated>
173 <updated>1970-01-01T00:00:00+00:00</updated>
172 <published>1970-01-01T00:00:00+00:00</published>
174 <published>1970-01-01T00:00:00+00:00</published>
173 <content type="xhtml">
175 <content type="xhtml">
174 <div xmlns="http://www.w3.org/1999/xhtml">
176 <div xmlns="http://www.w3.org/1999/xhtml">
175 <pre xml:space="preserve">base</pre>
177 <pre xml:space="preserve">base</pre>
176 </div>
178 </div>
177 </content>
179 </content>
178 </entry>
180 </entry>
179
181
180 </feed>
182 </feed>
181 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/'
183 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/'
182 200 Script output follows
184 200 Script output follows
183
185
184 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
186 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
185 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
187 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
186 <head>
188 <head>
187 <link rel="icon" href="/static/hgicon.png" type="image/png" />
189 <link rel="icon" href="/static/hgicon.png" type="image/png" />
188 <meta name="robots" content="index, nofollow" />
190 <meta name="robots" content="index, nofollow" />
189 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
191 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
190 <script type="text/javascript" src="/static/mercurial.js"></script>
192 <script type="text/javascript" src="/static/mercurial.js"></script>
191
193
192 <title>test: log</title>
194 <title>test: log</title>
193 <link rel="alternate" type="application/atom+xml"
195 <link rel="alternate" type="application/atom+xml"
194 href="/atom-log" title="Atom feed for test" />
196 href="/atom-log" title="Atom feed for test" />
195 <link rel="alternate" type="application/rss+xml"
197 <link rel="alternate" type="application/rss+xml"
196 href="/rss-log" title="RSS feed for test" />
198 href="/rss-log" title="RSS feed for test" />
197 </head>
199 </head>
198 <body>
200 <body>
199
201
200 <div class="container">
202 <div class="container">
201 <div class="menu">
203 <div class="menu">
202 <div class="logo">
204 <div class="logo">
203 <a href="http://mercurial.selenic.com/">
205 <a href="http://mercurial.selenic.com/">
204 <img src="/static/hglogo.png" alt="mercurial" /></a>
206 <img src="/static/hglogo.png" alt="mercurial" /></a>
205 </div>
207 </div>
206 <ul>
208 <ul>
207 <li class="active">log</li>
209 <li class="active">log</li>
208 <li><a href="/graph/1d22e65f027e">graph</a></li>
210 <li><a href="/graph/1d22e65f027e">graph</a></li>
209 <li><a href="/tags">tags</a></li>
211 <li><a href="/tags">tags</a></li>
210 <li><a href="/bookmarks">bookmarks</a></li>
212 <li><a href="/bookmarks">bookmarks</a></li>
211 <li><a href="/branches">branches</a></li>
213 <li><a href="/branches">branches</a></li>
212 </ul>
214 </ul>
213 <ul>
215 <ul>
214 <li><a href="/rev/1d22e65f027e">changeset</a></li>
216 <li><a href="/rev/1d22e65f027e">changeset</a></li>
215 <li><a href="/file/1d22e65f027e">browse</a></li>
217 <li><a href="/file/1d22e65f027e">browse</a></li>
216 </ul>
218 </ul>
217 <ul>
219 <ul>
218
220
219 </ul>
221 </ul>
220 <ul>
222 <ul>
221 <li><a href="/help">help</a></li>
223 <li><a href="/help">help</a></li>
222 </ul>
224 </ul>
223 </div>
225 </div>
224
226
225 <div class="main">
227 <div class="main">
226 <h2><a href="/">test</a></h2>
228 <h2><a href="/">test</a></h2>
227 <h3>log</h3>
229 <h3>log</h3>
228
230
229 <form class="search" action="/log">
231 <form class="search" action="/log">
230
232
231 <p><input name="rev" id="search1" type="text" size="30" /></p>
233 <p><input name="rev" id="search1" type="text" size="30" /></p>
232 <div id="hint">find changesets by author, revision,
234 <div id="hint">find changesets by author, revision,
233 files, or words in the commit message</div>
235 files, or words in the commit message</div>
234 </form>
236 </form>
235
237
236 <div class="navigate">
238 <div class="navigate">
237 <a href="/shortlog/2?revcount=30">less</a>
239 <a href="/shortlog/2?revcount=30">less</a>
238 <a href="/shortlog/2?revcount=120">more</a>
240 <a href="/shortlog/2?revcount=120">more</a>
239 | rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
241 | rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
240 </div>
242 </div>
241
243
242 <table class="bigtable">
244 <table class="bigtable">
243 <tr>
245 <tr>
244 <th class="age">age</th>
246 <th class="age">age</th>
245 <th class="author">author</th>
247 <th class="author">author</th>
246 <th class="description">description</th>
248 <th class="description">description</th>
247 </tr>
249 </tr>
248 <tr class="parity0">
250 <tr class="parity0">
249 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
251 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
250 <td class="author">test</td>
252 <td class="author">test</td>
251 <td class="description"><a href="/rev/1d22e65f027e">branch</a><span class="branchhead">stable</span> <span class="tag">tip</span> <span class="tag">something</span> </td>
253 <td class="description"><a href="/rev/1d22e65f027e">branch</a><span class="branchhead">stable</span> <span class="tag">tip</span> <span class="tag">something</span> </td>
252 </tr>
254 </tr>
253 <tr class="parity1">
255 <tr class="parity1">
254 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
256 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
255 <td class="author">test</td>
257 <td class="author">test</td>
256 <td class="description"><a href="/rev/a4f92ed23982">Added tag 1.0 for changeset 2ef0ac749a14</a><span class="branchhead">default</span> </td>
258 <td class="description"><a href="/rev/a4f92ed23982">Added tag 1.0 for changeset 2ef0ac749a14</a><span class="branchhead">default</span> </td>
257 </tr>
259 </tr>
258 <tr class="parity0">
260 <tr class="parity0">
259 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
261 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
260 <td class="author">test</td>
262 <td class="author">test</td>
261 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td>
263 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td>
262 </tr>
264 </tr>
263
265
264 </table>
266 </table>
265
267
266 <div class="navigate">
268 <div class="navigate">
267 <a href="/shortlog/2?revcount=30">less</a>
269 <a href="/shortlog/2?revcount=30">less</a>
268 <a href="/shortlog/2?revcount=120">more</a>
270 <a href="/shortlog/2?revcount=120">more</a>
269 | rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
271 | rev 2: <a href="/shortlog/2ef0ac749a14">(0)</a> <a href="/shortlog/tip">tip</a>
270 </div>
272 </div>
271
273
272 </div>
274 </div>
273 </div>
275 </div>
274
276
275 <script type="text/javascript">process_dates()</script>
277 <script type="text/javascript">process_dates()</script>
276
278
277
279
278 </body>
280 </body>
279 </html>
281 </html>
280
282
281 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/'
283 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/'
282 200 Script output follows
284 200 Script output follows
283
285
284 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
286 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
285 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
287 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
286 <head>
288 <head>
287 <link rel="icon" href="/static/hgicon.png" type="image/png" />
289 <link rel="icon" href="/static/hgicon.png" type="image/png" />
288 <meta name="robots" content="index, nofollow" />
290 <meta name="robots" content="index, nofollow" />
289 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
291 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
290 <script type="text/javascript" src="/static/mercurial.js"></script>
292 <script type="text/javascript" src="/static/mercurial.js"></script>
291
293
292 <title>test: 2ef0ac749a14</title>
294 <title>test: 2ef0ac749a14</title>
293 </head>
295 </head>
294 <body>
296 <body>
295 <div class="container">
297 <div class="container">
296 <div class="menu">
298 <div class="menu">
297 <div class="logo">
299 <div class="logo">
298 <a href="http://mercurial.selenic.com/">
300 <a href="http://mercurial.selenic.com/">
299 <img src="/static/hglogo.png" alt="mercurial" /></a>
301 <img src="/static/hglogo.png" alt="mercurial" /></a>
300 </div>
302 </div>
301 <ul>
303 <ul>
302 <li><a href="/shortlog/2ef0ac749a14">log</a></li>
304 <li><a href="/shortlog/2ef0ac749a14">log</a></li>
303 <li><a href="/graph/2ef0ac749a14">graph</a></li>
305 <li><a href="/graph/2ef0ac749a14">graph</a></li>
304 <li><a href="/tags">tags</a></li>
306 <li><a href="/tags">tags</a></li>
305 <li><a href="/bookmarks">bookmarks</a></li>
307 <li><a href="/bookmarks">bookmarks</a></li>
306 <li><a href="/branches">branches</a></li>
308 <li><a href="/branches">branches</a></li>
307 </ul>
309 </ul>
308 <ul>
310 <ul>
309 <li class="active">changeset</li>
311 <li class="active">changeset</li>
310 <li><a href="/raw-rev/2ef0ac749a14">raw</a></li>
312 <li><a href="/raw-rev/2ef0ac749a14">raw</a></li>
311 <li><a href="/file/2ef0ac749a14">browse</a></li>
313 <li><a href="/file/2ef0ac749a14">browse</a></li>
312 </ul>
314 </ul>
313 <ul>
315 <ul>
314
316
315 </ul>
317 </ul>
316 <ul>
318 <ul>
317 <li><a href="/help">help</a></li>
319 <li><a href="/help">help</a></li>
318 </ul>
320 </ul>
319 </div>
321 </div>
320
322
321 <div class="main">
323 <div class="main">
322
324
323 <h2><a href="/">test</a></h2>
325 <h2><a href="/">test</a></h2>
324 <h3>changeset 0:2ef0ac749a14 <span class="tag">1.0</span> <span class="tag">anotherthing</span> </h3>
326 <h3>changeset 0:2ef0ac749a14 <span class="tag">1.0</span> <span class="tag">anotherthing</span> </h3>
325
327
326 <form class="search" action="/log">
328 <form class="search" action="/log">
327
329
328 <p><input name="rev" id="search1" type="text" size="30" /></p>
330 <p><input name="rev" id="search1" type="text" size="30" /></p>
329 <div id="hint">find changesets by author, revision,
331 <div id="hint">find changesets by author, revision,
330 files, or words in the commit message</div>
332 files, or words in the commit message</div>
331 </form>
333 </form>
332
334
333 <div class="description">base</div>
335 <div class="description">base</div>
334
336
335 <table id="changesetEntry">
337 <table id="changesetEntry">
336 <tr>
338 <tr>
337 <th class="author">author</th>
339 <th class="author">author</th>
338 <td class="author">&#116;&#101;&#115;&#116;</td>
340 <td class="author">&#116;&#101;&#115;&#116;</td>
339 </tr>
341 </tr>
340 <tr>
342 <tr>
341 <th class="date">date</th>
343 <th class="date">date</th>
342 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
344 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
343 <tr>
345 <tr>
344 <th class="author">parents</th>
346 <th class="author">parents</th>
345 <td class="author"></td>
347 <td class="author"></td>
346 </tr>
348 </tr>
347 <tr>
349 <tr>
348 <th class="author">children</th>
350 <th class="author">children</th>
349 <td class="author"> <a href="/rev/a4f92ed23982">a4f92ed23982</a></td>
351 <td class="author"> <a href="/rev/a4f92ed23982">a4f92ed23982</a></td>
350 </tr>
352 </tr>
351 <tr>
353 <tr>
352 <th class="files">files</th>
354 <th class="files">files</th>
353 <td class="files"><a href="/file/2ef0ac749a14/da/foo">da/foo</a> <a href="/file/2ef0ac749a14/foo">foo</a> </td>
355 <td class="files"><a href="/file/2ef0ac749a14/da/foo">da/foo</a> <a href="/file/2ef0ac749a14/foo">foo</a> </td>
354 </tr>
356 </tr>
355 <tr>
357 <tr>
356 <th class="diffstat">diffstat</th>
358 <th class="diffstat">diffstat</th>
357 <td class="diffstat">
359 <td class="diffstat">
358 2 files changed, 2 insertions(+), 0 deletions(-)
360 2 files changed, 2 insertions(+), 0 deletions(-)
359
361
360 <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a>
362 <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a>
361 <div id="diffstatdetails" style="display:none;">
363 <div id="diffstatdetails" style="display:none;">
362 <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a>
364 <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a>
363 <p>
365 <p>
364 <table> <tr class="parity0">
366 <table> <tr class="parity0">
365 <td class="diffstat-file"><a href="#l1.1">da/foo</a></td>
367 <td class="diffstat-file"><a href="#l1.1">da/foo</a></td>
366 <td class="diffstat-total" align="right">1</td>
368 <td class="diffstat-total" align="right">1</td>
367 <td class="diffstat-graph">
369 <td class="diffstat-graph">
368 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
370 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
369 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
371 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
370 </td>
372 </td>
371 </tr>
373 </tr>
372 <tr class="parity1">
374 <tr class="parity1">
373 <td class="diffstat-file"><a href="#l2.1">foo</a></td>
375 <td class="diffstat-file"><a href="#l2.1">foo</a></td>
374 <td class="diffstat-total" align="right">1</td>
376 <td class="diffstat-total" align="right">1</td>
375 <td class="diffstat-graph">
377 <td class="diffstat-graph">
376 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
378 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
377 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
379 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
378 </td>
380 </td>
379 </tr>
381 </tr>
380 </table>
382 </table>
381 </div>
383 </div>
382 </td>
384 </td>
383 </tr>
385 </tr>
384 </table>
386 </table>
385
387
386 <div class="overflow">
388 <div class="overflow">
387 <div class="sourcefirst"> line diff</div>
389 <div class="sourcefirst"> line diff</div>
388
390
389 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
391 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
390 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/da/foo Thu Jan 01 00:00:00 1970 +0000
392 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/da/foo Thu Jan 01 00:00:00 1970 +0000
391 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
393 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
392 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+foo
394 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+foo
393 </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
395 </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
394 </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/foo Thu Jan 01 00:00:00 1970 +0000
396 </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/foo Thu Jan 01 00:00:00 1970 +0000
395 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@
397 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@
396 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+foo
398 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+foo
397 </span></pre></div>
399 </span></pre></div>
398 </div>
400 </div>
399
401
400 </div>
402 </div>
401 </div>
403 </div>
402 <script type="text/javascript">process_dates()</script>
404 <script type="text/javascript">process_dates()</script>
403
405
404
406
405 </body>
407 </body>
406 </html>
408 </html>
407
409
408 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw'
410 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw'
409 200 Script output follows
411 200 Script output follows
410
412
411
413
412 # HG changeset patch
414 # HG changeset patch
413 # User test
415 # User test
414 # Date 0 0
416 # Date 0 0
415 # Node ID a4f92ed23982be056b9852de5dfe873eaac7f0de
417 # Node ID a4f92ed23982be056b9852de5dfe873eaac7f0de
416 # Parent 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
418 # Parent 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
417 Added tag 1.0 for changeset 2ef0ac749a14
419 Added tag 1.0 for changeset 2ef0ac749a14
418
420
419 diff -r 2ef0ac749a14 -r a4f92ed23982 .hgtags
421 diff -r 2ef0ac749a14 -r a4f92ed23982 .hgtags
420 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
422 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
421 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
423 +++ b/.hgtags Thu Jan 01 00:00:00 1970 +0000
422 @@ -0,0 +1,1 @@
424 @@ -0,0 +1,1 @@
423 +2ef0ac749a14e4f57a5a822464a0902c6f7f448f 1.0
425 +2ef0ac749a14e4f57a5a822464a0902c6f7f448f 1.0
424
426
425 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base'
427 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base'
426 200 Script output follows
428 200 Script output follows
427
429
428 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
430 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
429 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
431 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
430 <head>
432 <head>
431 <link rel="icon" href="/static/hgicon.png" type="image/png" />
433 <link rel="icon" href="/static/hgicon.png" type="image/png" />
432 <meta name="robots" content="index, nofollow" />
434 <meta name="robots" content="index, nofollow" />
433 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
435 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
434 <script type="text/javascript" src="/static/mercurial.js"></script>
436 <script type="text/javascript" src="/static/mercurial.js"></script>
435
437
436 <title>test: searching for base</title>
438 <title>test: searching for base</title>
437 </head>
439 </head>
438 <body>
440 <body>
439
441
440 <div class="container">
442 <div class="container">
441 <div class="menu">
443 <div class="menu">
442 <div class="logo">
444 <div class="logo">
443 <a href="http://mercurial.selenic.com/">
445 <a href="http://mercurial.selenic.com/">
444 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
446 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
445 </div>
447 </div>
446 <ul>
448 <ul>
447 <li><a href="/shortlog">log</a></li>
449 <li><a href="/shortlog">log</a></li>
448 <li><a href="/graph">graph</a></li>
450 <li><a href="/graph">graph</a></li>
449 <li><a href="/tags">tags</a></li>
451 <li><a href="/tags">tags</a></li>
450 <li><a href="/bookmarks">bookmarks</a></li>
452 <li><a href="/bookmarks">bookmarks</a></li>
451 <li><a href="/branches">branches</a></li>
453 <li><a href="/branches">branches</a></li>
452 <li><a href="/help">help</a></li>
454 <li><a href="/help">help</a></li>
453 </ul>
455 </ul>
454 </div>
456 </div>
455
457
456 <div class="main">
458 <div class="main">
457 <h2><a href="/">test</a></h2>
459 <h2><a href="/">test</a></h2>
458 <h3>searching for 'base'</h3>
460 <h3>searching for 'base'</h3>
459
461
460 <form class="search" action="/log">
462 <form class="search" action="/log">
461
463
462 <p><input name="rev" id="search1" type="text" size="30"></p>
464 <p><input name="rev" id="search1" type="text" size="30"></p>
463 <div id="hint">find changesets by author, revision,
465 <div id="hint">find changesets by author, revision,
464 files, or words in the commit message</div>
466 files, or words in the commit message</div>
465 </form>
467 </form>
466
468
467 <div class="navigate">
469 <div class="navigate">
468 <a href="/search/?rev=base&revcount=5">less</a>
470 <a href="/search/?rev=base&revcount=5">less</a>
469 <a href="/search/?rev=base&revcount=20">more</a>
471 <a href="/search/?rev=base&revcount=20">more</a>
470 </div>
472 </div>
471
473
472 <table class="bigtable">
474 <table class="bigtable">
473 <tr>
475 <tr>
474 <th class="age">age</th>
476 <th class="age">age</th>
475 <th class="author">author</th>
477 <th class="author">author</th>
476 <th class="description">description</th>
478 <th class="description">description</th>
477 </tr>
479 </tr>
478 <tr class="parity0">
480 <tr class="parity0">
479 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
481 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
480 <td class="author">test</td>
482 <td class="author">test</td>
481 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td>
483 <td class="description"><a href="/rev/2ef0ac749a14">base</a><span class="tag">1.0</span> <span class="tag">anotherthing</span> </td>
482 </tr>
484 </tr>
483
485
484 </table>
486 </table>
485
487
486 <div class="navigate">
488 <div class="navigate">
487 <a href="/search/?rev=base&revcount=5">less</a>
489 <a href="/search/?rev=base&revcount=5">less</a>
488 <a href="/search/?rev=base&revcount=20">more</a>
490 <a href="/search/?rev=base&revcount=20">more</a>
489 </div>
491 </div>
490
492
491 </div>
493 </div>
492 </div>
494 </div>
493
495
494 <script type="text/javascript">process_dates()</script>
496 <script type="text/javascript">process_dates()</script>
495
497
496
498
497 </body>
499 </body>
498 </html>
500 </html>
499
501
500
502
501 File-related
503 File-related
502
504
503 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw'
505 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw'
504 200 Script output follows
506 200 Script output follows
505
507
506 foo
508 foo
507 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw'
509 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw'
508 200 Script output follows
510 200 Script output follows
509
511
510
512
511 test@0: foo
513 test@0: foo
512
514
513
515
514
516
515
517
516 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw'
518 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw'
517 200 Script output follows
519 200 Script output follows
518
520
519
521
520 drwxr-xr-x da
522 drwxr-xr-x da
521 -rw-r--r-- 45 .hgtags
523 -rw-r--r-- 45 .hgtags
522 -rw-r--r-- 4 foo
524 -rw-r--r-- 4 foo
523
525
524
526
525 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo'
527 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo'
526 200 Script output follows
528 200 Script output follows
527
529
528 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
530 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
529 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
531 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
530 <head>
532 <head>
531 <link rel="icon" href="/static/hgicon.png" type="image/png" />
533 <link rel="icon" href="/static/hgicon.png" type="image/png" />
532 <meta name="robots" content="index, nofollow" />
534 <meta name="robots" content="index, nofollow" />
533 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
535 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
534 <script type="text/javascript" src="/static/mercurial.js"></script>
536 <script type="text/javascript" src="/static/mercurial.js"></script>
535
537
536 <title>test: a4f92ed23982 foo</title>
538 <title>test: a4f92ed23982 foo</title>
537 </head>
539 </head>
538 <body>
540 <body>
539
541
540 <div class="container">
542 <div class="container">
541 <div class="menu">
543 <div class="menu">
542 <div class="logo">
544 <div class="logo">
543 <a href="http://mercurial.selenic.com/">
545 <a href="http://mercurial.selenic.com/">
544 <img src="/static/hglogo.png" alt="mercurial" /></a>
546 <img src="/static/hglogo.png" alt="mercurial" /></a>
545 </div>
547 </div>
546 <ul>
548 <ul>
547 <li><a href="/shortlog/a4f92ed23982">log</a></li>
549 <li><a href="/shortlog/a4f92ed23982">log</a></li>
548 <li><a href="/graph/a4f92ed23982">graph</a></li>
550 <li><a href="/graph/a4f92ed23982">graph</a></li>
549 <li><a href="/tags">tags</a></li>
551 <li><a href="/tags">tags</a></li>
550 <li><a href="/branches">branches</a></li>
552 <li><a href="/branches">branches</a></li>
551 </ul>
553 </ul>
552 <ul>
554 <ul>
553 <li><a href="/rev/a4f92ed23982">changeset</a></li>
555 <li><a href="/rev/a4f92ed23982">changeset</a></li>
554 <li><a href="/file/a4f92ed23982/">browse</a></li>
556 <li><a href="/file/a4f92ed23982/">browse</a></li>
555 </ul>
557 </ul>
556 <ul>
558 <ul>
557 <li class="active">file</li>
559 <li class="active">file</li>
558 <li><a href="/file/tip/foo">latest</a></li>
560 <li><a href="/file/tip/foo">latest</a></li>
559 <li><a href="/diff/a4f92ed23982/foo">diff</a></li>
561 <li><a href="/diff/a4f92ed23982/foo">diff</a></li>
560 <li><a href="/annotate/a4f92ed23982/foo">annotate</a></li>
562 <li><a href="/annotate/a4f92ed23982/foo">annotate</a></li>
561 <li><a href="/log/a4f92ed23982/foo">file log</a></li>
563 <li><a href="/log/a4f92ed23982/foo">file log</a></li>
562 <li><a href="/raw-file/a4f92ed23982/foo">raw</a></li>
564 <li><a href="/raw-file/a4f92ed23982/foo">raw</a></li>
563 </ul>
565 </ul>
564 <ul>
566 <ul>
565 <li><a href="/help">help</a></li>
567 <li><a href="/help">help</a></li>
566 </ul>
568 </ul>
567 </div>
569 </div>
568
570
569 <div class="main">
571 <div class="main">
570 <h2><a href="/">test</a></h2>
572 <h2><a href="/">test</a></h2>
571 <h3>view foo @ 1:a4f92ed23982</h3>
573 <h3>view foo @ 1:a4f92ed23982</h3>
572
574
573 <form class="search" action="/log">
575 <form class="search" action="/log">
574
576
575 <p><input name="rev" id="search1" type="text" size="30" /></p>
577 <p><input name="rev" id="search1" type="text" size="30" /></p>
576 <div id="hint">find changesets by author, revision,
578 <div id="hint">find changesets by author, revision,
577 files, or words in the commit message</div>
579 files, or words in the commit message</div>
578 </form>
580 </form>
579
581
580 <div class="description">Added tag 1.0 for changeset 2ef0ac749a14</div>
582 <div class="description">Added tag 1.0 for changeset 2ef0ac749a14</div>
581
583
582 <table id="changesetEntry">
584 <table id="changesetEntry">
583 <tr>
585 <tr>
584 <th class="author">author</th>
586 <th class="author">author</th>
585 <td class="author">&#116;&#101;&#115;&#116;</td>
587 <td class="author">&#116;&#101;&#115;&#116;</td>
586 </tr>
588 </tr>
587 <tr>
589 <tr>
588 <th class="date">date</th>
590 <th class="date">date</th>
589 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
591 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
590 </tr>
592 </tr>
591 <tr>
593 <tr>
592 <th class="author">parents</th>
594 <th class="author">parents</th>
593 <td class="author"></td>
595 <td class="author"></td>
594 </tr>
596 </tr>
595 <tr>
597 <tr>
596 <th class="author">children</th>
598 <th class="author">children</th>
597 <td class="author"><a href="/file/1d22e65f027e/foo">1d22e65f027e</a> </td>
599 <td class="author"><a href="/file/1d22e65f027e/foo">1d22e65f027e</a> </td>
598 </tr>
600 </tr>
599
601
600 </table>
602 </table>
601
603
602 <div class="overflow">
604 <div class="overflow">
603 <div class="sourcefirst"> line source</div>
605 <div class="sourcefirst"> line source</div>
604
606
605 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> foo
607 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> foo
606 </div>
608 </div>
607 <div class="sourcelast"></div>
609 <div class="sourcelast"></div>
608 </div>
610 </div>
609 </div>
611 </div>
610 </div>
612 </div>
611
613
612 <script type="text/javascript">process_dates()</script>
614 <script type="text/javascript">process_dates()</script>
613
615
614
616
615 </body>
617 </body>
616 </html>
618 </html>
617
619
618 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw'
620 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw'
619 200 Script output follows
621 200 Script output follows
620
622
621
623
622 diff -r 000000000000 -r a4f92ed23982 foo
624 diff -r 000000000000 -r a4f92ed23982 foo
623 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
625 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
624 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
626 +++ b/foo Thu Jan 01 00:00:00 1970 +0000
625 @@ -0,0 +1,1 @@
627 @@ -0,0 +1,1 @@
626 +foo
628 +foo
627
629
628
630
629
631
630
632
631
633
632 Overviews
634 Overviews
633
635
634 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-tags'
636 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-tags'
635 200 Script output follows
637 200 Script output follows
636
638
637 tip 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
639 tip 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
638 1.0 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
640 1.0 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
639 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-branches'
641 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-branches'
640 200 Script output follows
642 200 Script output follows
641
643
642 stable 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe open
644 stable 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe open
643 default a4f92ed23982be056b9852de5dfe873eaac7f0de inactive
645 default a4f92ed23982be056b9852de5dfe873eaac7f0de inactive
644 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-bookmarks'
646 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-bookmarks'
645 200 Script output follows
647 200 Script output follows
646
648
647 anotherthing 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
649 anotherthing 2ef0ac749a14e4f57a5a822464a0902c6f7f448f
648 something 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
650 something 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
649 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb'
651 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb'
650 200 Script output follows
652 200 Script output follows
651
653
652 <?xml version="1.0" encoding="ascii"?>
654 <?xml version="1.0" encoding="ascii"?>
653 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
655 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
654 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
656 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
655 <head>
657 <head>
656 <link rel="icon" href="/static/hgicon.png" type="image/png" />
658 <link rel="icon" href="/static/hgicon.png" type="image/png" />
657 <meta name="robots" content="index, nofollow"/>
659 <meta name="robots" content="index, nofollow"/>
658 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
660 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
659 <script type="text/javascript" src="/static/mercurial.js"></script>
661 <script type="text/javascript" src="/static/mercurial.js"></script>
660
662
661 <title>test: Summary</title>
663 <title>test: Summary</title>
662 <link rel="alternate" type="application/atom+xml"
664 <link rel="alternate" type="application/atom+xml"
663 href="/atom-log" title="Atom feed for test"/>
665 href="/atom-log" title="Atom feed for test"/>
664 <link rel="alternate" type="application/rss+xml"
666 <link rel="alternate" type="application/rss+xml"
665 href="/rss-log" title="RSS feed for test"/>
667 href="/rss-log" title="RSS feed for test"/>
666 </head>
668 </head>
667 <body>
669 <body>
668
670
669 <div class="page_header">
671 <div class="page_header">
670 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="/summary?style=gitweb">test</a> / summary
672 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="/summary?style=gitweb">test</a> / summary
671
673
672 <form action="/log">
674 <form action="/log">
673 <input type="hidden" name="style" value="gitweb" />
675 <input type="hidden" name="style" value="gitweb" />
674 <div class="search">
676 <div class="search">
675 <input type="text" name="rev" />
677 <input type="text" name="rev" />
676 </div>
678 </div>
677 </form>
679 </form>
678 </div>
680 </div>
679
681
680 <div class="page_nav">
682 <div class="page_nav">
681 summary |
683 summary |
682 <a href="/shortlog?style=gitweb">shortlog</a> |
684 <a href="/shortlog?style=gitweb">shortlog</a> |
683 <a href="/log?style=gitweb">changelog</a> |
685 <a href="/log?style=gitweb">changelog</a> |
684 <a href="/graph?style=gitweb">graph</a> |
686 <a href="/graph?style=gitweb">graph</a> |
685 <a href="/tags?style=gitweb">tags</a> |
687 <a href="/tags?style=gitweb">tags</a> |
686 <a href="/bookmarks?style=gitweb">bookmarks</a> |
688 <a href="/bookmarks?style=gitweb">bookmarks</a> |
687 <a href="/branches?style=gitweb">branches</a> |
689 <a href="/branches?style=gitweb">branches</a> |
688 <a href="/file/1d22e65f027e?style=gitweb">files</a> |
690 <a href="/file/1d22e65f027e?style=gitweb">files</a> |
689 <a href="/help?style=gitweb">help</a>
691 <a href="/help?style=gitweb">help</a>
690 <br/>
692 <br/>
691 </div>
693 </div>
692
694
693 <div class="title">&nbsp;</div>
695 <div class="title">&nbsp;</div>
694 <table cellspacing="0">
696 <table cellspacing="0">
695 <tr><td>description</td><td>unknown</td></tr>
697 <tr><td>description</td><td>unknown</td></tr>
696 <tr><td>owner</td><td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td></tr>
698 <tr><td>owner</td><td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td></tr>
697 <tr><td>last change</td><td>Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
699 <tr><td>last change</td><td>Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
698 </table>
700 </table>
699
701
700 <div><a class="title" href="/shortlog?style=gitweb">changes</a></div>
702 <div><a class="title" href="/shortlog?style=gitweb">changes</a></div>
701 <table cellspacing="0">
703 <table cellspacing="0">
702
704
703 <tr class="parity0">
705 <tr class="parity0">
704 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
706 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
705 <td><i>test</i></td>
707 <td><i>test</i></td>
706 <td>
708 <td>
707 <a class="list" href="/rev/1d22e65f027e?style=gitweb">
709 <a class="list" href="/rev/1d22e65f027e?style=gitweb">
708 <b>branch</b>
710 <b>branch</b>
709 <span class="logtags"><span class="branchtag" title="stable">stable</span> <span class="tagtag" title="tip">tip</span> <span class="bookmarktag" title="something">something</span> </span>
711 <span class="logtags"><span class="branchtag" title="stable">stable</span> <span class="tagtag" title="tip">tip</span> <span class="bookmarktag" title="something">something</span> </span>
710 </a>
712 </a>
711 </td>
713 </td>
712 <td class="link" nowrap>
714 <td class="link" nowrap>
713 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
715 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
714 <a href="/file/1d22e65f027e?style=gitweb">files</a>
716 <a href="/file/1d22e65f027e?style=gitweb">files</a>
715 </td>
717 </td>
716 </tr>
718 </tr>
717 <tr class="parity1">
719 <tr class="parity1">
718 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
720 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
719 <td><i>test</i></td>
721 <td><i>test</i></td>
720 <td>
722 <td>
721 <a class="list" href="/rev/a4f92ed23982?style=gitweb">
723 <a class="list" href="/rev/a4f92ed23982?style=gitweb">
722 <b>Added tag 1.0 for changeset 2ef0ac749a14</b>
724 <b>Added tag 1.0 for changeset 2ef0ac749a14</b>
723 <span class="logtags"><span class="branchtag" title="default">default</span> </span>
725 <span class="logtags"><span class="branchtag" title="default">default</span> </span>
724 </a>
726 </a>
725 </td>
727 </td>
726 <td class="link" nowrap>
728 <td class="link" nowrap>
727 <a href="/rev/a4f92ed23982?style=gitweb">changeset</a> |
729 <a href="/rev/a4f92ed23982?style=gitweb">changeset</a> |
728 <a href="/file/a4f92ed23982?style=gitweb">files</a>
730 <a href="/file/a4f92ed23982?style=gitweb">files</a>
729 </td>
731 </td>
730 </tr>
732 </tr>
731 <tr class="parity0">
733 <tr class="parity0">
732 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
734 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
733 <td><i>test</i></td>
735 <td><i>test</i></td>
734 <td>
736 <td>
735 <a class="list" href="/rev/2ef0ac749a14?style=gitweb">
737 <a class="list" href="/rev/2ef0ac749a14?style=gitweb">
736 <b>base</b>
738 <b>base</b>
737 <span class="logtags"><span class="tagtag" title="1.0">1.0</span> <span class="bookmarktag" title="anotherthing">anotherthing</span> </span>
739 <span class="logtags"><span class="tagtag" title="1.0">1.0</span> <span class="bookmarktag" title="anotherthing">anotherthing</span> </span>
738 </a>
740 </a>
739 </td>
741 </td>
740 <td class="link" nowrap>
742 <td class="link" nowrap>
741 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
743 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
742 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
744 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
743 </td>
745 </td>
744 </tr>
746 </tr>
745 <tr class="light"><td colspan="4"><a class="list" href="/shortlog?style=gitweb">...</a></td></tr>
747 <tr class="light"><td colspan="4"><a class="list" href="/shortlog?style=gitweb">...</a></td></tr>
746 </table>
748 </table>
747
749
748 <div><a class="title" href="/tags?style=gitweb">tags</a></div>
750 <div><a class="title" href="/tags?style=gitweb">tags</a></div>
749 <table cellspacing="0">
751 <table cellspacing="0">
750
752
751 <tr class="parity0">
753 <tr class="parity0">
752 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
754 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
753 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>1.0</b></a></td>
755 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>1.0</b></a></td>
754 <td class="link">
756 <td class="link">
755 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
757 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
756 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
758 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
757 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
759 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
758 </td>
760 </td>
759 </tr>
761 </tr>
760 <tr class="light"><td colspan="3"><a class="list" href="/tags?style=gitweb">...</a></td></tr>
762 <tr class="light"><td colspan="3"><a class="list" href="/tags?style=gitweb">...</a></td></tr>
761 </table>
763 </table>
762
764
763 <div><a class="title" href="/bookmarks?style=gitweb">bookmarks</a></div>
765 <div><a class="title" href="/bookmarks?style=gitweb">bookmarks</a></div>
764 <table cellspacing="0">
766 <table cellspacing="0">
765
767
766 <tr class="parity0">
768 <tr class="parity0">
767 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
769 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
768 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>anotherthing</b></a></td>
770 <td><a class="list" href="/rev/2ef0ac749a14?style=gitweb"><b>anotherthing</b></a></td>
769 <td class="link">
771 <td class="link">
770 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
772 <a href="/rev/2ef0ac749a14?style=gitweb">changeset</a> |
771 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
773 <a href="/log/2ef0ac749a14?style=gitweb">changelog</a> |
772 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
774 <a href="/file/2ef0ac749a14?style=gitweb">files</a>
773 </td>
775 </td>
774 </tr>
776 </tr>
775 <tr class="parity1">
777 <tr class="parity1">
776 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
778 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
777 <td><a class="list" href="/rev/1d22e65f027e?style=gitweb"><b>something</b></a></td>
779 <td><a class="list" href="/rev/1d22e65f027e?style=gitweb"><b>something</b></a></td>
778 <td class="link">
780 <td class="link">
779 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
781 <a href="/rev/1d22e65f027e?style=gitweb">changeset</a> |
780 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
782 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
781 <a href="/file/1d22e65f027e?style=gitweb">files</a>
783 <a href="/file/1d22e65f027e?style=gitweb">files</a>
782 </td>
784 </td>
783 </tr>
785 </tr>
784 <tr class="light"><td colspan="3"><a class="list" href="/bookmarks?style=gitweb">...</a></td></tr>
786 <tr class="light"><td colspan="3"><a class="list" href="/bookmarks?style=gitweb">...</a></td></tr>
785 </table>
787 </table>
786
788
787 <div><a class="title" href="#">branches</a></div>
789 <div><a class="title" href="#">branches</a></div>
788 <table cellspacing="0">
790 <table cellspacing="0">
789
791
790 <tr class="parity0">
792 <tr class="parity0">
791 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
793 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
792 <td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
794 <td><a class="list" href="/shortlog/1d22e65f027e?style=gitweb"><b>1d22e65f027e</b></a></td>
793 <td class="">stable</td>
795 <td class="">stable</td>
794 <td class="link">
796 <td class="link">
795 <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
797 <a href="/changeset/1d22e65f027e?style=gitweb">changeset</a> |
796 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
798 <a href="/log/1d22e65f027e?style=gitweb">changelog</a> |
797 <a href="/file/1d22e65f027e?style=gitweb">files</a>
799 <a href="/file/1d22e65f027e?style=gitweb">files</a>
798 </td>
800 </td>
799 </tr>
801 </tr>
800 <tr class="parity1">
802 <tr class="parity1">
801 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
803 <td class="age"><i class="age">Thu, 01 Jan 1970 00:00:00 +0000</i></td>
802 <td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
804 <td><a class="list" href="/shortlog/a4f92ed23982?style=gitweb"><b>a4f92ed23982</b></a></td>
803 <td class="">default</td>
805 <td class="">default</td>
804 <td class="link">
806 <td class="link">
805 <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
807 <a href="/changeset/a4f92ed23982?style=gitweb">changeset</a> |
806 <a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
808 <a href="/log/a4f92ed23982?style=gitweb">changelog</a> |
807 <a href="/file/a4f92ed23982?style=gitweb">files</a>
809 <a href="/file/a4f92ed23982?style=gitweb">files</a>
808 </td>
810 </td>
809 </tr>
811 </tr>
810 <tr class="light">
812 <tr class="light">
811 <td colspan="4"><a class="list" href="#">...</a></td>
813 <td colspan="4"><a class="list" href="#">...</a></td>
812 </tr>
814 </tr>
813 </table>
815 </table>
814 <script type="text/javascript">process_dates()</script>
816 <script type="text/javascript">process_dates()</script>
815 <div class="page_footer">
817 <div class="page_footer">
816 <div class="page_footer_text">test</div>
818 <div class="page_footer_text">test</div>
817 <div class="rss_logo">
819 <div class="rss_logo">
818 <a href="/rss-log">RSS</a>
820 <a href="/rss-log">RSS</a>
819 <a href="/atom-log">Atom</a>
821 <a href="/atom-log">Atom</a>
820 </div>
822 </div>
821 <br />
823 <br />
822
824
823 </div>
825 </div>
824 </body>
826 </body>
825 </html>
827 </html>
826
828
827 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb'
829 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb'
828 200 Script output follows
830 200 Script output follows
829
831
830 <?xml version="1.0" encoding="ascii"?>
832 <?xml version="1.0" encoding="ascii"?>
831 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
833 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
832 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
834 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
833 <head>
835 <head>
834 <link rel="icon" href="/static/hgicon.png" type="image/png" />
836 <link rel="icon" href="/static/hgicon.png" type="image/png" />
835 <meta name="robots" content="index, nofollow"/>
837 <meta name="robots" content="index, nofollow"/>
836 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
838 <link rel="stylesheet" href="/static/style-gitweb.css" type="text/css" />
837 <script type="text/javascript" src="/static/mercurial.js"></script>
839 <script type="text/javascript" src="/static/mercurial.js"></script>
838
840
839 <title>test: Graph</title>
841 <title>test: Graph</title>
840 <link rel="alternate" type="application/atom+xml"
842 <link rel="alternate" type="application/atom+xml"
841 href="/atom-log" title="Atom feed for test"/>
843 href="/atom-log" title="Atom feed for test"/>
842 <link rel="alternate" type="application/rss+xml"
844 <link rel="alternate" type="application/rss+xml"
843 href="/rss-log" title="RSS feed for test"/>
845 href="/rss-log" title="RSS feed for test"/>
844 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
846 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
845 </head>
847 </head>
846 <body>
848 <body>
847
849
848 <div class="page_header">
850 <div class="page_header">
849 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="/summary?style=gitweb">test</a> / graph
851 <a href="http://mercurial.selenic.com/" title="Mercurial" style="float: right;">Mercurial</a><a href="/summary?style=gitweb">test</a> / graph
850 </div>
852 </div>
851
853
852 <form action="/log">
854 <form action="/log">
853 <input type="hidden" name="style" value="gitweb" />
855 <input type="hidden" name="style" value="gitweb" />
854 <div class="search">
856 <div class="search">
855 <input type="text" name="rev" />
857 <input type="text" name="rev" />
856 </div>
858 </div>
857 </form>
859 </form>
858 <div class="page_nav">
860 <div class="page_nav">
859 <a href="/summary?style=gitweb">summary</a> |
861 <a href="/summary?style=gitweb">summary</a> |
860 <a href="/shortlog?style=gitweb">shortlog</a> |
862 <a href="/shortlog?style=gitweb">shortlog</a> |
861 <a href="/log/2?style=gitweb">changelog</a> |
863 <a href="/log/2?style=gitweb">changelog</a> |
862 graph |
864 graph |
863 <a href="/tags?style=gitweb">tags</a> |
865 <a href="/tags?style=gitweb">tags</a> |
864 <a href="/bookmarks?style=gitweb">bookmarks</a> |
866 <a href="/bookmarks?style=gitweb">bookmarks</a> |
865 <a href="/branches?style=gitweb">branches</a> |
867 <a href="/branches?style=gitweb">branches</a> |
866 <a href="/file/1d22e65f027e?style=gitweb">files</a> |
868 <a href="/file/1d22e65f027e?style=gitweb">files</a> |
867 <a href="/help?style=gitweb">help</a>
869 <a href="/help?style=gitweb">help</a>
868 <br/>
870 <br/>
869 <a href="/graph/2?style=gitweb&revcount=30">less</a>
871 <a href="/graph/2?style=gitweb&revcount=30">less</a>
870 <a href="/graph/2?style=gitweb&revcount=120">more</a>
872 <a href="/graph/2?style=gitweb&revcount=120">more</a>
871 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a> <br/>
873 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a> <br/>
872 </div>
874 </div>
873
875
874 <div class="title">&nbsp;</div>
876 <div class="title">&nbsp;</div>
875
877
876 <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
878 <noscript>The revision graph only works with JavaScript-enabled browsers.</noscript>
877
879
878 <div id="wrapper">
880 <div id="wrapper">
879 <ul id="nodebgs"></ul>
881 <ul id="nodebgs"></ul>
880 <canvas id="graph" width="480" height="129"></canvas>
882 <canvas id="graph" width="480" height="129"></canvas>
881 <ul id="graphnodes"></ul>
883 <ul id="graphnodes"></ul>
882 </div>
884 </div>
883
885
884 <script>
886 <script>
885 <!-- hide script content
887 <!-- hide script content
886
888
887 var data = [["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", true], ["tip"], ["something"]], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]];
889 var data = [["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", true], ["tip"], ["something"]], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]];
888 var graph = new Graph();
890 var graph = new Graph();
889 graph.scale(39);
891 graph.scale(39);
890
892
891 graph.edge = function(x0, y0, x1, y1, color) {
893 graph.edge = function(x0, y0, x1, y1, color) {
892
894
893 this.setColor(color, 0.0, 0.65);
895 this.setColor(color, 0.0, 0.65);
894 this.ctx.beginPath();
896 this.ctx.beginPath();
895 this.ctx.moveTo(x0, y0);
897 this.ctx.moveTo(x0, y0);
896 this.ctx.lineTo(x1, y1);
898 this.ctx.lineTo(x1, y1);
897 this.ctx.stroke();
899 this.ctx.stroke();
898
900
899 }
901 }
900
902
901 var revlink = '<li style="_STYLE"><span class="desc">';
903 var revlink = '<li style="_STYLE"><span class="desc">';
902 revlink += '<a class="list" href="/rev/_NODEID?style=gitweb" title="_NODEID"><b>_DESC</b></a>';
904 revlink += '<a class="list" href="/rev/_NODEID?style=gitweb" title="_NODEID"><b>_DESC</b></a>';
903 revlink += '</span> _TAGS';
905 revlink += '</span> _TAGS';
904 revlink += '<span class="info">_DATE, by _USER</span></li>';
906 revlink += '<span class="info">_DATE, by _USER</span></li>';
905
907
906 graph.vertex = function(x, y, color, parity, cur) {
908 graph.vertex = function(x, y, color, parity, cur) {
907
909
908 this.ctx.beginPath();
910 this.ctx.beginPath();
909 color = this.setColor(color, 0.25, 0.75);
911 color = this.setColor(color, 0.25, 0.75);
910 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
912 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
911 this.ctx.fill();
913 this.ctx.fill();
912
914
913 var bg = '<li class="bg parity' + parity + '"></li>';
915 var bg = '<li class="bg parity' + parity + '"></li>';
914 var left = (this.columns + 1) * this.bg_height;
916 var left = (this.columns + 1) * this.bg_height;
915 var nstyle = 'padding-left: ' + left + 'px;';
917 var nstyle = 'padding-left: ' + left + 'px;';
916 var item = revlink.replace(/_STYLE/, nstyle);
918 var item = revlink.replace(/_STYLE/, nstyle);
917 item = item.replace(/_PARITY/, 'parity' + parity);
919 item = item.replace(/_PARITY/, 'parity' + parity);
918 item = item.replace(/_NODEID/, cur[0]);
920 item = item.replace(/_NODEID/, cur[0]);
919 item = item.replace(/_NODEID/, cur[0]);
921 item = item.replace(/_NODEID/, cur[0]);
920 item = item.replace(/_DESC/, cur[3]);
922 item = item.replace(/_DESC/, cur[3]);
921 item = item.replace(/_USER/, cur[4]);
923 item = item.replace(/_USER/, cur[4]);
922 item = item.replace(/_DATE/, cur[5]);
924 item = item.replace(/_DATE/, cur[5]);
923
925
924 var tagspan = '';
926 var tagspan = '';
925 if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) {
927 if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) {
926 tagspan = '<span class="logtags">';
928 tagspan = '<span class="logtags">';
927 if (cur[6][1]) {
929 if (cur[6][1]) {
928 tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
930 tagspan += '<span class="branchtag" title="' + cur[6][0] + '">';
929 tagspan += cur[6][0] + '</span> ';
931 tagspan += cur[6][0] + '</span> ';
930 } else if (!cur[6][1] && cur[6][0] != 'default') {
932 } else if (!cur[6][1] && cur[6][0] != 'default') {
931 tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">';
933 tagspan += '<span class="inbranchtag" title="' + cur[6][0] + '">';
932 tagspan += cur[6][0] + '</span> ';
934 tagspan += cur[6][0] + '</span> ';
933 }
935 }
934 if (cur[7].length) {
936 if (cur[7].length) {
935 for (var t in cur[7]) {
937 for (var t in cur[7]) {
936 var tag = cur[7][t];
938 var tag = cur[7][t];
937 tagspan += '<span class="tagtag">' + tag + '</span> ';
939 tagspan += '<span class="tagtag">' + tag + '</span> ';
938 }
940 }
939 }
941 }
940 if (cur[8].length) {
942 if (cur[8].length) {
941 for (var t in cur[8]) {
943 for (var t in cur[8]) {
942 var bookmark = cur[8][t];
944 var bookmark = cur[8][t];
943 tagspan += '<span class="bookmarktag">' + bookmark + '</span> ';
945 tagspan += '<span class="bookmarktag">' + bookmark + '</span> ';
944 }
946 }
945 }
947 }
946 tagspan += '</span>';
948 tagspan += '</span>';
947 }
949 }
948
950
949 item = item.replace(/_TAGS/, tagspan);
951 item = item.replace(/_TAGS/, tagspan);
950 return [bg, item];
952 return [bg, item];
951
953
952 }
954 }
953
955
954 graph.render(data);
956 graph.render(data);
955
957
956 // stop hiding script -->
958 // stop hiding script -->
957 </script>
959 </script>
958
960
959 <div class="page_nav">
961 <div class="page_nav">
960 <a href="/graph/2?style=gitweb&revcount=30">less</a>
962 <a href="/graph/2?style=gitweb&revcount=30">less</a>
961 <a href="/graph/2?style=gitweb&revcount=120">more</a>
963 <a href="/graph/2?style=gitweb&revcount=120">more</a>
962 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a>
964 | <a href="/graph/2ef0ac749a14?style=gitweb">(0)</a> <a href="/graph/2ef0ac749a14?style=gitweb">-2</a> <a href="/graph/tip?style=gitweb">tip</a>
963 </div>
965 </div>
964
966
965 <script type="text/javascript">process_dates()</script>
967 <script type="text/javascript">process_dates()</script>
966 <div class="page_footer">
968 <div class="page_footer">
967 <div class="page_footer_text">test</div>
969 <div class="page_footer_text">test</div>
968 <div class="rss_logo">
970 <div class="rss_logo">
969 <a href="/rss-log">RSS</a>
971 <a href="/rss-log">RSS</a>
970 <a href="/atom-log">Atom</a>
972 <a href="/atom-log">Atom</a>
971 </div>
973 </div>
972 <br />
974 <br />
973
975
974 </div>
976 </div>
975 </body>
977 </body>
976 </html>
978 </html>
977
979
978
980
979 capabilities
981 capabilities
980
982
981 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'; echo
983 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=capabilities'; echo
982 200 Script output follows
984 200 Script output follows
983
985
984 lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024
986 lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024
985
987
986 heads
988 heads
987
989
988 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads'
990 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=heads'
989 200 Script output follows
991 200 Script output follows
990
992
991 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
993 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe
992
994
993 branches
995 branches
994
996
995 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches&nodes=0000000000000000000000000000000000000000'
997 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=branches&nodes=0000000000000000000000000000000000000000'
996 200 Script output follows
998 200 Script output follows
997
999
998 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
1000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000 0000000000000000000000000000000000000000
999
1001
1000 changegroup
1002 changegroup
1001
1003
1002 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup&roots=0000000000000000000000000000000000000000'
1004 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=changegroup&roots=0000000000000000000000000000000000000000'
1003 200 Script output follows
1005 200 Script output follows
1004
1006
1005 x\x9c\xbdTMHUA\x14\xbe\xa8\xf9\xec\xda&\x10\x11*\xb8\x88\x81\x99\xbef\xe6\xce\xbdw\xc6\xf2a\x16E\x1b\x11[%\x98\xcc\xaf\x8f\x8c\xf7\xc0\xf7\x82 (esc)
1007 x\x9c\xbdTMHUA\x14\xbe\xa8\xf9\xec\xda&\x10\x11*\xb8\x88\x81\x99\xbef\xe6\xce\xbdw\xc6\xf2a\x16E\x1b\x11[%\x98\xcc\xaf\x8f\x8c\xf7\xc0\xf7\x82 (esc)
1006 4\x11KP2m\x95\xad*\xabE\x05AP\xd0\xc22Z\x14\xf9\x03\xb9j\xa3\x9b$\xa4MJ\xb4\x90\xc0\x9a\x9bO0\x10\xdf\x13\xa2\x81\x0f\x869g\xe6|\xe7\x9c\xef\x8ceY\xf7\xa2KO\xd2\xb7K\x16~\\n\xe9\xad\x90w\x86\xab\x93W\x8e\xdf\xb0r\\Y\xee6(\xa2)\xf6\x95\xc6\x01\xe4\x1az\x80R\xe8kN\x98\xe7R\xa4\xa9K@\xe0!A\xb4k\xa7U*m\x03\x07\xd8\x92\x1d\xd2\xc9\xa4\x1d\xc2\xe6,\xa5\xcc+\x1f\xef\xafDgi\xef\xab\x1d\x1d\xb7\x9a\xe7[W\xfbc\x8f\xde-\xcd\xe7\xcaz\xb3\xbb\x19\xd3\x81\x10>c>\x08\x00"X\x11\xc2\x84@\xd2\xe7B*L\x00\x01P\x04R\xc3@\xbaB0\xdb8#\x83:\x83\xa2h\xbc=\xcd\xdaS\xe1Y,L\xd3\xa0\xf2\xa8\x94J:\xe6\xd8\x81Q\xe0\xe8d\xa7#\xe2,\xd1\xaeR*\xed \xa5\x01\x13\x01\xa6\x0cb\xe3;\xbe\xaf\xfcK[^wK\xe1N\xaf\xbbk\xe8B\xd1\xf4\xc1\x07\xb3\xab[\x10\xfdkmvwcB\xa6\xa4\xd4G\xc4D\xc2\x141\xad\x91\x10\x00\x08J\x81\xcb}\xee \xee+W\xba\x8a\x80\x90|\xd4\xa0\xd6\xa0\xd4T\xde\xe1\x9d,!\xe2\xb5\xa94\xe3\xe7\xd5\x9f\x06\x18\xcba\x03aP\xb8f\xcd\x04\x1a_\\9\xf1\xed\xe4\x9e\xe5\xa6\xd1\xd2\x9f\x03\xa7o\xae\x90H\xf3\xfb\xef\xffH3\xadk (esc)
1008 4\x11KP2m\x95\xad*\xabE\x05AP\xd0\xc22Z\x14\xf9\x03\xb9j\xa3\x9b$\xa4MJ\xb4\x90\xc0\x9a\x9bO0\x10\xdf\x13\xa2\x81\x0f\x869g\xe6|\xe7\x9c\xef\x8ceY\xf7\xa2KO\xd2\xb7K\x16~\\n\xe9\xad\x90w\x86\xab\x93W\x8e\xdf\xb0r\\Y\xee6(\xa2)\xf6\x95\xc6\x01\xe4\x1az\x80R\xe8kN\x98\xe7R\xa4\xa9K@\xe0!A\xb4k\xa7U*m\x03\x07\xd8\x92\x1d\xd2\xc9\xa4\x1d\xc2\xe6,\xa5\xcc+\x1f\xef\xafDgi\xef\xab\x1d\x1d\xb7\x9a\xe7[W\xfbc\x8f\xde-\xcd\xe7\xcaz\xb3\xbb\x19\xd3\x81\x10>c>\x08\x00"X\x11\xc2\x84@\xd2\xe7B*L\x00\x01P\x04R\xc3@\xbaB0\xdb8#\x83:\x83\xa2h\xbc=\xcd\xdaS\xe1Y,L\xd3\xa0\xf2\xa8\x94J:\xe6\xd8\x81Q\xe0\xe8d\xa7#\xe2,\xd1\xaeR*\xed \xa5\x01\x13\x01\xa6\x0cb\xe3;\xbe\xaf\xfcK[^wK\xe1N\xaf\xbbk\xe8B\xd1\xf4\xc1\x07\xb3\xab[\x10\xfdkmvwcB\xa6\xa4\xd4G\xc4D\xc2\x141\xad\x91\x10\x00\x08J\x81\xcb}\xee \xee+W\xba\x8a\x80\x90|\xd4\xa0\xd6\xa0\xd4T\xde\xe1\x9d,!\xe2\xb5\xa94\xe3\xe7\xd5\x9f\x06\x18\xcba\x03aP\xb8f\xcd\x04\x1a_\\9\xf1\xed\xe4\x9e\xe5\xa6\xd1\xd2\x9f\x03\xa7o\xae\x90H\xf3\xfb\xef\xffH3\xadk (esc)
1007 \xb0\x90\x92\x88\xb9\x14"\x068\xc2\x1e@\x00\xbb\x8a)\xd3'\x859 (esc)
1009 \xb0\x90\x92\x88\xb9\x14"\x068\xc2\x1e@\x00\xbb\x8a)\xd3'\x859 (esc)
1008 \xa8\x80\x84S \xa5\xbd-g\x13`\xe4\xdc\xc3H^\xdf\xe2\xc0TM\xc7\xf4BO\xcf\xde\xae\xe5\xae#\x1frM(K\x97`F\x19\x16s\x05GD\xb9\x01\xc1\x00+\x8c|\x9fp\xc11\xf0\x14\x00\x9cJ\x82<\xe0\x12\x9f\xc1\x90\xd0\xf5\xc8\x19>Pr\xaa\xeaW\xf5\xc4\xae\xd1\xfc\x17\xcf'\x13u\xb1\x9e\xcdHnC\x0e\xcc`\xc8\xa0&\xac\x0e\xf1|\x8c\x10$\xc4\x8c\xa2p\x05`\xdc\x08 \x80\xc4\xd7Rr-\x94\x10\x102\xedi;\xf3f\xf1z\x16\x86\xdb\xd8d\xe5\xe7\x8b\xf5\x8d\rzp\xb2\xfe\xac\xf5\xf2\xd3\xfe\xfckws\xedt\x96b\xd5l\x1c\x0b\x85\xb5\x170\x8f\x11\x84\xb0\x8f\x19\xa0\x00 _\x07\x1ac\xa2\xc3\x89Z\xe7\x96\xf9 \xccNFg\xc7F\xaa\x8a+\x9a\x9cc_\x17\x1b\x17\x9e]z38<\x97+\xb5,",\xc8\xc8?\\\x91\xff\x17.~U\x96\x97\xf5%\xdeN<\x8e\xf5\x97%\xe7^\xcfL\xed~\xda\x96k\xdc->\x86\x02\x83"\x96H\xa6\xe3\xaas=-\xeb7\xe5\xda\x8f\xbc (no-eol) (esc)
1010 \xa8\x80\x84S \xa5\xbd-g\x13`\xe4\xdc\xc3H^\xdf\xe2\xc0TM\xc7\xf4BO\xcf\xde\xae\xe5\xae#\x1frM(K\x97`F\x19\x16s\x05GD\xb9\x01\xc1\x00+\x8c|\x9fp\xc11\xf0\x14\x00\x9cJ\x82<\xe0\x12\x9f\xc1\x90\xd0\xf5\xc8\x19>Pr\xaa\xeaW\xf5\xc4\xae\xd1\xfc\x17\xcf'\x13u\xb1\x9e\xcdHnC\x0e\xcc`\xc8\xa0&\xac\x0e\xf1|\x8c\x10$\xc4\x8c\xa2p\x05`\xdc\x08 \x80\xc4\xd7Rr-\x94\x10\x102\xedi;\xf3f\xf1z\x16\x86\xdb\xd8d\xe5\xe7\x8b\xf5\x8d\rzp\xb2\xfe\xac\xf5\xf2\xd3\xfe\xfckws\xedt\x96b\xd5l\x1c\x0b\x85\xb5\x170\x8f\x11\x84\xb0\x8f\x19\xa0\x00 _\x07\x1ac\xa2\xc3\x89Z\xe7\x96\xf9 \xccNFg\xc7F\xaa\x8a+\x9a\x9cc_\x17\x1b\x17\x9e]z38<\x97+\xb5,",\xc8\xc8?\\\x91\xff\x17.~U\x96\x97\xf5%\xdeN<\x8e\xf5\x97%\xe7^\xcfL\xed~\xda\x96k\xdc->\x86\x02\x83"\x96H\xa6\xe3\xaas=-\xeb7\xe5\xda\x8f\xbc (no-eol) (esc)
1009
1011
1010 stream_out
1012 stream_out
1011
1013
1012 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out'
1014 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=stream_out'
1013 200 Script output follows
1015 200 Script output follows
1014
1016
1015 1
1017 1
1016
1018
1017 failing unbundle, requires POST request
1019 failing unbundle, requires POST request
1018
1020
1019 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle'
1021 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '?cmd=unbundle'
1020 405 push requires POST request
1022 405 push requires POST request
1021
1023
1022 0
1024 0
1023 push requires POST request
1025 push requires POST request
1024 [1]
1026 [1]
1025
1027
1026 Static files
1028 Static files
1027
1029
1028 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css'
1030 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css'
1029 200 Script output follows
1031 200 Script output follows
1030
1032
1031 a { text-decoration:none; }
1033 a { text-decoration:none; }
1032 .age { white-space:nowrap; }
1034 .age { white-space:nowrap; }
1033 .date { white-space:nowrap; }
1035 .date { white-space:nowrap; }
1034 .indexlinks { white-space:nowrap; }
1036 .indexlinks { white-space:nowrap; }
1035 .parity0 { background-color: #ddd; }
1037 .parity0 { background-color: #ddd; }
1036 .parity1 { background-color: #eee; }
1038 .parity1 { background-color: #eee; }
1037 .lineno { width: 60px; color: #aaa; font-size: smaller;
1039 .lineno { width: 60px; color: #aaa; font-size: smaller;
1038 text-align: right; }
1040 text-align: right; }
1039 .plusline { color: green; }
1041 .plusline { color: green; }
1040 .minusline { color: red; }
1042 .minusline { color: red; }
1041 .atline { color: purple; }
1043 .atline { color: purple; }
1042 .annotate { font-size: smaller; text-align: right; padding-right: 1em; }
1044 .annotate { font-size: smaller; text-align: right; padding-right: 1em; }
1043 .buttons a {
1045 .buttons a {
1044 background-color: #666;
1046 background-color: #666;
1045 padding: 2pt;
1047 padding: 2pt;
1046 color: white;
1048 color: white;
1047 font-family: sans;
1049 font-family: sans;
1048 font-weight: bold;
1050 font-weight: bold;
1049 }
1051 }
1050 .navigate a {
1052 .navigate a {
1051 background-color: #ccc;
1053 background-color: #ccc;
1052 padding: 2pt;
1054 padding: 2pt;
1053 font-family: sans;
1055 font-family: sans;
1054 color: black;
1056 color: black;
1055 }
1057 }
1056
1058
1057 .metatag {
1059 .metatag {
1058 background-color: #888;
1060 background-color: #888;
1059 color: white;
1061 color: white;
1060 text-align: right;
1062 text-align: right;
1061 }
1063 }
1062
1064
1063 /* Common */
1065 /* Common */
1064 pre { margin: 0; }
1066 pre { margin: 0; }
1065
1067
1066 .logo {
1068 .logo {
1067 float: right;
1069 float: right;
1068 clear: right;
1070 clear: right;
1069 }
1071 }
1070
1072
1071 /* Changelog/Filelog entries */
1073 /* Changelog/Filelog entries */
1072 .logEntry { width: 100%; }
1074 .logEntry { width: 100%; }
1073 .logEntry .age { width: 15%; }
1075 .logEntry .age { width: 15%; }
1074 .logEntry th { font-weight: normal; text-align: right; vertical-align: top; }
1076 .logEntry th { font-weight: normal; text-align: right; vertical-align: top; }
1075 .logEntry th.age, .logEntry th.firstline { font-weight: bold; }
1077 .logEntry th.age, .logEntry th.firstline { font-weight: bold; }
1076 .logEntry th.firstline { text-align: left; width: inherit; }
1078 .logEntry th.firstline { text-align: left; width: inherit; }
1077
1079
1078 /* Shortlog entries */
1080 /* Shortlog entries */
1079 .slogEntry { width: 100%; }
1081 .slogEntry { width: 100%; }
1080 .slogEntry .age { width: 8em; }
1082 .slogEntry .age { width: 8em; }
1081 .slogEntry td { font-weight: normal; text-align: left; vertical-align: top; }
1083 .slogEntry td { font-weight: normal; text-align: left; vertical-align: top; }
1082 .slogEntry td.author { width: 15em; }
1084 .slogEntry td.author { width: 15em; }
1083
1085
1084 /* Tag entries */
1086 /* Tag entries */
1085 #tagEntries { list-style: none; margin: 0; padding: 0; }
1087 #tagEntries { list-style: none; margin: 0; padding: 0; }
1086 #tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; }
1088 #tagEntries .tagEntry { list-style: none; margin: 0; padding: 0; }
1087
1089
1088 /* Changeset entry */
1090 /* Changeset entry */
1089 #changesetEntry { }
1091 #changesetEntry { }
1090 #changesetEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
1092 #changesetEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
1091 #changesetEntry th.files, #changesetEntry th.description { vertical-align: top; }
1093 #changesetEntry th.files, #changesetEntry th.description { vertical-align: top; }
1092
1094
1093 /* File diff view */
1095 /* File diff view */
1094 #filediffEntry { }
1096 #filediffEntry { }
1095 #filediffEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
1097 #filediffEntry th { font-weight: normal; background-color: #888; color: #fff; text-align: right; }
1096
1098
1097 /* Graph */
1099 /* Graph */
1098 div#wrapper {
1100 div#wrapper {
1099 position: relative;
1101 position: relative;
1100 margin: 0;
1102 margin: 0;
1101 padding: 0;
1103 padding: 0;
1102 }
1104 }
1103
1105
1104 canvas {
1106 canvas {
1105 position: absolute;
1107 position: absolute;
1106 z-index: 5;
1108 z-index: 5;
1107 top: -0.6em;
1109 top: -0.6em;
1108 margin: 0;
1110 margin: 0;
1109 }
1111 }
1110
1112
1111 ul#nodebgs {
1113 ul#nodebgs {
1112 list-style: none inside none;
1114 list-style: none inside none;
1113 padding: 0;
1115 padding: 0;
1114 margin: 0;
1116 margin: 0;
1115 top: -0.7em;
1117 top: -0.7em;
1116 }
1118 }
1117
1119
1118 ul#graphnodes li, ul#nodebgs li {
1120 ul#graphnodes li, ul#nodebgs li {
1119 height: 39px;
1121 height: 39px;
1120 }
1122 }
1121
1123
1122 ul#graphnodes {
1124 ul#graphnodes {
1123 position: absolute;
1125 position: absolute;
1124 z-index: 10;
1126 z-index: 10;
1125 top: -0.85em;
1127 top: -0.85em;
1126 list-style: none inside none;
1128 list-style: none inside none;
1127 padding: 0;
1129 padding: 0;
1128 }
1130 }
1129
1131
1130 ul#graphnodes li .info {
1132 ul#graphnodes li .info {
1131 display: block;
1133 display: block;
1132 font-size: 70%;
1134 font-size: 70%;
1133 position: relative;
1135 position: relative;
1134 top: -1px;
1136 top: -1px;
1135 }
1137 }
1136
1138
1137 Stop and restart with HGENCODING=cp932
1139 Stop and restart with HGENCODING=cp932
1138
1140
1139 $ "$TESTDIR/killdaemons.py"
1141 $ "$TESTDIR/killdaemons.py"
1140 $ HGENCODING=cp932 hg serve --config server.uncompressed=False -n test \
1142 $ HGENCODING=cp932 hg serve --config server.uncompressed=False -n test \
1141 > -p $HGPORT -d --pid-file=hg.pid -E errors.log
1143 > -p $HGPORT -d --pid-file=hg.pid -E errors.log
1142 $ cat hg.pid >> $DAEMON_PIDS
1144 $ cat hg.pid >> $DAEMON_PIDS
1143
1145
1144 commit message with Japanese Kanji 'Noh', which ends with '\x5c'
1146 commit message with Japanese Kanji 'Noh', which ends with '\x5c'
1145
1147
1146 $ echo foo >> foo
1148 $ echo foo >> foo
1147 $ HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'`
1149 $ HGENCODING=cp932 hg ci -m `python -c 'print("\x94\x5c")'`
1148
1150
1149 Graph json escape of multibyte character
1151 Graph json escape of multibyte character
1150
1152
1151 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/' \
1153 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/' \
1152 > | grep '^var data ='
1154 > | grep '^var data ='
1153 var data = [["40b4d6888e92", [0, 1], [[0, 0, 1]], "\u80fd", "test", "1970-01-01", ["stable", true], ["tip"], ["something"]], ["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", false], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]];
1155 var data = [["40b4d6888e92", [0, 1], [[0, 0, 1]], "\u80fd", "test", "1970-01-01", ["stable", true], ["tip"], ["something"]], ["1d22e65f027e", [0, 1], [[0, 0, 1]], "branch", "test", "1970-01-01", ["stable", false], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]];
1154
1156
1155 ERRORS ENCOUNTERED
1157 ERRORS ENCOUNTERED
1156
1158
1157 $ cat errors.log
1159 $ cat errors.log
@@ -1,140 +1,142 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Test chains of near empty directories, terminating 3 different ways:
3 Test chains of near empty directories, terminating 3 different ways:
2 - a1: file at level 4 (deepest)
4 - a1: file at level 4 (deepest)
3 - b1: two dirs at level 3
5 - b1: two dirs at level 3
4 - e1: file at level 2
6 - e1: file at level 2
5
7
6 Set up the repo
8 Set up the repo
7
9
8 $ hg init test
10 $ hg init test
9 $ cd test
11 $ cd test
10 $ mkdir -p a1/a2/a3/a4
12 $ mkdir -p a1/a2/a3/a4
11 $ mkdir -p b1/b2/b3/b4
13 $ mkdir -p b1/b2/b3/b4
12 $ mkdir -p b1/b2/c3/c4
14 $ mkdir -p b1/b2/c3/c4
13 $ mkdir -p d1/d2/d3/d4
15 $ mkdir -p d1/d2/d3/d4
14 $ echo foo > a1/a2/a3/a4/foo
16 $ echo foo > a1/a2/a3/a4/foo
15 $ echo foo > b1/b2/b3/b4/foo
17 $ echo foo > b1/b2/b3/b4/foo
16 $ echo foo > b1/b2/c3/c4/foo
18 $ echo foo > b1/b2/c3/c4/foo
17 $ echo foo > d1/d2/d3/d4/foo
19 $ echo foo > d1/d2/d3/d4/foo
18 $ echo foo > d1/d2/foo
20 $ echo foo > d1/d2/foo
19 $ hg ci -Ama
21 $ hg ci -Ama
20 adding a1/a2/a3/a4/foo
22 adding a1/a2/a3/a4/foo
21 adding b1/b2/b3/b4/foo
23 adding b1/b2/b3/b4/foo
22 adding b1/b2/c3/c4/foo
24 adding b1/b2/c3/c4/foo
23 adding d1/d2/d3/d4/foo
25 adding d1/d2/d3/d4/foo
24 adding d1/d2/foo
26 adding d1/d2/foo
25 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
27 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
26 $ cat hg.pid >> $DAEMON_PIDS
28 $ cat hg.pid >> $DAEMON_PIDS
27
29
28 manifest with descending
30 manifest with descending
29
31
30 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file'
32 $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file'
31 200 Script output follows
33 200 Script output follows
32
34
33 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
35 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
34 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
36 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
35 <head>
37 <head>
36 <link rel="icon" href="/static/hgicon.png" type="image/png" />
38 <link rel="icon" href="/static/hgicon.png" type="image/png" />
37 <meta name="robots" content="index, nofollow" />
39 <meta name="robots" content="index, nofollow" />
38 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
40 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
39 <script type="text/javascript" src="/static/mercurial.js"></script>
41 <script type="text/javascript" src="/static/mercurial.js"></script>
40
42
41 <title>test: 9087c84a0f5d /</title>
43 <title>test: 9087c84a0f5d /</title>
42 </head>
44 </head>
43 <body>
45 <body>
44
46
45 <div class="container">
47 <div class="container">
46 <div class="menu">
48 <div class="menu">
47 <div class="logo">
49 <div class="logo">
48 <a href="http://mercurial.selenic.com/">
50 <a href="http://mercurial.selenic.com/">
49 <img src="/static/hglogo.png" alt="mercurial" /></a>
51 <img src="/static/hglogo.png" alt="mercurial" /></a>
50 </div>
52 </div>
51 <ul>
53 <ul>
52 <li><a href="/shortlog/9087c84a0f5d">log</a></li>
54 <li><a href="/shortlog/9087c84a0f5d">log</a></li>
53 <li><a href="/graph/9087c84a0f5d">graph</a></li>
55 <li><a href="/graph/9087c84a0f5d">graph</a></li>
54 <li><a href="/tags">tags</a></li>
56 <li><a href="/tags">tags</a></li>
55 <li><a href="/bookmarks">bookmarks</a></li>
57 <li><a href="/bookmarks">bookmarks</a></li>
56 <li><a href="/branches">branches</a></li>
58 <li><a href="/branches">branches</a></li>
57 </ul>
59 </ul>
58 <ul>
60 <ul>
59 <li><a href="/rev/9087c84a0f5d">changeset</a></li>
61 <li><a href="/rev/9087c84a0f5d">changeset</a></li>
60 <li class="active">browse</li>
62 <li class="active">browse</li>
61 </ul>
63 </ul>
62 <ul>
64 <ul>
63
65
64 </ul>
66 </ul>
65 <ul>
67 <ul>
66 <li><a href="/help">help</a></li>
68 <li><a href="/help">help</a></li>
67 </ul>
69 </ul>
68 </div>
70 </div>
69
71
70 <div class="main">
72 <div class="main">
71 <h2><a href="/">test</a></h2>
73 <h2><a href="/">test</a></h2>
72 <h3>directory / @ 0:9087c84a0f5d <span class="tag">tip</span> </h3>
74 <h3>directory / @ 0:9087c84a0f5d <span class="tag">tip</span> </h3>
73
75
74 <form class="search" action="/log">
76 <form class="search" action="/log">
75
77
76 <p><input name="rev" id="search1" type="text" size="30" /></p>
78 <p><input name="rev" id="search1" type="text" size="30" /></p>
77 <div id="hint">find changesets by author, revision,
79 <div id="hint">find changesets by author, revision,
78 files, or words in the commit message</div>
80 files, or words in the commit message</div>
79 </form>
81 </form>
80
82
81 <table class="bigtable">
83 <table class="bigtable">
82 <tr>
84 <tr>
83 <th class="name">name</th>
85 <th class="name">name</th>
84 <th class="size">size</th>
86 <th class="size">size</th>
85 <th class="permissions">permissions</th>
87 <th class="permissions">permissions</th>
86 </tr>
88 </tr>
87 <tr class="fileline parity0">
89 <tr class="fileline parity0">
88 <td class="name"><a href="/file/9087c84a0f5d/">[up]</a></td>
90 <td class="name"><a href="/file/9087c84a0f5d/">[up]</a></td>
89 <td class="size"></td>
91 <td class="size"></td>
90 <td class="permissions">drwxr-xr-x</td>
92 <td class="permissions">drwxr-xr-x</td>
91 </tr>
93 </tr>
92
94
93 <tr class="fileline parity1">
95 <tr class="fileline parity1">
94 <td class="name">
96 <td class="name">
95 <a href="/file/9087c84a0f5d/a1">
97 <a href="/file/9087c84a0f5d/a1">
96 <img src="/static/coal-folder.png" alt="dir."/> a1/
98 <img src="/static/coal-folder.png" alt="dir."/> a1/
97 </a>
99 </a>
98 <a href="/file/9087c84a0f5d/a1/a2/a3/a4">
100 <a href="/file/9087c84a0f5d/a1/a2/a3/a4">
99 a2/a3/a4
101 a2/a3/a4
100 </a>
102 </a>
101 </td>
103 </td>
102 <td class="size"></td>
104 <td class="size"></td>
103 <td class="permissions">drwxr-xr-x</td>
105 <td class="permissions">drwxr-xr-x</td>
104 </tr>
106 </tr>
105 <tr class="fileline parity0">
107 <tr class="fileline parity0">
106 <td class="name">
108 <td class="name">
107 <a href="/file/9087c84a0f5d/b1">
109 <a href="/file/9087c84a0f5d/b1">
108 <img src="/static/coal-folder.png" alt="dir."/> b1/
110 <img src="/static/coal-folder.png" alt="dir."/> b1/
109 </a>
111 </a>
110 <a href="/file/9087c84a0f5d/b1/b2">
112 <a href="/file/9087c84a0f5d/b1/b2">
111 b2
113 b2
112 </a>
114 </a>
113 </td>
115 </td>
114 <td class="size"></td>
116 <td class="size"></td>
115 <td class="permissions">drwxr-xr-x</td>
117 <td class="permissions">drwxr-xr-x</td>
116 </tr>
118 </tr>
117 <tr class="fileline parity1">
119 <tr class="fileline parity1">
118 <td class="name">
120 <td class="name">
119 <a href="/file/9087c84a0f5d/d1">
121 <a href="/file/9087c84a0f5d/d1">
120 <img src="/static/coal-folder.png" alt="dir."/> d1/
122 <img src="/static/coal-folder.png" alt="dir."/> d1/
121 </a>
123 </a>
122 <a href="/file/9087c84a0f5d/d1/d2">
124 <a href="/file/9087c84a0f5d/d1/d2">
123 d2
125 d2
124 </a>
126 </a>
125 </td>
127 </td>
126 <td class="size"></td>
128 <td class="size"></td>
127 <td class="permissions">drwxr-xr-x</td>
129 <td class="permissions">drwxr-xr-x</td>
128 </tr>
130 </tr>
129
131
130 </table>
132 </table>
131 </div>
133 </div>
132 </div>
134 </div>
133 <script type="text/javascript">process_dates()</script>
135 <script type="text/javascript">process_dates()</script>
134
136
135
137
136 </body>
138 </body>
137 </html>
139 </html>
138
140
139
141
140 $ cat errors.log
142 $ cat errors.log
@@ -1,557 +1,557 b''
1 $ "$TESTDIR/hghave" execbit || exit 80
1 $ "$TESTDIR/hghave" serve execbit || exit 80
2
2
3 setting up repo
3 setting up repo
4
4
5 $ hg init test
5 $ hg init test
6 $ cd test
6 $ cd test
7 $ echo a > a
7 $ echo a > a
8 $ echo b > b
8 $ echo b > b
9 $ hg ci -Ama
9 $ hg ci -Ama
10 adding a
10 adding a
11 adding b
11 adding b
12
12
13 change permissions for git diffs
13 change permissions for git diffs
14
14
15 $ chmod +x a
15 $ chmod +x a
16 $ hg ci -Amb
16 $ hg ci -Amb
17
17
18 set up hgweb
18 set up hgweb
19
19
20 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
20 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
21 $ cat hg.pid >> $DAEMON_PIDS
21 $ cat hg.pid >> $DAEMON_PIDS
22
22
23 revision
23 revision
24
24
25 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
25 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
26 200 Script output follows
26 200 Script output follows
27
27
28 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
28 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
29 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
29 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
30 <head>
30 <head>
31 <link rel="icon" href="/static/hgicon.png" type="image/png" />
31 <link rel="icon" href="/static/hgicon.png" type="image/png" />
32 <meta name="robots" content="index, nofollow" />
32 <meta name="robots" content="index, nofollow" />
33 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
33 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
34 <script type="text/javascript" src="/static/mercurial.js"></script>
34 <script type="text/javascript" src="/static/mercurial.js"></script>
35
35
36 <title>test: 0cd96de13884</title>
36 <title>test: 0cd96de13884</title>
37 </head>
37 </head>
38 <body>
38 <body>
39 <div class="container">
39 <div class="container">
40 <div class="menu">
40 <div class="menu">
41 <div class="logo">
41 <div class="logo">
42 <a href="http://mercurial.selenic.com/">
42 <a href="http://mercurial.selenic.com/">
43 <img src="/static/hglogo.png" alt="mercurial" /></a>
43 <img src="/static/hglogo.png" alt="mercurial" /></a>
44 </div>
44 </div>
45 <ul>
45 <ul>
46 <li><a href="/shortlog/0cd96de13884">log</a></li>
46 <li><a href="/shortlog/0cd96de13884">log</a></li>
47 <li><a href="/graph/0cd96de13884">graph</a></li>
47 <li><a href="/graph/0cd96de13884">graph</a></li>
48 <li><a href="/tags">tags</a></li>
48 <li><a href="/tags">tags</a></li>
49 <li><a href="/bookmarks">bookmarks</a></li>
49 <li><a href="/bookmarks">bookmarks</a></li>
50 <li><a href="/branches">branches</a></li>
50 <li><a href="/branches">branches</a></li>
51 </ul>
51 </ul>
52 <ul>
52 <ul>
53 <li class="active">changeset</li>
53 <li class="active">changeset</li>
54 <li><a href="/raw-rev/0cd96de13884">raw</a></li>
54 <li><a href="/raw-rev/0cd96de13884">raw</a></li>
55 <li><a href="/file/0cd96de13884">browse</a></li>
55 <li><a href="/file/0cd96de13884">browse</a></li>
56 </ul>
56 </ul>
57 <ul>
57 <ul>
58
58
59 </ul>
59 </ul>
60 <ul>
60 <ul>
61 <li><a href="/help">help</a></li>
61 <li><a href="/help">help</a></li>
62 </ul>
62 </ul>
63 </div>
63 </div>
64
64
65 <div class="main">
65 <div class="main">
66
66
67 <h2><a href="/">test</a></h2>
67 <h2><a href="/">test</a></h2>
68 <h3>changeset 0:0cd96de13884 </h3>
68 <h3>changeset 0:0cd96de13884 </h3>
69
69
70 <form class="search" action="/log">
70 <form class="search" action="/log">
71
71
72 <p><input name="rev" id="search1" type="text" size="30" /></p>
72 <p><input name="rev" id="search1" type="text" size="30" /></p>
73 <div id="hint">find changesets by author, revision,
73 <div id="hint">find changesets by author, revision,
74 files, or words in the commit message</div>
74 files, or words in the commit message</div>
75 </form>
75 </form>
76
76
77 <div class="description">a</div>
77 <div class="description">a</div>
78
78
79 <table id="changesetEntry">
79 <table id="changesetEntry">
80 <tr>
80 <tr>
81 <th class="author">author</th>
81 <th class="author">author</th>
82 <td class="author">&#116;&#101;&#115;&#116;</td>
82 <td class="author">&#116;&#101;&#115;&#116;</td>
83 </tr>
83 </tr>
84 <tr>
84 <tr>
85 <th class="date">date</th>
85 <th class="date">date</th>
86 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
86 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
87 <tr>
87 <tr>
88 <th class="author">parents</th>
88 <th class="author">parents</th>
89 <td class="author"></td>
89 <td class="author"></td>
90 </tr>
90 </tr>
91 <tr>
91 <tr>
92 <th class="author">children</th>
92 <th class="author">children</th>
93 <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
93 <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
94 </tr>
94 </tr>
95 <tr>
95 <tr>
96 <th class="files">files</th>
96 <th class="files">files</th>
97 <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
97 <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
98 </tr>
98 </tr>
99 <tr>
99 <tr>
100 <th class="diffstat">diffstat</th>
100 <th class="diffstat">diffstat</th>
101 <td class="diffstat">
101 <td class="diffstat">
102 2 files changed, 2 insertions(+), 0 deletions(-)
102 2 files changed, 2 insertions(+), 0 deletions(-)
103
103
104 <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a>
104 <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a>
105 <div id="diffstatdetails" style="display:none;">
105 <div id="diffstatdetails" style="display:none;">
106 <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a>
106 <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a>
107 <p>
107 <p>
108 <table> <tr class="parity0">
108 <table> <tr class="parity0">
109 <td class="diffstat-file"><a href="#l1.1">a</a></td>
109 <td class="diffstat-file"><a href="#l1.1">a</a></td>
110 <td class="diffstat-total" align="right">1</td>
110 <td class="diffstat-total" align="right">1</td>
111 <td class="diffstat-graph">
111 <td class="diffstat-graph">
112 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
112 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
113 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
113 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
114 </td>
114 </td>
115 </tr>
115 </tr>
116 <tr class="parity1">
116 <tr class="parity1">
117 <td class="diffstat-file"><a href="#l2.1">b</a></td>
117 <td class="diffstat-file"><a href="#l2.1">b</a></td>
118 <td class="diffstat-total" align="right">1</td>
118 <td class="diffstat-total" align="right">1</td>
119 <td class="diffstat-graph">
119 <td class="diffstat-graph">
120 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
120 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
121 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
121 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
122 </td>
122 </td>
123 </tr>
123 </tr>
124 </table>
124 </table>
125 </div>
125 </div>
126 </td>
126 </td>
127 </tr>
127 </tr>
128 </table>
128 </table>
129
129
130 <div class="overflow">
130 <div class="overflow">
131 <div class="sourcefirst"> line diff</div>
131 <div class="sourcefirst"> line diff</div>
132
132
133 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
133 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
134 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000
134 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000
135 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
135 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
136 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a
136 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a
137 </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
137 </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
138 </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/b Thu Jan 01 00:00:00 1970 +0000
138 </span><a href="#l2.2" id="l2.2"> 2.2</a> <span class="plusline">+++ b/b Thu Jan 01 00:00:00 1970 +0000
139 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@
139 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="atline">@@ -0,0 +1,1 @@
140 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+b
140 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="plusline">+b
141 </span></pre></div>
141 </span></pre></div>
142 </div>
142 </div>
143
143
144 </div>
144 </div>
145 </div>
145 </div>
146 <script type="text/javascript">process_dates()</script>
146 <script type="text/javascript">process_dates()</script>
147
147
148
148
149 </body>
149 </body>
150 </html>
150 </html>
151
151
152
152
153 raw revision
153 raw revision
154
154
155 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0'
155 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0'
156 200 Script output follows
156 200 Script output follows
157
157
158
158
159 # HG changeset patch
159 # HG changeset patch
160 # User test
160 # User test
161 # Date 0 0
161 # Date 0 0
162 # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e
162 # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e
163
163
164 a
164 a
165
165
166 diff -r 000000000000 -r 0cd96de13884 a
166 diff -r 000000000000 -r 0cd96de13884 a
167 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
167 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
168 +++ b/a Thu Jan 01 00:00:00 1970 +0000
168 +++ b/a Thu Jan 01 00:00:00 1970 +0000
169 @@ -0,0 +1,1 @@
169 @@ -0,0 +1,1 @@
170 +a
170 +a
171 diff -r 000000000000 -r 0cd96de13884 b
171 diff -r 000000000000 -r 0cd96de13884 b
172 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
172 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
173 +++ b/b Thu Jan 01 00:00:00 1970 +0000
173 +++ b/b Thu Jan 01 00:00:00 1970 +0000
174 @@ -0,0 +1,1 @@
174 @@ -0,0 +1,1 @@
175 +b
175 +b
176
176
177
177
178 diff removed file
178 diff removed file
179
179
180 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
180 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
181 200 Script output follows
181 200 Script output follows
182
182
183 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
183 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
184 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
184 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
185 <head>
185 <head>
186 <link rel="icon" href="/static/hgicon.png" type="image/png" />
186 <link rel="icon" href="/static/hgicon.png" type="image/png" />
187 <meta name="robots" content="index, nofollow" />
187 <meta name="robots" content="index, nofollow" />
188 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
188 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
189 <script type="text/javascript" src="/static/mercurial.js"></script>
189 <script type="text/javascript" src="/static/mercurial.js"></script>
190
190
191 <title>test: a diff</title>
191 <title>test: a diff</title>
192 </head>
192 </head>
193 <body>
193 <body>
194
194
195 <div class="container">
195 <div class="container">
196 <div class="menu">
196 <div class="menu">
197 <div class="logo">
197 <div class="logo">
198 <a href="http://mercurial.selenic.com/">
198 <a href="http://mercurial.selenic.com/">
199 <img src="/static/hglogo.png" alt="mercurial" /></a>
199 <img src="/static/hglogo.png" alt="mercurial" /></a>
200 </div>
200 </div>
201 <ul>
201 <ul>
202 <li><a href="/shortlog/78e4ebad7cdf">log</a></li>
202 <li><a href="/shortlog/78e4ebad7cdf">log</a></li>
203 <li><a href="/graph/78e4ebad7cdf">graph</a></li>
203 <li><a href="/graph/78e4ebad7cdf">graph</a></li>
204 <li><a href="/tags">tags</a></li>
204 <li><a href="/tags">tags</a></li>
205 <li><a href="/bookmarks">bookmarks</a></li>
205 <li><a href="/bookmarks">bookmarks</a></li>
206 <li><a href="/branches">branches</a></li>
206 <li><a href="/branches">branches</a></li>
207 </ul>
207 </ul>
208 <ul>
208 <ul>
209 <li><a href="/rev/78e4ebad7cdf">changeset</a></li>
209 <li><a href="/rev/78e4ebad7cdf">changeset</a></li>
210 <li><a href="/file/78e4ebad7cdf">browse</a></li>
210 <li><a href="/file/78e4ebad7cdf">browse</a></li>
211 </ul>
211 </ul>
212 <ul>
212 <ul>
213 <li><a href="/file/78e4ebad7cdf/a">file</a></li>
213 <li><a href="/file/78e4ebad7cdf/a">file</a></li>
214 <li><a href="/file/tip/a">latest</a></li>
214 <li><a href="/file/tip/a">latest</a></li>
215 <li class="active">diff</li>
215 <li class="active">diff</li>
216 <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li>
216 <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li>
217 <li><a href="/log/78e4ebad7cdf/a">file log</a></li>
217 <li><a href="/log/78e4ebad7cdf/a">file log</a></li>
218 <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li>
218 <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li>
219 </ul>
219 </ul>
220 <ul>
220 <ul>
221 <li><a href="/help">help</a></li>
221 <li><a href="/help">help</a></li>
222 </ul>
222 </ul>
223 </div>
223 </div>
224
224
225 <div class="main">
225 <div class="main">
226 <h2><a href="/">test</a></h2>
226 <h2><a href="/">test</a></h2>
227 <h3>diff a @ 1:78e4ebad7cdf</h3>
227 <h3>diff a @ 1:78e4ebad7cdf</h3>
228
228
229 <form class="search" action="/log">
229 <form class="search" action="/log">
230 <p></p>
230 <p></p>
231 <p><input name="rev" id="search1" type="text" size="30" /></p>
231 <p><input name="rev" id="search1" type="text" size="30" /></p>
232 <div id="hint">find changesets by author, revision,
232 <div id="hint">find changesets by author, revision,
233 files, or words in the commit message</div>
233 files, or words in the commit message</div>
234 </form>
234 </form>
235
235
236 <div class="description">b</div>
236 <div class="description">b</div>
237
237
238 <table id="changesetEntry">
238 <table id="changesetEntry">
239 <tr>
239 <tr>
240 <th>author</th>
240 <th>author</th>
241 <td>&#116;&#101;&#115;&#116;</td>
241 <td>&#116;&#101;&#115;&#116;</td>
242 </tr>
242 </tr>
243 <tr>
243 <tr>
244 <th>date</th>
244 <th>date</th>
245 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
245 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
246 </tr>
246 </tr>
247 <tr>
247 <tr>
248 <th>parents</th>
248 <th>parents</th>
249 <td></td>
249 <td></td>
250 </tr>
250 </tr>
251 <tr>
251 <tr>
252 <th>children</th>
252 <th>children</th>
253 <td></td>
253 <td></td>
254 </tr>
254 </tr>
255
255
256 </table>
256 </table>
257
257
258 <div class="overflow">
258 <div class="overflow">
259 <div class="sourcefirst"> line diff</div>
259 <div class="sourcefirst"> line diff</div>
260
260
261 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
261 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- /dev/null Thu Jan 01 00:00:00 1970 +0000
262 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000
262 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ b/a Thu Jan 01 00:00:00 1970 +0000
263 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
263 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -0,0 +1,1 @@
264 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a
264 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="plusline">+a
265 </span></pre></div>
265 </span></pre></div>
266 </div>
266 </div>
267 </div>
267 </div>
268 </div>
268 </div>
269
269
270 <script type="text/javascript">process_dates()</script>
270 <script type="text/javascript">process_dates()</script>
271
271
272
272
273 </body>
273 </body>
274 </html>
274 </html>
275
275
276
276
277 set up hgweb with git diffs
277 set up hgweb with git diffs
278
278
279 $ "$TESTDIR/killdaemons.py"
279 $ "$TESTDIR/killdaemons.py"
280 $ hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
280 $ hg serve --config 'diff.git=1' -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
281 $ cat hg.pid >> $DAEMON_PIDS
281 $ cat hg.pid >> $DAEMON_PIDS
282
282
283 revision
283 revision
284
284
285 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
285 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0'
286 200 Script output follows
286 200 Script output follows
287
287
288 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
288 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
289 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
289 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
290 <head>
290 <head>
291 <link rel="icon" href="/static/hgicon.png" type="image/png" />
291 <link rel="icon" href="/static/hgicon.png" type="image/png" />
292 <meta name="robots" content="index, nofollow" />
292 <meta name="robots" content="index, nofollow" />
293 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
293 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
294 <script type="text/javascript" src="/static/mercurial.js"></script>
294 <script type="text/javascript" src="/static/mercurial.js"></script>
295
295
296 <title>test: 0cd96de13884</title>
296 <title>test: 0cd96de13884</title>
297 </head>
297 </head>
298 <body>
298 <body>
299 <div class="container">
299 <div class="container">
300 <div class="menu">
300 <div class="menu">
301 <div class="logo">
301 <div class="logo">
302 <a href="http://mercurial.selenic.com/">
302 <a href="http://mercurial.selenic.com/">
303 <img src="/static/hglogo.png" alt="mercurial" /></a>
303 <img src="/static/hglogo.png" alt="mercurial" /></a>
304 </div>
304 </div>
305 <ul>
305 <ul>
306 <li><a href="/shortlog/0cd96de13884">log</a></li>
306 <li><a href="/shortlog/0cd96de13884">log</a></li>
307 <li><a href="/graph/0cd96de13884">graph</a></li>
307 <li><a href="/graph/0cd96de13884">graph</a></li>
308 <li><a href="/tags">tags</a></li>
308 <li><a href="/tags">tags</a></li>
309 <li><a href="/bookmarks">bookmarks</a></li>
309 <li><a href="/bookmarks">bookmarks</a></li>
310 <li><a href="/branches">branches</a></li>
310 <li><a href="/branches">branches</a></li>
311 </ul>
311 </ul>
312 <ul>
312 <ul>
313 <li class="active">changeset</li>
313 <li class="active">changeset</li>
314 <li><a href="/raw-rev/0cd96de13884">raw</a></li>
314 <li><a href="/raw-rev/0cd96de13884">raw</a></li>
315 <li><a href="/file/0cd96de13884">browse</a></li>
315 <li><a href="/file/0cd96de13884">browse</a></li>
316 </ul>
316 </ul>
317 <ul>
317 <ul>
318
318
319 </ul>
319 </ul>
320 <ul>
320 <ul>
321 <li><a href="/help">help</a></li>
321 <li><a href="/help">help</a></li>
322 </ul>
322 </ul>
323 </div>
323 </div>
324
324
325 <div class="main">
325 <div class="main">
326
326
327 <h2><a href="/">test</a></h2>
327 <h2><a href="/">test</a></h2>
328 <h3>changeset 0:0cd96de13884 </h3>
328 <h3>changeset 0:0cd96de13884 </h3>
329
329
330 <form class="search" action="/log">
330 <form class="search" action="/log">
331
331
332 <p><input name="rev" id="search1" type="text" size="30" /></p>
332 <p><input name="rev" id="search1" type="text" size="30" /></p>
333 <div id="hint">find changesets by author, revision,
333 <div id="hint">find changesets by author, revision,
334 files, or words in the commit message</div>
334 files, or words in the commit message</div>
335 </form>
335 </form>
336
336
337 <div class="description">a</div>
337 <div class="description">a</div>
338
338
339 <table id="changesetEntry">
339 <table id="changesetEntry">
340 <tr>
340 <tr>
341 <th class="author">author</th>
341 <th class="author">author</th>
342 <td class="author">&#116;&#101;&#115;&#116;</td>
342 <td class="author">&#116;&#101;&#115;&#116;</td>
343 </tr>
343 </tr>
344 <tr>
344 <tr>
345 <th class="date">date</th>
345 <th class="date">date</th>
346 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
346 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
347 <tr>
347 <tr>
348 <th class="author">parents</th>
348 <th class="author">parents</th>
349 <td class="author"></td>
349 <td class="author"></td>
350 </tr>
350 </tr>
351 <tr>
351 <tr>
352 <th class="author">children</th>
352 <th class="author">children</th>
353 <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
353 <td class="author"> <a href="/rev/78e4ebad7cdf">78e4ebad7cdf</a></td>
354 </tr>
354 </tr>
355 <tr>
355 <tr>
356 <th class="files">files</th>
356 <th class="files">files</th>
357 <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
357 <td class="files"><a href="/file/0cd96de13884/a">a</a> <a href="/file/0cd96de13884/b">b</a> </td>
358 </tr>
358 </tr>
359 <tr>
359 <tr>
360 <th class="diffstat">diffstat</th>
360 <th class="diffstat">diffstat</th>
361 <td class="diffstat">
361 <td class="diffstat">
362 2 files changed, 2 insertions(+), 0 deletions(-)
362 2 files changed, 2 insertions(+), 0 deletions(-)
363
363
364 <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a>
364 <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a>
365 <div id="diffstatdetails" style="display:none;">
365 <div id="diffstatdetails" style="display:none;">
366 <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a>
366 <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a>
367 <p>
367 <p>
368 <table> <tr class="parity0">
368 <table> <tr class="parity0">
369 <td class="diffstat-file"><a href="#l1.1">a</a></td>
369 <td class="diffstat-file"><a href="#l1.1">a</a></td>
370 <td class="diffstat-total" align="right">1</td>
370 <td class="diffstat-total" align="right">1</td>
371 <td class="diffstat-graph">
371 <td class="diffstat-graph">
372 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
372 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
373 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
373 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
374 </td>
374 </td>
375 </tr>
375 </tr>
376 <tr class="parity1">
376 <tr class="parity1">
377 <td class="diffstat-file"><a href="#l2.1">b</a></td>
377 <td class="diffstat-file"><a href="#l2.1">b</a></td>
378 <td class="diffstat-total" align="right">1</td>
378 <td class="diffstat-total" align="right">1</td>
379 <td class="diffstat-graph">
379 <td class="diffstat-graph">
380 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
380 <span class="diffstat-add" style="width:100.0%;">&nbsp;</span>
381 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
381 <span class="diffstat-remove" style="width:0.0%;">&nbsp;</span>
382 </td>
382 </td>
383 </tr>
383 </tr>
384 </table>
384 </table>
385 </div>
385 </div>
386 </td>
386 </td>
387 </tr>
387 </tr>
388 </table>
388 </table>
389
389
390 <div class="overflow">
390 <div class="overflow">
391 <div class="sourcefirst"> line diff</div>
391 <div class="sourcefirst"> line diff</div>
392
392
393 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100644
393 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100644
394 <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null
394 <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null
395 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a
395 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a
396 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@
396 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@
397 </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a
397 </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a
398 </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> new file mode 100644
398 </span></pre></div><div class="source bottomline parity1"><pre><a href="#l2.1" id="l2.1"> 2.1</a> new file mode 100644
399 <a href="#l2.2" id="l2.2"> 2.2</a> <span class="minusline">--- /dev/null
399 <a href="#l2.2" id="l2.2"> 2.2</a> <span class="minusline">--- /dev/null
400 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="plusline">+++ b/b
400 </span><a href="#l2.3" id="l2.3"> 2.3</a> <span class="plusline">+++ b/b
401 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="atline">@@ -0,0 +1,1 @@
401 </span><a href="#l2.4" id="l2.4"> 2.4</a> <span class="atline">@@ -0,0 +1,1 @@
402 </span><a href="#l2.5" id="l2.5"> 2.5</a> <span class="plusline">+b
402 </span><a href="#l2.5" id="l2.5"> 2.5</a> <span class="plusline">+b
403 </span></pre></div>
403 </span></pre></div>
404 </div>
404 </div>
405
405
406 </div>
406 </div>
407 </div>
407 </div>
408 <script type="text/javascript">process_dates()</script>
408 <script type="text/javascript">process_dates()</script>
409
409
410
410
411 </body>
411 </body>
412 </html>
412 </html>
413
413
414
414
415 revision
415 revision
416
416
417 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0'
417 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0'
418 200 Script output follows
418 200 Script output follows
419
419
420
420
421 # HG changeset patch
421 # HG changeset patch
422 # User test
422 # User test
423 # Date 0 0
423 # Date 0 0
424 # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e
424 # Node ID 0cd96de13884b090099512d4794ae87ad067ea8e
425
425
426 a
426 a
427
427
428 diff --git a/a b/a
428 diff --git a/a b/a
429 new file mode 100644
429 new file mode 100644
430 --- /dev/null
430 --- /dev/null
431 +++ b/a
431 +++ b/a
432 @@ -0,0 +1,1 @@
432 @@ -0,0 +1,1 @@
433 +a
433 +a
434 diff --git a/b b/b
434 diff --git a/b b/b
435 new file mode 100644
435 new file mode 100644
436 --- /dev/null
436 --- /dev/null
437 +++ b/b
437 +++ b/b
438 @@ -0,0 +1,1 @@
438 @@ -0,0 +1,1 @@
439 +b
439 +b
440
440
441
441
442 diff removed file
442 diff removed file
443
443
444 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
444 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
445 200 Script output follows
445 200 Script output follows
446
446
447 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
447 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
448 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
448 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
449 <head>
449 <head>
450 <link rel="icon" href="/static/hgicon.png" type="image/png" />
450 <link rel="icon" href="/static/hgicon.png" type="image/png" />
451 <meta name="robots" content="index, nofollow" />
451 <meta name="robots" content="index, nofollow" />
452 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
452 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
453 <script type="text/javascript" src="/static/mercurial.js"></script>
453 <script type="text/javascript" src="/static/mercurial.js"></script>
454
454
455 <title>test: a diff</title>
455 <title>test: a diff</title>
456 </head>
456 </head>
457 <body>
457 <body>
458
458
459 <div class="container">
459 <div class="container">
460 <div class="menu">
460 <div class="menu">
461 <div class="logo">
461 <div class="logo">
462 <a href="http://mercurial.selenic.com/">
462 <a href="http://mercurial.selenic.com/">
463 <img src="/static/hglogo.png" alt="mercurial" /></a>
463 <img src="/static/hglogo.png" alt="mercurial" /></a>
464 </div>
464 </div>
465 <ul>
465 <ul>
466 <li><a href="/shortlog/78e4ebad7cdf">log</a></li>
466 <li><a href="/shortlog/78e4ebad7cdf">log</a></li>
467 <li><a href="/graph/78e4ebad7cdf">graph</a></li>
467 <li><a href="/graph/78e4ebad7cdf">graph</a></li>
468 <li><a href="/tags">tags</a></li>
468 <li><a href="/tags">tags</a></li>
469 <li><a href="/bookmarks">bookmarks</a></li>
469 <li><a href="/bookmarks">bookmarks</a></li>
470 <li><a href="/branches">branches</a></li>
470 <li><a href="/branches">branches</a></li>
471 </ul>
471 </ul>
472 <ul>
472 <ul>
473 <li><a href="/rev/78e4ebad7cdf">changeset</a></li>
473 <li><a href="/rev/78e4ebad7cdf">changeset</a></li>
474 <li><a href="/file/78e4ebad7cdf">browse</a></li>
474 <li><a href="/file/78e4ebad7cdf">browse</a></li>
475 </ul>
475 </ul>
476 <ul>
476 <ul>
477 <li><a href="/file/78e4ebad7cdf/a">file</a></li>
477 <li><a href="/file/78e4ebad7cdf/a">file</a></li>
478 <li><a href="/file/tip/a">latest</a></li>
478 <li><a href="/file/tip/a">latest</a></li>
479 <li class="active">diff</li>
479 <li class="active">diff</li>
480 <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li>
480 <li><a href="/annotate/78e4ebad7cdf/a">annotate</a></li>
481 <li><a href="/log/78e4ebad7cdf/a">file log</a></li>
481 <li><a href="/log/78e4ebad7cdf/a">file log</a></li>
482 <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li>
482 <li><a href="/raw-file/78e4ebad7cdf/a">raw</a></li>
483 </ul>
483 </ul>
484 <ul>
484 <ul>
485 <li><a href="/help">help</a></li>
485 <li><a href="/help">help</a></li>
486 </ul>
486 </ul>
487 </div>
487 </div>
488
488
489 <div class="main">
489 <div class="main">
490 <h2><a href="/">test</a></h2>
490 <h2><a href="/">test</a></h2>
491 <h3>diff a @ 1:78e4ebad7cdf</h3>
491 <h3>diff a @ 1:78e4ebad7cdf</h3>
492
492
493 <form class="search" action="/log">
493 <form class="search" action="/log">
494 <p></p>
494 <p></p>
495 <p><input name="rev" id="search1" type="text" size="30" /></p>
495 <p><input name="rev" id="search1" type="text" size="30" /></p>
496 <div id="hint">find changesets by author, revision,
496 <div id="hint">find changesets by author, revision,
497 files, or words in the commit message</div>
497 files, or words in the commit message</div>
498 </form>
498 </form>
499
499
500 <div class="description">b</div>
500 <div class="description">b</div>
501
501
502 <table id="changesetEntry">
502 <table id="changesetEntry">
503 <tr>
503 <tr>
504 <th>author</th>
504 <th>author</th>
505 <td>&#116;&#101;&#115;&#116;</td>
505 <td>&#116;&#101;&#115;&#116;</td>
506 </tr>
506 </tr>
507 <tr>
507 <tr>
508 <th>date</th>
508 <th>date</th>
509 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
509 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
510 </tr>
510 </tr>
511 <tr>
511 <tr>
512 <th>parents</th>
512 <th>parents</th>
513 <td></td>
513 <td></td>
514 </tr>
514 </tr>
515 <tr>
515 <tr>
516 <th>children</th>
516 <th>children</th>
517 <td></td>
517 <td></td>
518 </tr>
518 </tr>
519
519
520 </table>
520 </table>
521
521
522 <div class="overflow">
522 <div class="overflow">
523 <div class="sourcefirst"> line diff</div>
523 <div class="sourcefirst"> line diff</div>
524
524
525 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100755
525 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> new file mode 100755
526 <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null
526 <a href="#l1.2" id="l1.2"> 1.2</a> <span class="minusline">--- /dev/null
527 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a
527 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="plusline">+++ b/a
528 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@
528 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="atline">@@ -0,0 +1,1 @@
529 </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a
529 </span><a href="#l1.5" id="l1.5"> 1.5</a> <span class="plusline">+a
530 </span></pre></div>
530 </span></pre></div>
531 </div>
531 </div>
532 </div>
532 </div>
533 </div>
533 </div>
534
534
535 <script type="text/javascript">process_dates()</script>
535 <script type="text/javascript">process_dates()</script>
536
536
537
537
538 </body>
538 </body>
539 </html>
539 </html>
540
540
541 $ cd ..
541 $ cd ..
542
542
543 test import rev as raw-rev
543 test import rev as raw-rev
544
544
545 $ hg clone -r0 test test1
545 $ hg clone -r0 test test1
546 adding changesets
546 adding changesets
547 adding manifests
547 adding manifests
548 adding file changes
548 adding file changes
549 added 1 changesets with 2 changes to 2 files
549 added 1 changesets with 2 changes to 2 files
550 updating to branch default
550 updating to branch default
551 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
551 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
552 $ cd test1
552 $ cd test1
553 $ hg import -q --exact http://localhost:$HGPORT/rev/1
553 $ hg import -q --exact http://localhost:$HGPORT/rev/1
554
554
555 errors
555 errors
556
556
557 $ cat ../test/errors.log
557 $ cat ../test/errors.log
@@ -1,405 +1,407 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Some tests for hgweb in an empty repository
3 Some tests for hgweb in an empty repository
2
4
3 $ hg init test
5 $ hg init test
4 $ cd test
6 $ cd test
5 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
7 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
6 $ cat hg.pid >> $DAEMON_PIDS
8 $ cat hg.pid >> $DAEMON_PIDS
7 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/shortlog')
9 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/shortlog')
8 200 Script output follows
10 200 Script output follows
9
11
10 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
12 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
11 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
13 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
12 <head>
14 <head>
13 <link rel="icon" href="/static/hgicon.png" type="image/png" />
15 <link rel="icon" href="/static/hgicon.png" type="image/png" />
14 <meta name="robots" content="index, nofollow" />
16 <meta name="robots" content="index, nofollow" />
15 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
17 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
16 <script type="text/javascript" src="/static/mercurial.js"></script>
18 <script type="text/javascript" src="/static/mercurial.js"></script>
17
19
18 <title>test: log</title>
20 <title>test: log</title>
19 <link rel="alternate" type="application/atom+xml"
21 <link rel="alternate" type="application/atom+xml"
20 href="/atom-log" title="Atom feed for test" />
22 href="/atom-log" title="Atom feed for test" />
21 <link rel="alternate" type="application/rss+xml"
23 <link rel="alternate" type="application/rss+xml"
22 href="/rss-log" title="RSS feed for test" />
24 href="/rss-log" title="RSS feed for test" />
23 </head>
25 </head>
24 <body>
26 <body>
25
27
26 <div class="container">
28 <div class="container">
27 <div class="menu">
29 <div class="menu">
28 <div class="logo">
30 <div class="logo">
29 <a href="http://mercurial.selenic.com/">
31 <a href="http://mercurial.selenic.com/">
30 <img src="/static/hglogo.png" alt="mercurial" /></a>
32 <img src="/static/hglogo.png" alt="mercurial" /></a>
31 </div>
33 </div>
32 <ul>
34 <ul>
33 <li class="active">log</li>
35 <li class="active">log</li>
34 <li><a href="/graph/000000000000">graph</a></li>
36 <li><a href="/graph/000000000000">graph</a></li>
35 <li><a href="/tags">tags</a></li>
37 <li><a href="/tags">tags</a></li>
36 <li><a href="/bookmarks">bookmarks</a></li>
38 <li><a href="/bookmarks">bookmarks</a></li>
37 <li><a href="/branches">branches</a></li>
39 <li><a href="/branches">branches</a></li>
38 </ul>
40 </ul>
39 <ul>
41 <ul>
40 <li><a href="/rev/000000000000">changeset</a></li>
42 <li><a href="/rev/000000000000">changeset</a></li>
41 <li><a href="/file/000000000000">browse</a></li>
43 <li><a href="/file/000000000000">browse</a></li>
42 </ul>
44 </ul>
43 <ul>
45 <ul>
44
46
45 </ul>
47 </ul>
46 <ul>
48 <ul>
47 <li><a href="/help">help</a></li>
49 <li><a href="/help">help</a></li>
48 </ul>
50 </ul>
49 </div>
51 </div>
50
52
51 <div class="main">
53 <div class="main">
52 <h2><a href="/">test</a></h2>
54 <h2><a href="/">test</a></h2>
53 <h3>log</h3>
55 <h3>log</h3>
54
56
55 <form class="search" action="/log">
57 <form class="search" action="/log">
56
58
57 <p><input name="rev" id="search1" type="text" size="30" /></p>
59 <p><input name="rev" id="search1" type="text" size="30" /></p>
58 <div id="hint">find changesets by author, revision,
60 <div id="hint">find changesets by author, revision,
59 files, or words in the commit message</div>
61 files, or words in the commit message</div>
60 </form>
62 </form>
61
63
62 <div class="navigate">
64 <div class="navigate">
63 <a href="/shortlog/-1?revcount=30">less</a>
65 <a href="/shortlog/-1?revcount=30">less</a>
64 <a href="/shortlog/-1?revcount=120">more</a>
66 <a href="/shortlog/-1?revcount=120">more</a>
65 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
67 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
66 </div>
68 </div>
67
69
68 <table class="bigtable">
70 <table class="bigtable">
69 <tr>
71 <tr>
70 <th class="age">age</th>
72 <th class="age">age</th>
71 <th class="author">author</th>
73 <th class="author">author</th>
72 <th class="description">description</th>
74 <th class="description">description</th>
73 </tr>
75 </tr>
74
76
75 </table>
77 </table>
76
78
77 <div class="navigate">
79 <div class="navigate">
78 <a href="/shortlog/-1?revcount=30">less</a>
80 <a href="/shortlog/-1?revcount=30">less</a>
79 <a href="/shortlog/-1?revcount=120">more</a>
81 <a href="/shortlog/-1?revcount=120">more</a>
80 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
82 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
81 </div>
83 </div>
82
84
83 </div>
85 </div>
84 </div>
86 </div>
85
87
86 <script type="text/javascript">process_dates()</script>
88 <script type="text/javascript">process_dates()</script>
87
89
88
90
89 </body>
91 </body>
90 </html>
92 </html>
91
93
92 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log')
94 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log')
93 200 Script output follows
95 200 Script output follows
94
96
95 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
97 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
96 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
98 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
97 <head>
99 <head>
98 <link rel="icon" href="/static/hgicon.png" type="image/png" />
100 <link rel="icon" href="/static/hgicon.png" type="image/png" />
99 <meta name="robots" content="index, nofollow" />
101 <meta name="robots" content="index, nofollow" />
100 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
102 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
101 <script type="text/javascript" src="/static/mercurial.js"></script>
103 <script type="text/javascript" src="/static/mercurial.js"></script>
102
104
103 <title>test: log</title>
105 <title>test: log</title>
104 <link rel="alternate" type="application/atom+xml"
106 <link rel="alternate" type="application/atom+xml"
105 href="/atom-log" title="Atom feed for test" />
107 href="/atom-log" title="Atom feed for test" />
106 <link rel="alternate" type="application/rss+xml"
108 <link rel="alternate" type="application/rss+xml"
107 href="/rss-log" title="RSS feed for test" />
109 href="/rss-log" title="RSS feed for test" />
108 </head>
110 </head>
109 <body>
111 <body>
110
112
111 <div class="container">
113 <div class="container">
112 <div class="menu">
114 <div class="menu">
113 <div class="logo">
115 <div class="logo">
114 <a href="http://mercurial.selenic.com/">
116 <a href="http://mercurial.selenic.com/">
115 <img src="/static/hglogo.png" alt="mercurial" /></a>
117 <img src="/static/hglogo.png" alt="mercurial" /></a>
116 </div>
118 </div>
117 <ul>
119 <ul>
118 <li class="active">log</li>
120 <li class="active">log</li>
119 <li><a href="/graph/000000000000">graph</a></li>
121 <li><a href="/graph/000000000000">graph</a></li>
120 <li><a href="/tags">tags</a></li>
122 <li><a href="/tags">tags</a></li>
121 <li><a href="/bookmarks">bookmarks</a></li>
123 <li><a href="/bookmarks">bookmarks</a></li>
122 <li><a href="/branches">branches</a></li>
124 <li><a href="/branches">branches</a></li>
123 </ul>
125 </ul>
124 <ul>
126 <ul>
125 <li><a href="/rev/000000000000">changeset</a></li>
127 <li><a href="/rev/000000000000">changeset</a></li>
126 <li><a href="/file/000000000000">browse</a></li>
128 <li><a href="/file/000000000000">browse</a></li>
127 </ul>
129 </ul>
128 <ul>
130 <ul>
129
131
130 </ul>
132 </ul>
131 <ul>
133 <ul>
132 <li><a href="/help">help</a></li>
134 <li><a href="/help">help</a></li>
133 </ul>
135 </ul>
134 </div>
136 </div>
135
137
136 <div class="main">
138 <div class="main">
137 <h2><a href="/">test</a></h2>
139 <h2><a href="/">test</a></h2>
138 <h3>log</h3>
140 <h3>log</h3>
139
141
140 <form class="search" action="/log">
142 <form class="search" action="/log">
141
143
142 <p><input name="rev" id="search1" type="text" size="30" /></p>
144 <p><input name="rev" id="search1" type="text" size="30" /></p>
143 <div id="hint">find changesets by author, revision,
145 <div id="hint">find changesets by author, revision,
144 files, or words in the commit message</div>
146 files, or words in the commit message</div>
145 </form>
147 </form>
146
148
147 <div class="navigate">
149 <div class="navigate">
148 <a href="/shortlog/-1?revcount=5">less</a>
150 <a href="/shortlog/-1?revcount=5">less</a>
149 <a href="/shortlog/-1?revcount=20">more</a>
151 <a href="/shortlog/-1?revcount=20">more</a>
150 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
152 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
151 </div>
153 </div>
152
154
153 <table class="bigtable">
155 <table class="bigtable">
154 <tr>
156 <tr>
155 <th class="age">age</th>
157 <th class="age">age</th>
156 <th class="author">author</th>
158 <th class="author">author</th>
157 <th class="description">description</th>
159 <th class="description">description</th>
158 </tr>
160 </tr>
159
161
160 </table>
162 </table>
161
163
162 <div class="navigate">
164 <div class="navigate">
163 <a href="/shortlog/-1?revcount=5">less</a>
165 <a href="/shortlog/-1?revcount=5">less</a>
164 <a href="/shortlog/-1?revcount=20">more</a>
166 <a href="/shortlog/-1?revcount=20">more</a>
165 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
167 | rev -1: <a href="/shortlog/000000000000">(0)</a> <a href="/shortlog/tip">tip</a>
166 </div>
168 </div>
167
169
168 </div>
170 </div>
169 </div>
171 </div>
170
172
171 <script type="text/javascript">process_dates()</script>
173 <script type="text/javascript">process_dates()</script>
172
174
173
175
174 </body>
176 </body>
175 </html>
177 </html>
176
178
177 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/graph')
179 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/graph')
178 200 Script output follows
180 200 Script output follows
179
181
180 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
182 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
181 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
183 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
182 <head>
184 <head>
183 <link rel="icon" href="/static/hgicon.png" type="image/png" />
185 <link rel="icon" href="/static/hgicon.png" type="image/png" />
184 <meta name="robots" content="index, nofollow" />
186 <meta name="robots" content="index, nofollow" />
185 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
187 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
186 <script type="text/javascript" src="/static/mercurial.js"></script>
188 <script type="text/javascript" src="/static/mercurial.js"></script>
187
189
188 <title>test: revision graph</title>
190 <title>test: revision graph</title>
189 <link rel="alternate" type="application/atom+xml"
191 <link rel="alternate" type="application/atom+xml"
190 href="/atom-log" title="Atom feed for test: log" />
192 href="/atom-log" title="Atom feed for test: log" />
191 <link rel="alternate" type="application/rss+xml"
193 <link rel="alternate" type="application/rss+xml"
192 href="/rss-log" title="RSS feed for test: log" />
194 href="/rss-log" title="RSS feed for test: log" />
193 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
195 <!--[if IE]><script type="text/javascript" src="/static/excanvas.js"></script><![endif]-->
194 </head>
196 </head>
195 <body>
197 <body>
196
198
197 <div class="container">
199 <div class="container">
198 <div class="menu">
200 <div class="menu">
199 <div class="logo">
201 <div class="logo">
200 <a href="http://mercurial.selenic.com/">
202 <a href="http://mercurial.selenic.com/">
201 <img src="/static/hglogo.png" alt="mercurial" /></a>
203 <img src="/static/hglogo.png" alt="mercurial" /></a>
202 </div>
204 </div>
203 <ul>
205 <ul>
204 <li><a href="/shortlog/000000000000">log</a></li>
206 <li><a href="/shortlog/000000000000">log</a></li>
205 <li class="active">graph</li>
207 <li class="active">graph</li>
206 <li><a href="/tags">tags</a></li>
208 <li><a href="/tags">tags</a></li>
207 <li><a href="/bookmarks">bookmarks</a></li>
209 <li><a href="/bookmarks">bookmarks</a></li>
208 <li><a href="/branches">branches</a></li>
210 <li><a href="/branches">branches</a></li>
209 </ul>
211 </ul>
210 <ul>
212 <ul>
211 <li><a href="/rev/000000000000">changeset</a></li>
213 <li><a href="/rev/000000000000">changeset</a></li>
212 <li><a href="/file/000000000000">browse</a></li>
214 <li><a href="/file/000000000000">browse</a></li>
213 </ul>
215 </ul>
214 <ul>
216 <ul>
215 <li><a href="/help">help</a></li>
217 <li><a href="/help">help</a></li>
216 </ul>
218 </ul>
217 </div>
219 </div>
218
220
219 <div class="main">
221 <div class="main">
220 <h2><a href="/">test</a></h2>
222 <h2><a href="/">test</a></h2>
221 <h3>graph</h3>
223 <h3>graph</h3>
222
224
223 <form class="search" action="/log">
225 <form class="search" action="/log">
224
226
225 <p><input name="rev" id="search1" type="text" size="30" /></p>
227 <p><input name="rev" id="search1" type="text" size="30" /></p>
226 <div id="hint">find changesets by author, revision,
228 <div id="hint">find changesets by author, revision,
227 files, or words in the commit message</div>
229 files, or words in the commit message</div>
228 </form>
230 </form>
229
231
230 <div class="navigate">
232 <div class="navigate">
231 <a href="/graph/-1?revcount=30">less</a>
233 <a href="/graph/-1?revcount=30">less</a>
232 <a href="/graph/-1?revcount=120">more</a>
234 <a href="/graph/-1?revcount=120">more</a>
233 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a>
235 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a>
234 </div>
236 </div>
235
237
236 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
238 <noscript><p>The revision graph only works with JavaScript-enabled browsers.</p></noscript>
237
239
238 <div id="wrapper">
240 <div id="wrapper">
239 <ul id="nodebgs"></ul>
241 <ul id="nodebgs"></ul>
240 <canvas id="graph" width="480" height="12"></canvas>
242 <canvas id="graph" width="480" height="12"></canvas>
241 <ul id="graphnodes"></ul>
243 <ul id="graphnodes"></ul>
242 </div>
244 </div>
243
245
244 <script type="text/javascript">
246 <script type="text/javascript">
245 <!-- hide script content
247 <!-- hide script content
246
248
247 var data = [];
249 var data = [];
248 var graph = new Graph();
250 var graph = new Graph();
249 graph.scale(39);
251 graph.scale(39);
250
252
251 graph.edge = function(x0, y0, x1, y1, color) {
253 graph.edge = function(x0, y0, x1, y1, color) {
252
254
253 this.setColor(color, 0.0, 0.65);
255 this.setColor(color, 0.0, 0.65);
254 this.ctx.beginPath();
256 this.ctx.beginPath();
255 this.ctx.moveTo(x0, y0);
257 this.ctx.moveTo(x0, y0);
256 this.ctx.lineTo(x1, y1);
258 this.ctx.lineTo(x1, y1);
257 this.ctx.stroke();
259 this.ctx.stroke();
258
260
259 }
261 }
260
262
261 var revlink = '<li style="_STYLE"><span class="desc">';
263 var revlink = '<li style="_STYLE"><span class="desc">';
262 revlink += '<a href="/rev/_NODEID" title="_NODEID">_DESC</a>';
264 revlink += '<a href="/rev/_NODEID" title="_NODEID">_DESC</a>';
263 revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
265 revlink += '</span>_TAGS<span class="info">_DATE, by _USER</span></li>';
264
266
265 graph.vertex = function(x, y, color, parity, cur) {
267 graph.vertex = function(x, y, color, parity, cur) {
266
268
267 this.ctx.beginPath();
269 this.ctx.beginPath();
268 color = this.setColor(color, 0.25, 0.75);
270 color = this.setColor(color, 0.25, 0.75);
269 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
271 this.ctx.arc(x, y, radius, 0, Math.PI * 2, true);
270 this.ctx.fill();
272 this.ctx.fill();
271
273
272 var bg = '<li class="bg parity' + parity + '"></li>';
274 var bg = '<li class="bg parity' + parity + '"></li>';
273 var left = (this.columns + 1) * this.bg_height;
275 var left = (this.columns + 1) * this.bg_height;
274 var nstyle = 'padding-left: ' + left + 'px;';
276 var nstyle = 'padding-left: ' + left + 'px;';
275 var item = revlink.replace(/_STYLE/, nstyle);
277 var item = revlink.replace(/_STYLE/, nstyle);
276 item = item.replace(/_PARITY/, 'parity' + parity);
278 item = item.replace(/_PARITY/, 'parity' + parity);
277 item = item.replace(/_NODEID/, cur[0]);
279 item = item.replace(/_NODEID/, cur[0]);
278 item = item.replace(/_NODEID/, cur[0]);
280 item = item.replace(/_NODEID/, cur[0]);
279 item = item.replace(/_DESC/, cur[3]);
281 item = item.replace(/_DESC/, cur[3]);
280 item = item.replace(/_USER/, cur[4]);
282 item = item.replace(/_USER/, cur[4]);
281 item = item.replace(/_DATE/, cur[5]);
283 item = item.replace(/_DATE/, cur[5]);
282
284
283 var tagspan = '';
285 var tagspan = '';
284 if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) {
286 if (cur[7].length || cur[8].length || (cur[6][0] != 'default' || cur[6][1])) {
285 tagspan = '<span class="logtags">';
287 tagspan = '<span class="logtags">';
286 if (cur[6][1]) {
288 if (cur[6][1]) {
287 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
289 tagspan += '<span class="branchhead" title="' + cur[6][0] + '">';
288 tagspan += cur[6][0] + '</span> ';
290 tagspan += cur[6][0] + '</span> ';
289 } else if (!cur[6][1] && cur[6][0] != 'default') {
291 } else if (!cur[6][1] && cur[6][0] != 'default') {
290 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
292 tagspan += '<span class="branchname" title="' + cur[6][0] + '">';
291 tagspan += cur[6][0] + '</span> ';
293 tagspan += cur[6][0] + '</span> ';
292 }
294 }
293 if (cur[7].length) {
295 if (cur[7].length) {
294 for (var t in cur[7]) {
296 for (var t in cur[7]) {
295 var tag = cur[7][t];
297 var tag = cur[7][t];
296 tagspan += '<span class="tag">' + tag + '</span> ';
298 tagspan += '<span class="tag">' + tag + '</span> ';
297 }
299 }
298 }
300 }
299 if (cur[8].length) {
301 if (cur[8].length) {
300 for (var b in cur[8]) {
302 for (var b in cur[8]) {
301 var bookmark = cur[8][b];
303 var bookmark = cur[8][b];
302 tagspan += '<span class="tag">' + bookmark + '</span> ';
304 tagspan += '<span class="tag">' + bookmark + '</span> ';
303 }
305 }
304 }
306 }
305 tagspan += '</span>';
307 tagspan += '</span>';
306 }
308 }
307
309
308 item = item.replace(/_TAGS/, tagspan);
310 item = item.replace(/_TAGS/, tagspan);
309 return [bg, item];
311 return [bg, item];
310
312
311 }
313 }
312
314
313 graph.render(data);
315 graph.render(data);
314
316
315 // stop hiding script -->
317 // stop hiding script -->
316 </script>
318 </script>
317
319
318 <div class="navigate">
320 <div class="navigate">
319 <a href="/graph/-1?revcount=30">less</a>
321 <a href="/graph/-1?revcount=30">less</a>
320 <a href="/graph/-1?revcount=120">more</a>
322 <a href="/graph/-1?revcount=120">more</a>
321 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a>
323 | rev -1: <a href="/graph/000000000000">(0)</a> <a href="/graph/tip">tip</a>
322 </div>
324 </div>
323
325
324 </div>
326 </div>
325 </div>
327 </div>
326
328
327 <script type="text/javascript">process_dates()</script>
329 <script type="text/javascript">process_dates()</script>
328
330
329
331
330 </body>
332 </body>
331 </html>
333 </html>
332
334
333 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file')
335 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file')
334 200 Script output follows
336 200 Script output follows
335
337
336 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
338 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
337 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
339 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
338 <head>
340 <head>
339 <link rel="icon" href="/static/hgicon.png" type="image/png" />
341 <link rel="icon" href="/static/hgicon.png" type="image/png" />
340 <meta name="robots" content="index, nofollow" />
342 <meta name="robots" content="index, nofollow" />
341 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
343 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
342 <script type="text/javascript" src="/static/mercurial.js"></script>
344 <script type="text/javascript" src="/static/mercurial.js"></script>
343
345
344 <title>test: 000000000000 /</title>
346 <title>test: 000000000000 /</title>
345 </head>
347 </head>
346 <body>
348 <body>
347
349
348 <div class="container">
350 <div class="container">
349 <div class="menu">
351 <div class="menu">
350 <div class="logo">
352 <div class="logo">
351 <a href="http://mercurial.selenic.com/">
353 <a href="http://mercurial.selenic.com/">
352 <img src="/static/hglogo.png" alt="mercurial" /></a>
354 <img src="/static/hglogo.png" alt="mercurial" /></a>
353 </div>
355 </div>
354 <ul>
356 <ul>
355 <li><a href="/shortlog/000000000000">log</a></li>
357 <li><a href="/shortlog/000000000000">log</a></li>
356 <li><a href="/graph/000000000000">graph</a></li>
358 <li><a href="/graph/000000000000">graph</a></li>
357 <li><a href="/tags">tags</a></li>
359 <li><a href="/tags">tags</a></li>
358 <li><a href="/bookmarks">bookmarks</a></li>
360 <li><a href="/bookmarks">bookmarks</a></li>
359 <li><a href="/branches">branches</a></li>
361 <li><a href="/branches">branches</a></li>
360 </ul>
362 </ul>
361 <ul>
363 <ul>
362 <li><a href="/rev/000000000000">changeset</a></li>
364 <li><a href="/rev/000000000000">changeset</a></li>
363 <li class="active">browse</li>
365 <li class="active">browse</li>
364 </ul>
366 </ul>
365 <ul>
367 <ul>
366
368
367 </ul>
369 </ul>
368 <ul>
370 <ul>
369 <li><a href="/help">help</a></li>
371 <li><a href="/help">help</a></li>
370 </ul>
372 </ul>
371 </div>
373 </div>
372
374
373 <div class="main">
375 <div class="main">
374 <h2><a href="/">test</a></h2>
376 <h2><a href="/">test</a></h2>
375 <h3>directory / @ -1:000000000000 <span class="tag">tip</span> </h3>
377 <h3>directory / @ -1:000000000000 <span class="tag">tip</span> </h3>
376
378
377 <form class="search" action="/log">
379 <form class="search" action="/log">
378
380
379 <p><input name="rev" id="search1" type="text" size="30" /></p>
381 <p><input name="rev" id="search1" type="text" size="30" /></p>
380 <div id="hint">find changesets by author, revision,
382 <div id="hint">find changesets by author, revision,
381 files, or words in the commit message</div>
383 files, or words in the commit message</div>
382 </form>
384 </form>
383
385
384 <table class="bigtable">
386 <table class="bigtable">
385 <tr>
387 <tr>
386 <th class="name">name</th>
388 <th class="name">name</th>
387 <th class="size">size</th>
389 <th class="size">size</th>
388 <th class="permissions">permissions</th>
390 <th class="permissions">permissions</th>
389 </tr>
391 </tr>
390 <tr class="fileline parity0">
392 <tr class="fileline parity0">
391 <td class="name"><a href="/file/000000000000/">[up]</a></td>
393 <td class="name"><a href="/file/000000000000/">[up]</a></td>
392 <td class="size"></td>
394 <td class="size"></td>
393 <td class="permissions">drwxr-xr-x</td>
395 <td class="permissions">drwxr-xr-x</td>
394 </tr>
396 </tr>
395
397
396
398
397 </table>
399 </table>
398 </div>
400 </div>
399 </div>
401 </div>
400 <script type="text/javascript">process_dates()</script>
402 <script type="text/javascript">process_dates()</script>
401
403
402
404
403 </body>
405 </body>
404 </html>
406 </html>
405
407
@@ -1,756 +1,757 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg init test
3 $ hg init test
3 $ cd test
4 $ cd test
4 $ echo b > b
5 $ echo b > b
5 $ hg ci -Am "b"
6 $ hg ci -Am "b"
6 adding b
7 adding b
7 $ echo a > a
8 $ echo a > a
8 $ hg ci -Am "first a"
9 $ hg ci -Am "first a"
9 adding a
10 adding a
10 $ hg rm a
11 $ hg rm a
11 $ hg ci -m "del a"
12 $ hg ci -m "del a"
12 $ echo b > a
13 $ echo b > a
13 $ hg ci -Am "second a"
14 $ hg ci -Am "second a"
14 adding a
15 adding a
15 $ hg rm a
16 $ hg rm a
16 $ hg ci -m "del2 a"
17 $ hg ci -m "del2 a"
17 $ hg mv b c
18 $ hg mv b c
18 $ hg ci -m "mv b"
19 $ hg ci -m "mv b"
19 $ echo c >> c
20 $ echo c >> c
20 $ hg ci -m "change c"
21 $ hg ci -m "change c"
21 $ hg log -p
22 $ hg log -p
22 changeset: 6:b7682196df1c
23 changeset: 6:b7682196df1c
23 tag: tip
24 tag: tip
24 user: test
25 user: test
25 date: Thu Jan 01 00:00:00 1970 +0000
26 date: Thu Jan 01 00:00:00 1970 +0000
26 summary: change c
27 summary: change c
27
28
28 diff -r 1a6696706df2 -r b7682196df1c c
29 diff -r 1a6696706df2 -r b7682196df1c c
29 --- a/c Thu Jan 01 00:00:00 1970 +0000
30 --- a/c Thu Jan 01 00:00:00 1970 +0000
30 +++ b/c Thu Jan 01 00:00:00 1970 +0000
31 +++ b/c Thu Jan 01 00:00:00 1970 +0000
31 @@ -1,1 +1,2 @@
32 @@ -1,1 +1,2 @@
32 b
33 b
33 +c
34 +c
34
35
35 changeset: 5:1a6696706df2
36 changeset: 5:1a6696706df2
36 user: test
37 user: test
37 date: Thu Jan 01 00:00:00 1970 +0000
38 date: Thu Jan 01 00:00:00 1970 +0000
38 summary: mv b
39 summary: mv b
39
40
40 diff -r 52e848cdcd88 -r 1a6696706df2 b
41 diff -r 52e848cdcd88 -r 1a6696706df2 b
41 --- a/b Thu Jan 01 00:00:00 1970 +0000
42 --- a/b Thu Jan 01 00:00:00 1970 +0000
42 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
43 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
43 @@ -1,1 +0,0 @@
44 @@ -1,1 +0,0 @@
44 -b
45 -b
45 diff -r 52e848cdcd88 -r 1a6696706df2 c
46 diff -r 52e848cdcd88 -r 1a6696706df2 c
46 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
47 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
47 +++ b/c Thu Jan 01 00:00:00 1970 +0000
48 +++ b/c Thu Jan 01 00:00:00 1970 +0000
48 @@ -0,0 +1,1 @@
49 @@ -0,0 +1,1 @@
49 +b
50 +b
50
51
51 changeset: 4:52e848cdcd88
52 changeset: 4:52e848cdcd88
52 user: test
53 user: test
53 date: Thu Jan 01 00:00:00 1970 +0000
54 date: Thu Jan 01 00:00:00 1970 +0000
54 summary: del2 a
55 summary: del2 a
55
56
56 diff -r 01de2d66a28d -r 52e848cdcd88 a
57 diff -r 01de2d66a28d -r 52e848cdcd88 a
57 --- a/a Thu Jan 01 00:00:00 1970 +0000
58 --- a/a Thu Jan 01 00:00:00 1970 +0000
58 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
59 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
59 @@ -1,1 +0,0 @@
60 @@ -1,1 +0,0 @@
60 -b
61 -b
61
62
62 changeset: 3:01de2d66a28d
63 changeset: 3:01de2d66a28d
63 user: test
64 user: test
64 date: Thu Jan 01 00:00:00 1970 +0000
65 date: Thu Jan 01 00:00:00 1970 +0000
65 summary: second a
66 summary: second a
66
67
67 diff -r be3ebcc91739 -r 01de2d66a28d a
68 diff -r be3ebcc91739 -r 01de2d66a28d a
68 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
69 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
69 +++ b/a Thu Jan 01 00:00:00 1970 +0000
70 +++ b/a Thu Jan 01 00:00:00 1970 +0000
70 @@ -0,0 +1,1 @@
71 @@ -0,0 +1,1 @@
71 +b
72 +b
72
73
73 changeset: 2:be3ebcc91739
74 changeset: 2:be3ebcc91739
74 user: test
75 user: test
75 date: Thu Jan 01 00:00:00 1970 +0000
76 date: Thu Jan 01 00:00:00 1970 +0000
76 summary: del a
77 summary: del a
77
78
78 diff -r 5ed941583260 -r be3ebcc91739 a
79 diff -r 5ed941583260 -r be3ebcc91739 a
79 --- a/a Thu Jan 01 00:00:00 1970 +0000
80 --- a/a Thu Jan 01 00:00:00 1970 +0000
80 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
81 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
81 @@ -1,1 +0,0 @@
82 @@ -1,1 +0,0 @@
82 -a
83 -a
83
84
84 changeset: 1:5ed941583260
85 changeset: 1:5ed941583260
85 user: test
86 user: test
86 date: Thu Jan 01 00:00:00 1970 +0000
87 date: Thu Jan 01 00:00:00 1970 +0000
87 summary: first a
88 summary: first a
88
89
89 diff -r 6563da9dcf87 -r 5ed941583260 a
90 diff -r 6563da9dcf87 -r 5ed941583260 a
90 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
91 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
91 +++ b/a Thu Jan 01 00:00:00 1970 +0000
92 +++ b/a Thu Jan 01 00:00:00 1970 +0000
92 @@ -0,0 +1,1 @@
93 @@ -0,0 +1,1 @@
93 +a
94 +a
94
95
95 changeset: 0:6563da9dcf87
96 changeset: 0:6563da9dcf87
96 user: test
97 user: test
97 date: Thu Jan 01 00:00:00 1970 +0000
98 date: Thu Jan 01 00:00:00 1970 +0000
98 summary: b
99 summary: b
99
100
100 diff -r 000000000000 -r 6563da9dcf87 b
101 diff -r 000000000000 -r 6563da9dcf87 b
101 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
102 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
102 +++ b/b Thu Jan 01 00:00:00 1970 +0000
103 +++ b/b Thu Jan 01 00:00:00 1970 +0000
103 @@ -0,0 +1,1 @@
104 @@ -0,0 +1,1 @@
104 +b
105 +b
105
106
106 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
107 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -E errors.log
107 $ cat hg.pid >> $DAEMON_PIDS
108 $ cat hg.pid >> $DAEMON_PIDS
108
109
109 tip - two revisions
110 tip - two revisions
110
111
111 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/a')
112 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/a')
112 200 Script output follows
113 200 Script output follows
113
114
114 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
115 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
115 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
116 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
116 <head>
117 <head>
117 <link rel="icon" href="/static/hgicon.png" type="image/png" />
118 <link rel="icon" href="/static/hgicon.png" type="image/png" />
118 <meta name="robots" content="index, nofollow" />
119 <meta name="robots" content="index, nofollow" />
119 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
120 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
120 <script type="text/javascript" src="/static/mercurial.js"></script>
121 <script type="text/javascript" src="/static/mercurial.js"></script>
121
122
122 <title>test: a history</title>
123 <title>test: a history</title>
123 <link rel="alternate" type="application/atom+xml"
124 <link rel="alternate" type="application/atom+xml"
124 href="/atom-log/tip/a" title="Atom feed for test:a" />
125 href="/atom-log/tip/a" title="Atom feed for test:a" />
125 <link rel="alternate" type="application/rss+xml"
126 <link rel="alternate" type="application/rss+xml"
126 href="/rss-log/tip/a" title="RSS feed for test:a" />
127 href="/rss-log/tip/a" title="RSS feed for test:a" />
127 </head>
128 </head>
128 <body>
129 <body>
129
130
130 <div class="container">
131 <div class="container">
131 <div class="menu">
132 <div class="menu">
132 <div class="logo">
133 <div class="logo">
133 <a href="http://mercurial.selenic.com/">
134 <a href="http://mercurial.selenic.com/">
134 <img src="/static/hglogo.png" alt="mercurial" /></a>
135 <img src="/static/hglogo.png" alt="mercurial" /></a>
135 </div>
136 </div>
136 <ul>
137 <ul>
137 <li><a href="/shortlog/01de2d66a28d">log</a></li>
138 <li><a href="/shortlog/01de2d66a28d">log</a></li>
138 <li><a href="/graph/01de2d66a28d">graph</a></li>
139 <li><a href="/graph/01de2d66a28d">graph</a></li>
139 <li><a href="/tags">tags</a></li>
140 <li><a href="/tags">tags</a></li>
140 <li><a href="/bookmarks">bookmarks</a></li>
141 <li><a href="/bookmarks">bookmarks</a></li>
141 <li><a href="/branches">branches</a></li>
142 <li><a href="/branches">branches</a></li>
142 </ul>
143 </ul>
143 <ul>
144 <ul>
144 <li><a href="/rev/01de2d66a28d">changeset</a></li>
145 <li><a href="/rev/01de2d66a28d">changeset</a></li>
145 <li><a href="/file/01de2d66a28d">browse</a></li>
146 <li><a href="/file/01de2d66a28d">browse</a></li>
146 </ul>
147 </ul>
147 <ul>
148 <ul>
148 <li><a href="/file/01de2d66a28d/a">file</a></li>
149 <li><a href="/file/01de2d66a28d/a">file</a></li>
149 <li><a href="/diff/01de2d66a28d/a">diff</a></li>
150 <li><a href="/diff/01de2d66a28d/a">diff</a></li>
150 <li><a href="/annotate/01de2d66a28d/a">annotate</a></li>
151 <li><a href="/annotate/01de2d66a28d/a">annotate</a></li>
151 <li class="active">file log</li>
152 <li class="active">file log</li>
152 <li><a href="/raw-file/01de2d66a28d/a">raw</a></li>
153 <li><a href="/raw-file/01de2d66a28d/a">raw</a></li>
153 </ul>
154 </ul>
154 <ul>
155 <ul>
155 <li><a href="/help">help</a></li>
156 <li><a href="/help">help</a></li>
156 </ul>
157 </ul>
157 </div>
158 </div>
158
159
159 <div class="main">
160 <div class="main">
160 <h2><a href="/">test</a></h2>
161 <h2><a href="/">test</a></h2>
161 <h3>log a</h3>
162 <h3>log a</h3>
162
163
163 <form class="search" action="/log">
164 <form class="search" action="/log">
164
165
165 <p><input name="rev" id="search1" type="text" size="30" /></p>
166 <p><input name="rev" id="search1" type="text" size="30" /></p>
166 <div id="hint">find changesets by author, revision,
167 <div id="hint">find changesets by author, revision,
167 files, or words in the commit message</div>
168 files, or words in the commit message</div>
168 </form>
169 </form>
169
170
170 <div class="navigate">
171 <div class="navigate">
171 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
172 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
172 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
173 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
173 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
174 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
174
175
175 <table class="bigtable">
176 <table class="bigtable">
176 <tr>
177 <tr>
177 <th class="age">age</th>
178 <th class="age">age</th>
178 <th class="author">author</th>
179 <th class="author">author</th>
179 <th class="description">description</th>
180 <th class="description">description</th>
180 </tr>
181 </tr>
181 <tr class="parity0">
182 <tr class="parity0">
182 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
183 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
183 <td class="author">test</td>
184 <td class="author">test</td>
184 <td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
185 <td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
185 </tr>
186 </tr>
186 <tr class="parity1">
187 <tr class="parity1">
187 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
188 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
188 <td class="author">test</td>
189 <td class="author">test</td>
189 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
190 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
190 </tr>
191 </tr>
191
192
192 </table>
193 </table>
193
194
194 <div class="navigate">
195 <div class="navigate">
195 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
196 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
196 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
197 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
197 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
198 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
198 </div>
199 </div>
199
200
200 </div>
201 </div>
201 </div>
202 </div>
202
203
203 <script type="text/javascript">process_dates()</script>
204 <script type="text/javascript">process_dates()</script>
204
205
205
206
206 </body>
207 </body>
207 </html>
208 </html>
208
209
209
210
210 second version - two revisions
211 second version - two revisions
211
212
212 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/3/a')
213 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/3/a')
213 200 Script output follows
214 200 Script output follows
214
215
215 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
216 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
216 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
217 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
217 <head>
218 <head>
218 <link rel="icon" href="/static/hgicon.png" type="image/png" />
219 <link rel="icon" href="/static/hgicon.png" type="image/png" />
219 <meta name="robots" content="index, nofollow" />
220 <meta name="robots" content="index, nofollow" />
220 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
221 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
221 <script type="text/javascript" src="/static/mercurial.js"></script>
222 <script type="text/javascript" src="/static/mercurial.js"></script>
222
223
223 <title>test: a history</title>
224 <title>test: a history</title>
224 <link rel="alternate" type="application/atom+xml"
225 <link rel="alternate" type="application/atom+xml"
225 href="/atom-log/tip/a" title="Atom feed for test:a" />
226 href="/atom-log/tip/a" title="Atom feed for test:a" />
226 <link rel="alternate" type="application/rss+xml"
227 <link rel="alternate" type="application/rss+xml"
227 href="/rss-log/tip/a" title="RSS feed for test:a" />
228 href="/rss-log/tip/a" title="RSS feed for test:a" />
228 </head>
229 </head>
229 <body>
230 <body>
230
231
231 <div class="container">
232 <div class="container">
232 <div class="menu">
233 <div class="menu">
233 <div class="logo">
234 <div class="logo">
234 <a href="http://mercurial.selenic.com/">
235 <a href="http://mercurial.selenic.com/">
235 <img src="/static/hglogo.png" alt="mercurial" /></a>
236 <img src="/static/hglogo.png" alt="mercurial" /></a>
236 </div>
237 </div>
237 <ul>
238 <ul>
238 <li><a href="/shortlog/01de2d66a28d">log</a></li>
239 <li><a href="/shortlog/01de2d66a28d">log</a></li>
239 <li><a href="/graph/01de2d66a28d">graph</a></li>
240 <li><a href="/graph/01de2d66a28d">graph</a></li>
240 <li><a href="/tags">tags</a></li>
241 <li><a href="/tags">tags</a></li>
241 <li><a href="/bookmarks">bookmarks</a></li>
242 <li><a href="/bookmarks">bookmarks</a></li>
242 <li><a href="/branches">branches</a></li>
243 <li><a href="/branches">branches</a></li>
243 </ul>
244 </ul>
244 <ul>
245 <ul>
245 <li><a href="/rev/01de2d66a28d">changeset</a></li>
246 <li><a href="/rev/01de2d66a28d">changeset</a></li>
246 <li><a href="/file/01de2d66a28d">browse</a></li>
247 <li><a href="/file/01de2d66a28d">browse</a></li>
247 </ul>
248 </ul>
248 <ul>
249 <ul>
249 <li><a href="/file/01de2d66a28d/a">file</a></li>
250 <li><a href="/file/01de2d66a28d/a">file</a></li>
250 <li><a href="/diff/01de2d66a28d/a">diff</a></li>
251 <li><a href="/diff/01de2d66a28d/a">diff</a></li>
251 <li><a href="/annotate/01de2d66a28d/a">annotate</a></li>
252 <li><a href="/annotate/01de2d66a28d/a">annotate</a></li>
252 <li class="active">file log</li>
253 <li class="active">file log</li>
253 <li><a href="/raw-file/01de2d66a28d/a">raw</a></li>
254 <li><a href="/raw-file/01de2d66a28d/a">raw</a></li>
254 </ul>
255 </ul>
255 <ul>
256 <ul>
256 <li><a href="/help">help</a></li>
257 <li><a href="/help">help</a></li>
257 </ul>
258 </ul>
258 </div>
259 </div>
259
260
260 <div class="main">
261 <div class="main">
261 <h2><a href="/">test</a></h2>
262 <h2><a href="/">test</a></h2>
262 <h3>log a</h3>
263 <h3>log a</h3>
263
264
264 <form class="search" action="/log">
265 <form class="search" action="/log">
265
266
266 <p><input name="rev" id="search1" type="text" size="30" /></p>
267 <p><input name="rev" id="search1" type="text" size="30" /></p>
267 <div id="hint">find changesets by author, revision,
268 <div id="hint">find changesets by author, revision,
268 files, or words in the commit message</div>
269 files, or words in the commit message</div>
269 </form>
270 </form>
270
271
271 <div class="navigate">
272 <div class="navigate">
272 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
273 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
273 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
274 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
274 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
275 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
275
276
276 <table class="bigtable">
277 <table class="bigtable">
277 <tr>
278 <tr>
278 <th class="age">age</th>
279 <th class="age">age</th>
279 <th class="author">author</th>
280 <th class="author">author</th>
280 <th class="description">description</th>
281 <th class="description">description</th>
281 </tr>
282 </tr>
282 <tr class="parity0">
283 <tr class="parity0">
283 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
284 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
284 <td class="author">test</td>
285 <td class="author">test</td>
285 <td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
286 <td class="description"><a href="/rev/01de2d66a28d">second a</a></td>
286 </tr>
287 </tr>
287 <tr class="parity1">
288 <tr class="parity1">
288 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
289 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
289 <td class="author">test</td>
290 <td class="author">test</td>
290 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
291 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
291 </tr>
292 </tr>
292
293
293 </table>
294 </table>
294
295
295 <div class="navigate">
296 <div class="navigate">
296 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
297 <a href="/log/01de2d66a28d/a?revcount=30">less</a>
297 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
298 <a href="/log/01de2d66a28d/a?revcount=120">more</a>
298 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
299 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
299 </div>
300 </div>
300
301
301 </div>
302 </div>
302 </div>
303 </div>
303
304
304 <script type="text/javascript">process_dates()</script>
305 <script type="text/javascript">process_dates()</script>
305
306
306
307
307 </body>
308 </body>
308 </html>
309 </html>
309
310
310
311
311 first deleted - one revision
312 first deleted - one revision
312
313
313 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/2/a')
314 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/2/a')
314 200 Script output follows
315 200 Script output follows
315
316
316 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
317 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
317 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
318 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
318 <head>
319 <head>
319 <link rel="icon" href="/static/hgicon.png" type="image/png" />
320 <link rel="icon" href="/static/hgicon.png" type="image/png" />
320 <meta name="robots" content="index, nofollow" />
321 <meta name="robots" content="index, nofollow" />
321 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
322 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
322 <script type="text/javascript" src="/static/mercurial.js"></script>
323 <script type="text/javascript" src="/static/mercurial.js"></script>
323
324
324 <title>test: a history</title>
325 <title>test: a history</title>
325 <link rel="alternate" type="application/atom+xml"
326 <link rel="alternate" type="application/atom+xml"
326 href="/atom-log/tip/a" title="Atom feed for test:a" />
327 href="/atom-log/tip/a" title="Atom feed for test:a" />
327 <link rel="alternate" type="application/rss+xml"
328 <link rel="alternate" type="application/rss+xml"
328 href="/rss-log/tip/a" title="RSS feed for test:a" />
329 href="/rss-log/tip/a" title="RSS feed for test:a" />
329 </head>
330 </head>
330 <body>
331 <body>
331
332
332 <div class="container">
333 <div class="container">
333 <div class="menu">
334 <div class="menu">
334 <div class="logo">
335 <div class="logo">
335 <a href="http://mercurial.selenic.com/">
336 <a href="http://mercurial.selenic.com/">
336 <img src="/static/hglogo.png" alt="mercurial" /></a>
337 <img src="/static/hglogo.png" alt="mercurial" /></a>
337 </div>
338 </div>
338 <ul>
339 <ul>
339 <li><a href="/shortlog/5ed941583260">log</a></li>
340 <li><a href="/shortlog/5ed941583260">log</a></li>
340 <li><a href="/graph/5ed941583260">graph</a></li>
341 <li><a href="/graph/5ed941583260">graph</a></li>
341 <li><a href="/tags">tags</a></li>
342 <li><a href="/tags">tags</a></li>
342 <li><a href="/bookmarks">bookmarks</a></li>
343 <li><a href="/bookmarks">bookmarks</a></li>
343 <li><a href="/branches">branches</a></li>
344 <li><a href="/branches">branches</a></li>
344 </ul>
345 </ul>
345 <ul>
346 <ul>
346 <li><a href="/rev/5ed941583260">changeset</a></li>
347 <li><a href="/rev/5ed941583260">changeset</a></li>
347 <li><a href="/file/5ed941583260">browse</a></li>
348 <li><a href="/file/5ed941583260">browse</a></li>
348 </ul>
349 </ul>
349 <ul>
350 <ul>
350 <li><a href="/file/5ed941583260/a">file</a></li>
351 <li><a href="/file/5ed941583260/a">file</a></li>
351 <li><a href="/diff/5ed941583260/a">diff</a></li>
352 <li><a href="/diff/5ed941583260/a">diff</a></li>
352 <li><a href="/annotate/5ed941583260/a">annotate</a></li>
353 <li><a href="/annotate/5ed941583260/a">annotate</a></li>
353 <li class="active">file log</li>
354 <li class="active">file log</li>
354 <li><a href="/raw-file/5ed941583260/a">raw</a></li>
355 <li><a href="/raw-file/5ed941583260/a">raw</a></li>
355 </ul>
356 </ul>
356 <ul>
357 <ul>
357 <li><a href="/help">help</a></li>
358 <li><a href="/help">help</a></li>
358 </ul>
359 </ul>
359 </div>
360 </div>
360
361
361 <div class="main">
362 <div class="main">
362 <h2><a href="/">test</a></h2>
363 <h2><a href="/">test</a></h2>
363 <h3>log a</h3>
364 <h3>log a</h3>
364
365
365 <form class="search" action="/log">
366 <form class="search" action="/log">
366
367
367 <p><input name="rev" id="search1" type="text" size="30" /></p>
368 <p><input name="rev" id="search1" type="text" size="30" /></p>
368 <div id="hint">find changesets by author, revision,
369 <div id="hint">find changesets by author, revision,
369 files, or words in the commit message</div>
370 files, or words in the commit message</div>
370 </form>
371 </form>
371
372
372 <div class="navigate">
373 <div class="navigate">
373 <a href="/log/5ed941583260/a?revcount=30">less</a>
374 <a href="/log/5ed941583260/a?revcount=30">less</a>
374 <a href="/log/5ed941583260/a?revcount=120">more</a>
375 <a href="/log/5ed941583260/a?revcount=120">more</a>
375 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
376 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
376
377
377 <table class="bigtable">
378 <table class="bigtable">
378 <tr>
379 <tr>
379 <th class="age">age</th>
380 <th class="age">age</th>
380 <th class="author">author</th>
381 <th class="author">author</th>
381 <th class="description">description</th>
382 <th class="description">description</th>
382 </tr>
383 </tr>
383 <tr class="parity0">
384 <tr class="parity0">
384 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
385 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
385 <td class="author">test</td>
386 <td class="author">test</td>
386 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
387 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
387 </tr>
388 </tr>
388
389
389 </table>
390 </table>
390
391
391 <div class="navigate">
392 <div class="navigate">
392 <a href="/log/5ed941583260/a?revcount=30">less</a>
393 <a href="/log/5ed941583260/a?revcount=30">less</a>
393 <a href="/log/5ed941583260/a?revcount=120">more</a>
394 <a href="/log/5ed941583260/a?revcount=120">more</a>
394 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
395 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
395 </div>
396 </div>
396
397
397 </div>
398 </div>
398 </div>
399 </div>
399
400
400 <script type="text/javascript">process_dates()</script>
401 <script type="text/javascript">process_dates()</script>
401
402
402
403
403 </body>
404 </body>
404 </html>
405 </html>
405
406
406
407
407 first version - one revision
408 first version - one revision
408
409
409 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/1/a')
410 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/1/a')
410 200 Script output follows
411 200 Script output follows
411
412
412 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
413 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
413 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
414 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
414 <head>
415 <head>
415 <link rel="icon" href="/static/hgicon.png" type="image/png" />
416 <link rel="icon" href="/static/hgicon.png" type="image/png" />
416 <meta name="robots" content="index, nofollow" />
417 <meta name="robots" content="index, nofollow" />
417 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
418 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
418 <script type="text/javascript" src="/static/mercurial.js"></script>
419 <script type="text/javascript" src="/static/mercurial.js"></script>
419
420
420 <title>test: a history</title>
421 <title>test: a history</title>
421 <link rel="alternate" type="application/atom+xml"
422 <link rel="alternate" type="application/atom+xml"
422 href="/atom-log/tip/a" title="Atom feed for test:a" />
423 href="/atom-log/tip/a" title="Atom feed for test:a" />
423 <link rel="alternate" type="application/rss+xml"
424 <link rel="alternate" type="application/rss+xml"
424 href="/rss-log/tip/a" title="RSS feed for test:a" />
425 href="/rss-log/tip/a" title="RSS feed for test:a" />
425 </head>
426 </head>
426 <body>
427 <body>
427
428
428 <div class="container">
429 <div class="container">
429 <div class="menu">
430 <div class="menu">
430 <div class="logo">
431 <div class="logo">
431 <a href="http://mercurial.selenic.com/">
432 <a href="http://mercurial.selenic.com/">
432 <img src="/static/hglogo.png" alt="mercurial" /></a>
433 <img src="/static/hglogo.png" alt="mercurial" /></a>
433 </div>
434 </div>
434 <ul>
435 <ul>
435 <li><a href="/shortlog/5ed941583260">log</a></li>
436 <li><a href="/shortlog/5ed941583260">log</a></li>
436 <li><a href="/graph/5ed941583260">graph</a></li>
437 <li><a href="/graph/5ed941583260">graph</a></li>
437 <li><a href="/tags">tags</a></li>
438 <li><a href="/tags">tags</a></li>
438 <li><a href="/bookmarks">bookmarks</a></li>
439 <li><a href="/bookmarks">bookmarks</a></li>
439 <li><a href="/branches">branches</a></li>
440 <li><a href="/branches">branches</a></li>
440 </ul>
441 </ul>
441 <ul>
442 <ul>
442 <li><a href="/rev/5ed941583260">changeset</a></li>
443 <li><a href="/rev/5ed941583260">changeset</a></li>
443 <li><a href="/file/5ed941583260">browse</a></li>
444 <li><a href="/file/5ed941583260">browse</a></li>
444 </ul>
445 </ul>
445 <ul>
446 <ul>
446 <li><a href="/file/5ed941583260/a">file</a></li>
447 <li><a href="/file/5ed941583260/a">file</a></li>
447 <li><a href="/diff/5ed941583260/a">diff</a></li>
448 <li><a href="/diff/5ed941583260/a">diff</a></li>
448 <li><a href="/annotate/5ed941583260/a">annotate</a></li>
449 <li><a href="/annotate/5ed941583260/a">annotate</a></li>
449 <li class="active">file log</li>
450 <li class="active">file log</li>
450 <li><a href="/raw-file/5ed941583260/a">raw</a></li>
451 <li><a href="/raw-file/5ed941583260/a">raw</a></li>
451 </ul>
452 </ul>
452 <ul>
453 <ul>
453 <li><a href="/help">help</a></li>
454 <li><a href="/help">help</a></li>
454 </ul>
455 </ul>
455 </div>
456 </div>
456
457
457 <div class="main">
458 <div class="main">
458 <h2><a href="/">test</a></h2>
459 <h2><a href="/">test</a></h2>
459 <h3>log a</h3>
460 <h3>log a</h3>
460
461
461 <form class="search" action="/log">
462 <form class="search" action="/log">
462
463
463 <p><input name="rev" id="search1" type="text" size="30" /></p>
464 <p><input name="rev" id="search1" type="text" size="30" /></p>
464 <div id="hint">find changesets by author, revision,
465 <div id="hint">find changesets by author, revision,
465 files, or words in the commit message</div>
466 files, or words in the commit message</div>
466 </form>
467 </form>
467
468
468 <div class="navigate">
469 <div class="navigate">
469 <a href="/log/5ed941583260/a?revcount=30">less</a>
470 <a href="/log/5ed941583260/a?revcount=30">less</a>
470 <a href="/log/5ed941583260/a?revcount=120">more</a>
471 <a href="/log/5ed941583260/a?revcount=120">more</a>
471 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
472 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a> </div>
472
473
473 <table class="bigtable">
474 <table class="bigtable">
474 <tr>
475 <tr>
475 <th class="age">age</th>
476 <th class="age">age</th>
476 <th class="author">author</th>
477 <th class="author">author</th>
477 <th class="description">description</th>
478 <th class="description">description</th>
478 </tr>
479 </tr>
479 <tr class="parity0">
480 <tr class="parity0">
480 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
481 <td class="age">Thu, 01 Jan 1970 00:00:00 +0000</td>
481 <td class="author">test</td>
482 <td class="author">test</td>
482 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
483 <td class="description"><a href="/rev/5ed941583260">first a</a></td>
483 </tr>
484 </tr>
484
485
485 </table>
486 </table>
486
487
487 <div class="navigate">
488 <div class="navigate">
488 <a href="/log/5ed941583260/a?revcount=30">less</a>
489 <a href="/log/5ed941583260/a?revcount=30">less</a>
489 <a href="/log/5ed941583260/a?revcount=120">more</a>
490 <a href="/log/5ed941583260/a?revcount=120">more</a>
490 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
491 | <a href="/log/5ed941583260/a">(0)</a> <a href="/log/tip/a">tip</a>
491 </div>
492 </div>
492
493
493 </div>
494 </div>
494 </div>
495 </div>
495
496
496 <script type="text/javascript">process_dates()</script>
497 <script type="text/javascript">process_dates()</script>
497
498
498
499
499 </body>
500 </body>
500 </html>
501 </html>
501
502
502
503
503 before addition - error
504 before addition - error
504
505
505 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/0/a')
506 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/0/a')
506 404 Not Found
507 404 Not Found
507
508
508 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
509 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
509 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
510 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
510 <head>
511 <head>
511 <link rel="icon" href="/static/hgicon.png" type="image/png" />
512 <link rel="icon" href="/static/hgicon.png" type="image/png" />
512 <meta name="robots" content="index, nofollow" />
513 <meta name="robots" content="index, nofollow" />
513 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
514 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
514 <script type="text/javascript" src="/static/mercurial.js"></script>
515 <script type="text/javascript" src="/static/mercurial.js"></script>
515
516
516 <title>test: error</title>
517 <title>test: error</title>
517 </head>
518 </head>
518 <body>
519 <body>
519
520
520 <div class="container">
521 <div class="container">
521 <div class="menu">
522 <div class="menu">
522 <div class="logo">
523 <div class="logo">
523 <a href="http://mercurial.selenic.com/">
524 <a href="http://mercurial.selenic.com/">
524 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
525 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
525 </div>
526 </div>
526 <ul>
527 <ul>
527 <li><a href="/shortlog">log</a></li>
528 <li><a href="/shortlog">log</a></li>
528 <li><a href="/graph">graph</a></li>
529 <li><a href="/graph">graph</a></li>
529 <li><a href="/tags">tags</a></li>
530 <li><a href="/tags">tags</a></li>
530 <li><a href="/bookmarks">bookmarks</a></li>
531 <li><a href="/bookmarks">bookmarks</a></li>
531 <li><a href="/branches">branches</a></li>
532 <li><a href="/branches">branches</a></li>
532 <li><a href="/help">help</a></li>
533 <li><a href="/help">help</a></li>
533 </ul>
534 </ul>
534 </div>
535 </div>
535
536
536 <div class="main">
537 <div class="main">
537
538
538 <h2><a href="/">test</a></h2>
539 <h2><a href="/">test</a></h2>
539 <h3>error</h3>
540 <h3>error</h3>
540
541
541 <form class="search" action="/log">
542 <form class="search" action="/log">
542
543
543 <p><input name="rev" id="search1" type="text" size="30"></p>
544 <p><input name="rev" id="search1" type="text" size="30"></p>
544 <div id="hint">find changesets by author, revision,
545 <div id="hint">find changesets by author, revision,
545 files, or words in the commit message</div>
546 files, or words in the commit message</div>
546 </form>
547 </form>
547
548
548 <div class="description">
549 <div class="description">
549 <p>
550 <p>
550 An error occurred while processing your request:
551 An error occurred while processing your request:
551 </p>
552 </p>
552 <p>
553 <p>
553 a@6563da9dcf87: not found in manifest
554 a@6563da9dcf87: not found in manifest
554 </p>
555 </p>
555 </div>
556 </div>
556 </div>
557 </div>
557 </div>
558 </div>
558
559
559 <script type="text/javascript">process_dates()</script>
560 <script type="text/javascript">process_dates()</script>
560
561
561
562
562 </body>
563 </body>
563 </html>
564 </html>
564
565
565 [1]
566 [1]
566
567
567 should show base link, use spartan because it shows it
568 should show base link, use spartan because it shows it
568
569
569 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/c?style=spartan')
570 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/c?style=spartan')
570 200 Script output follows
571 200 Script output follows
571
572
572 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
573 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
573 <html>
574 <html>
574 <head>
575 <head>
575 <link rel="icon" href="/static/hgicon.png" type="image/png">
576 <link rel="icon" href="/static/hgicon.png" type="image/png">
576 <meta name="robots" content="index, nofollow" />
577 <meta name="robots" content="index, nofollow" />
577 <link rel="stylesheet" href="/static/style.css" type="text/css" />
578 <link rel="stylesheet" href="/static/style.css" type="text/css" />
578 <script type="text/javascript" src="/static/mercurial.js"></script>
579 <script type="text/javascript" src="/static/mercurial.js"></script>
579
580
580 <title>test: c history</title>
581 <title>test: c history</title>
581 <link rel="alternate" type="application/atom+xml"
582 <link rel="alternate" type="application/atom+xml"
582 href="/atom-log/tip/c" title="Atom feed for test:c">
583 href="/atom-log/tip/c" title="Atom feed for test:c">
583 <link rel="alternate" type="application/rss+xml"
584 <link rel="alternate" type="application/rss+xml"
584 href="/rss-log/tip/c" title="RSS feed for test:c">
585 href="/rss-log/tip/c" title="RSS feed for test:c">
585 </head>
586 </head>
586 <body>
587 <body>
587
588
588 <div class="buttons">
589 <div class="buttons">
589 <a href="/log?style=spartan">changelog</a>
590 <a href="/log?style=spartan">changelog</a>
590 <a href="/shortlog?style=spartan">shortlog</a>
591 <a href="/shortlog?style=spartan">shortlog</a>
591 <a href="/graph?style=spartan">graph</a>
592 <a href="/graph?style=spartan">graph</a>
592 <a href="/tags?style=spartan">tags</a>
593 <a href="/tags?style=spartan">tags</a>
593 <a href="/branches?style=spartan">branches</a>
594 <a href="/branches?style=spartan">branches</a>
594 <a href="/file/b7682196df1c/c?style=spartan">file</a>
595 <a href="/file/b7682196df1c/c?style=spartan">file</a>
595 <a href="/annotate/b7682196df1c/c?style=spartan">annotate</a>
596 <a href="/annotate/b7682196df1c/c?style=spartan">annotate</a>
596 <a href="/help?style=spartan">help</a>
597 <a href="/help?style=spartan">help</a>
597 <a type="application/rss+xml" href="/rss-log/tip/c">rss</a>
598 <a type="application/rss+xml" href="/rss-log/tip/c">rss</a>
598 <a type="application/atom+xml" href="/atom-log/tip/c" title="Atom feed for test:c">atom</a>
599 <a type="application/atom+xml" href="/atom-log/tip/c" title="Atom feed for test:c">atom</a>
599 </div>
600 </div>
600
601
601 <h2>c revision history</h2>
602 <h2>c revision history</h2>
602
603
603 <p>navigate: <small class="navigate"><a href="/log/1a6696706df2/c?style=spartan">(0)</a> <a href="/log/tip/c?style=spartan">tip</a> </small></p>
604 <p>navigate: <small class="navigate"><a href="/log/1a6696706df2/c?style=spartan">(0)</a> <a href="/log/tip/c?style=spartan">tip</a> </small></p>
604
605
605 <table class="logEntry parity0">
606 <table class="logEntry parity0">
606 <tr>
607 <tr>
607 <th><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
608 <th><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
608 <th class="firstline"><a href="/rev/b7682196df1c?style=spartan">change c</a></th>
609 <th class="firstline"><a href="/rev/b7682196df1c?style=spartan">change c</a></th>
609 </tr>
610 </tr>
610 <tr>
611 <tr>
611 <th class="revision">revision 1:</td>
612 <th class="revision">revision 1:</td>
612 <td class="node">
613 <td class="node">
613 <a href="/file/b7682196df1c/c?style=spartan">b7682196df1c</a>
614 <a href="/file/b7682196df1c/c?style=spartan">b7682196df1c</a>
614 <a href="/diff/b7682196df1c/c?style=spartan">(diff)</a>
615 <a href="/diff/b7682196df1c/c?style=spartan">(diff)</a>
615 <a href="/annotate/b7682196df1c/c?style=spartan">(annotate)</a>
616 <a href="/annotate/b7682196df1c/c?style=spartan">(annotate)</a>
616 </td>
617 </td>
617 </tr>
618 </tr>
618
619
619 <tr>
620 <tr>
620 <th class="author">author:</th>
621 <th class="author">author:</th>
621 <td class="author">&#116;&#101;&#115;&#116;</td>
622 <td class="author">&#116;&#101;&#115;&#116;</td>
622 </tr>
623 </tr>
623 <tr>
624 <tr>
624 <th class="date">date:</th>
625 <th class="date">date:</th>
625 <td class="date">Thu, 01 Jan 1970 00:00:00 +0000</td>
626 <td class="date">Thu, 01 Jan 1970 00:00:00 +0000</td>
626 </tr>
627 </tr>
627 </table>
628 </table>
628
629
629
630
630 <table class="logEntry parity1">
631 <table class="logEntry parity1">
631 <tr>
632 <tr>
632 <th><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
633 <th><span class="age">Thu, 01 Jan 1970 00:00:00 +0000</span>:</th>
633 <th class="firstline"><a href="/rev/1a6696706df2?style=spartan">mv b</a></th>
634 <th class="firstline"><a href="/rev/1a6696706df2?style=spartan">mv b</a></th>
634 </tr>
635 </tr>
635 <tr>
636 <tr>
636 <th class="revision">revision 0:</td>
637 <th class="revision">revision 0:</td>
637 <td class="node">
638 <td class="node">
638 <a href="/file/1a6696706df2/c?style=spartan">1a6696706df2</a>
639 <a href="/file/1a6696706df2/c?style=spartan">1a6696706df2</a>
639 <a href="/diff/1a6696706df2/c?style=spartan">(diff)</a>
640 <a href="/diff/1a6696706df2/c?style=spartan">(diff)</a>
640 <a href="/annotate/1a6696706df2/c?style=spartan">(annotate)</a>
641 <a href="/annotate/1a6696706df2/c?style=spartan">(annotate)</a>
641 </td>
642 </td>
642 </tr>
643 </tr>
643
644
644 <tr>
645 <tr>
645 <th>base:</th>
646 <th>base:</th>
646 <td>
647 <td>
647 <a href="/file/1e88685f5dde/b?style=spartan">
648 <a href="/file/1e88685f5dde/b?style=spartan">
648 b@1e88685f5dde
649 b@1e88685f5dde
649 </a>
650 </a>
650 </td>
651 </td>
651 </tr>
652 </tr>
652 <tr>
653 <tr>
653 <th class="author">author:</th>
654 <th class="author">author:</th>
654 <td class="author">&#116;&#101;&#115;&#116;</td>
655 <td class="author">&#116;&#101;&#115;&#116;</td>
655 </tr>
656 </tr>
656 <tr>
657 <tr>
657 <th class="date">date:</th>
658 <th class="date">date:</th>
658 <td class="date">Thu, 01 Jan 1970 00:00:00 +0000</td>
659 <td class="date">Thu, 01 Jan 1970 00:00:00 +0000</td>
659 </tr>
660 </tr>
660 </table>
661 </table>
661
662
662
663
663
664
664
665
665 <script type="text/javascript">process_dates()</script>
666 <script type="text/javascript">process_dates()</script>
666
667
667 <div class="logo">
668 <div class="logo">
668 <a href="http://mercurial.selenic.com/">
669 <a href="http://mercurial.selenic.com/">
669 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
670 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial"></a>
670 </div>
671 </div>
671
672
672 </body>
673 </body>
673 </html>
674 </html>
674
675
675
676
676 rss log
677 rss log
677
678
678 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rss-log/tip/a')
679 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rss-log/tip/a')
679 200 Script output follows
680 200 Script output follows
680
681
681 <?xml version="1.0" encoding="ascii"?>
682 <?xml version="1.0" encoding="ascii"?>
682 <rss version="2.0">
683 <rss version="2.0">
683 <channel>
684 <channel>
684 <link>http://*:$HGPORT/</link> (glob)
685 <link>http://*:$HGPORT/</link> (glob)
685 <language>en-us</language>
686 <language>en-us</language>
686
687
687 <title>test: a history</title>
688 <title>test: a history</title>
688 <description>a revision history</description>
689 <description>a revision history</description>
689 <item>
690 <item>
690 <title>second a</title>
691 <title>second a</title>
691 <link>http://*:$HGPORT/log01de2d66a28d/a</link> (glob)
692 <link>http://*:$HGPORT/log01de2d66a28d/a</link> (glob)
692 <description><![CDATA[second a]]></description>
693 <description><![CDATA[second a]]></description>
693 <author>&#116;&#101;&#115;&#116;</author>
694 <author>&#116;&#101;&#115;&#116;</author>
694 <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
695 <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
695 </item>
696 </item>
696 <item>
697 <item>
697 <title>first a</title>
698 <title>first a</title>
698 <link>http://*:$HGPORT/log5ed941583260/a</link> (glob)
699 <link>http://*:$HGPORT/log5ed941583260/a</link> (glob)
699 <description><![CDATA[first a]]></description>
700 <description><![CDATA[first a]]></description>
700 <author>&#116;&#101;&#115;&#116;</author>
701 <author>&#116;&#101;&#115;&#116;</author>
701 <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
702 <pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
702 </item>
703 </item>
703
704
704 </channel>
705 </channel>
705 </rss>
706 </rss>
706
707
707 atom log
708 atom log
708
709
709 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/atom-log/tip/a')
710 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/atom-log/tip/a')
710 200 Script output follows
711 200 Script output follows
711
712
712 <?xml version="1.0" encoding="ascii"?>
713 <?xml version="1.0" encoding="ascii"?>
713 <feed xmlns="http://www.w3.org/2005/Atom">
714 <feed xmlns="http://www.w3.org/2005/Atom">
714 <id>http://*:$HGPORT/atom-log/tip/a</id> (glob)
715 <id>http://*:$HGPORT/atom-log/tip/a</id> (glob)
715 <link rel="self" href="http://*:$HGPORT/atom-log/tip/a"/> (glob)
716 <link rel="self" href="http://*:$HGPORT/atom-log/tip/a"/> (glob)
716 <title>test: a history</title>
717 <title>test: a history</title>
717 <updated>1970-01-01T00:00:00+00:00</updated>
718 <updated>1970-01-01T00:00:00+00:00</updated>
718
719
719 <entry>
720 <entry>
720 <title>second a</title>
721 <title>second a</title>
721 <id>http://*:$HGPORT/#changeset-01de2d66a28df5549090991dccda788726948517</id> (glob)
722 <id>http://*:$HGPORT/#changeset-01de2d66a28df5549090991dccda788726948517</id> (glob)
722 <link href="http://*:$HGPORT/rev/01de2d66a28d"/> (glob)
723 <link href="http://*:$HGPORT/rev/01de2d66a28d"/> (glob)
723 <author>
724 <author>
724 <name>test</name>
725 <name>test</name>
725 <email>&#116;&#101;&#115;&#116;</email>
726 <email>&#116;&#101;&#115;&#116;</email>
726 </author>
727 </author>
727 <updated>1970-01-01T00:00:00+00:00</updated>
728 <updated>1970-01-01T00:00:00+00:00</updated>
728 <published>1970-01-01T00:00:00+00:00</published>
729 <published>1970-01-01T00:00:00+00:00</published>
729 <content type="xhtml">
730 <content type="xhtml">
730 <div xmlns="http://www.w3.org/1999/xhtml">
731 <div xmlns="http://www.w3.org/1999/xhtml">
731 <pre xml:space="preserve">second a</pre>
732 <pre xml:space="preserve">second a</pre>
732 </div>
733 </div>
733 </content>
734 </content>
734 </entry>
735 </entry>
735 <entry>
736 <entry>
736 <title>first a</title>
737 <title>first a</title>
737 <id>http://*:$HGPORT/#changeset-5ed941583260248620985524192fdc382ef57c36</id> (glob)
738 <id>http://*:$HGPORT/#changeset-5ed941583260248620985524192fdc382ef57c36</id> (glob)
738 <link href="http://*:$HGPORT/rev/5ed941583260"/> (glob)
739 <link href="http://*:$HGPORT/rev/5ed941583260"/> (glob)
739 <author>
740 <author>
740 <name>test</name>
741 <name>test</name>
741 <email>&#116;&#101;&#115;&#116;</email>
742 <email>&#116;&#101;&#115;&#116;</email>
742 </author>
743 </author>
743 <updated>1970-01-01T00:00:00+00:00</updated>
744 <updated>1970-01-01T00:00:00+00:00</updated>
744 <published>1970-01-01T00:00:00+00:00</published>
745 <published>1970-01-01T00:00:00+00:00</published>
745 <content type="xhtml">
746 <content type="xhtml">
746 <div xmlns="http://www.w3.org/1999/xhtml">
747 <div xmlns="http://www.w3.org/1999/xhtml">
747 <pre xml:space="preserve">first a</pre>
748 <pre xml:space="preserve">first a</pre>
748 </div>
749 </div>
749 </content>
750 </content>
750 </entry>
751 </entry>
751
752
752 </feed>
753 </feed>
753
754
754 errors
755 errors
755
756
756 $ cat errors.log
757 $ cat errors.log
@@ -1,57 +1,59 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Test raw style of hgweb
3 Test raw style of hgweb
2
4
3 $ hg init test
5 $ hg init test
4 $ cd test
6 $ cd test
5 $ mkdir sub
7 $ mkdir sub
6 $ cat >'sub/some "text".txt' <<ENDSOME
8 $ cat >'sub/some "text".txt' <<ENDSOME
7 > This is just some random text
9 > This is just some random text
8 > that will go inside the file and take a few lines.
10 > that will go inside the file and take a few lines.
9 > It is very boring to read, but computers don't
11 > It is very boring to read, but computers don't
10 > care about things like that.
12 > care about things like that.
11 > ENDSOME
13 > ENDSOME
12 $ hg add 'sub/some "text".txt'
14 $ hg add 'sub/some "text".txt'
13 warning: filename contains '"', which is reserved on Windows: 'sub/some "text".txt'
15 warning: filename contains '"', which is reserved on Windows: 'sub/some "text".txt'
14 $ hg commit -d "1 0" -m "Just some text"
16 $ hg commit -d "1 0" -m "Just some text"
15
17
16 $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid
18 $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid
17
19
18 $ cat hg.pid >> $DAEMON_PIDS
20 $ cat hg.pid >> $DAEMON_PIDS
19 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw' content-type content-length content-disposition) >getoutput.txt &
21 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw' content-type content-length content-disposition) >getoutput.txt &
20 $ sleep 5
22 $ sleep 5
21 $ kill `cat hg.pid`
23 $ kill `cat hg.pid`
22 $ sleep 1 # wait for server to scream and die
24 $ sleep 1 # wait for server to scream and die
23 $ cat getoutput.txt
25 $ cat getoutput.txt
24 200 Script output follows
26 200 Script output follows
25 content-type: application/binary
27 content-type: application/binary
26 content-length: 157
28 content-length: 157
27 content-disposition: inline; filename="some \"text\".txt"
29 content-disposition: inline; filename="some \"text\".txt"
28
30
29 This is just some random text
31 This is just some random text
30 that will go inside the file and take a few lines.
32 that will go inside the file and take a few lines.
31 It is very boring to read, but computers don't
33 It is very boring to read, but computers don't
32 care about things like that.
34 care about things like that.
33 $ cat access.log error.log
35 $ cat access.log error.log
34 127.0.0.1 - - [*] "GET /?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw HTTP/1.1" 200 - (glob)
36 127.0.0.1 - - [*] "GET /?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw HTTP/1.1" 200 - (glob)
35
37
36 $ rm access.log error.log
38 $ rm access.log error.log
37 $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid \
39 $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid \
38 > --config web.guessmime=True
40 > --config web.guessmime=True
39
41
40 $ cat hg.pid >> $DAEMON_PIDS
42 $ cat hg.pid >> $DAEMON_PIDS
41 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw' content-type content-length content-disposition) >getoutput.txt &
43 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw' content-type content-length content-disposition) >getoutput.txt &
42 $ sleep 5
44 $ sleep 5
43 $ kill `cat hg.pid`
45 $ kill `cat hg.pid`
44 $ sleep 1 # wait for server to scream and die
46 $ sleep 1 # wait for server to scream and die
45 $ cat getoutput.txt
47 $ cat getoutput.txt
46 200 Script output follows
48 200 Script output follows
47 content-type: text/plain; charset="ascii"
49 content-type: text/plain; charset="ascii"
48 content-length: 157
50 content-length: 157
49 content-disposition: inline; filename="some \"text\".txt"
51 content-disposition: inline; filename="some \"text\".txt"
50
52
51 This is just some random text
53 This is just some random text
52 that will go inside the file and take a few lines.
54 that will go inside the file and take a few lines.
53 It is very boring to read, but computers don't
55 It is very boring to read, but computers don't
54 care about things like that.
56 care about things like that.
55 $ cat access.log error.log
57 $ cat access.log error.log
56 127.0.0.1 - - [*] "GET /?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw HTTP/1.1" 200 - (glob)
58 127.0.0.1 - - [*] "GET /?f=a23bf1310f6e;file=sub/some%20%22text%22.txt;style=raw HTTP/1.1" 200 - (glob)
57
59
@@ -1,231 +1,233 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 setting up repo
3 setting up repo
2
4
3 $ hg init test
5 $ hg init test
4 $ cd test
6 $ cd test
5 $ echo a > a
7 $ echo a > a
6 $ hg ci -Ama
8 $ hg ci -Ama
7 adding a
9 adding a
8 $ hg rm a
10 $ hg rm a
9 $ hg ci -mdel
11 $ hg ci -mdel
10
12
11 set up hgweb
13 set up hgweb
12
14
13 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
15 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
14 $ cat hg.pid >> $DAEMON_PIDS
16 $ cat hg.pid >> $DAEMON_PIDS
15
17
16 revision
18 revision
17
19
18 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip'
20 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip'
19 200 Script output follows
21 200 Script output follows
20
22
21 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
23 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
22 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
24 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
23 <head>
25 <head>
24 <link rel="icon" href="/static/hgicon.png" type="image/png" />
26 <link rel="icon" href="/static/hgicon.png" type="image/png" />
25 <meta name="robots" content="index, nofollow" />
27 <meta name="robots" content="index, nofollow" />
26 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
28 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
27 <script type="text/javascript" src="/static/mercurial.js"></script>
29 <script type="text/javascript" src="/static/mercurial.js"></script>
28
30
29 <title>test: c78f6c5cbea9</title>
31 <title>test: c78f6c5cbea9</title>
30 </head>
32 </head>
31 <body>
33 <body>
32 <div class="container">
34 <div class="container">
33 <div class="menu">
35 <div class="menu">
34 <div class="logo">
36 <div class="logo">
35 <a href="http://mercurial.selenic.com/">
37 <a href="http://mercurial.selenic.com/">
36 <img src="/static/hglogo.png" alt="mercurial" /></a>
38 <img src="/static/hglogo.png" alt="mercurial" /></a>
37 </div>
39 </div>
38 <ul>
40 <ul>
39 <li><a href="/shortlog/c78f6c5cbea9">log</a></li>
41 <li><a href="/shortlog/c78f6c5cbea9">log</a></li>
40 <li><a href="/graph/c78f6c5cbea9">graph</a></li>
42 <li><a href="/graph/c78f6c5cbea9">graph</a></li>
41 <li><a href="/tags">tags</a></li>
43 <li><a href="/tags">tags</a></li>
42 <li><a href="/bookmarks">bookmarks</a></li>
44 <li><a href="/bookmarks">bookmarks</a></li>
43 <li><a href="/branches">branches</a></li>
45 <li><a href="/branches">branches</a></li>
44 </ul>
46 </ul>
45 <ul>
47 <ul>
46 <li class="active">changeset</li>
48 <li class="active">changeset</li>
47 <li><a href="/raw-rev/c78f6c5cbea9">raw</a></li>
49 <li><a href="/raw-rev/c78f6c5cbea9">raw</a></li>
48 <li><a href="/file/c78f6c5cbea9">browse</a></li>
50 <li><a href="/file/c78f6c5cbea9">browse</a></li>
49 </ul>
51 </ul>
50 <ul>
52 <ul>
51
53
52 </ul>
54 </ul>
53 <ul>
55 <ul>
54 <li><a href="/help">help</a></li>
56 <li><a href="/help">help</a></li>
55 </ul>
57 </ul>
56 </div>
58 </div>
57
59
58 <div class="main">
60 <div class="main">
59
61
60 <h2><a href="/">test</a></h2>
62 <h2><a href="/">test</a></h2>
61 <h3>changeset 1:c78f6c5cbea9 <span class="tag">tip</span> </h3>
63 <h3>changeset 1:c78f6c5cbea9 <span class="tag">tip</span> </h3>
62
64
63 <form class="search" action="/log">
65 <form class="search" action="/log">
64
66
65 <p><input name="rev" id="search1" type="text" size="30" /></p>
67 <p><input name="rev" id="search1" type="text" size="30" /></p>
66 <div id="hint">find changesets by author, revision,
68 <div id="hint">find changesets by author, revision,
67 files, or words in the commit message</div>
69 files, or words in the commit message</div>
68 </form>
70 </form>
69
71
70 <div class="description">del</div>
72 <div class="description">del</div>
71
73
72 <table id="changesetEntry">
74 <table id="changesetEntry">
73 <tr>
75 <tr>
74 <th class="author">author</th>
76 <th class="author">author</th>
75 <td class="author">&#116;&#101;&#115;&#116;</td>
77 <td class="author">&#116;&#101;&#115;&#116;</td>
76 </tr>
78 </tr>
77 <tr>
79 <tr>
78 <th class="date">date</th>
80 <th class="date">date</th>
79 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
81 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td></tr>
80 <tr>
82 <tr>
81 <th class="author">parents</th>
83 <th class="author">parents</th>
82 <td class="author"><a href="/rev/cb9a9f314b8b">cb9a9f314b8b</a> </td>
84 <td class="author"><a href="/rev/cb9a9f314b8b">cb9a9f314b8b</a> </td>
83 </tr>
85 </tr>
84 <tr>
86 <tr>
85 <th class="author">children</th>
87 <th class="author">children</th>
86 <td class="author"></td>
88 <td class="author"></td>
87 </tr>
89 </tr>
88 <tr>
90 <tr>
89 <th class="files">files</th>
91 <th class="files">files</th>
90 <td class="files">a </td>
92 <td class="files">a </td>
91 </tr>
93 </tr>
92 <tr>
94 <tr>
93 <th class="diffstat">diffstat</th>
95 <th class="diffstat">diffstat</th>
94 <td class="diffstat">
96 <td class="diffstat">
95 1 files changed, 0 insertions(+), 1 deletions(-)
97 1 files changed, 0 insertions(+), 1 deletions(-)
96
98
97 <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a>
99 <a id="diffstatexpand" href="javascript:showDiffstat()"/>[<tt>+</tt>]</a>
98 <div id="diffstatdetails" style="display:none;">
100 <div id="diffstatdetails" style="display:none;">
99 <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a>
101 <a href="javascript:hideDiffstat()"/>[<tt>-</tt>]</a>
100 <p>
102 <p>
101 <table> <tr class="parity0">
103 <table> <tr class="parity0">
102 <td class="diffstat-file"><a href="#l1.1">a</a></td>
104 <td class="diffstat-file"><a href="#l1.1">a</a></td>
103 <td class="diffstat-total" align="right">1</td>
105 <td class="diffstat-total" align="right">1</td>
104 <td class="diffstat-graph">
106 <td class="diffstat-graph">
105 <span class="diffstat-add" style="width:0.0%;">&nbsp;</span>
107 <span class="diffstat-add" style="width:0.0%;">&nbsp;</span>
106 <span class="diffstat-remove" style="width:100.0%;">&nbsp;</span>
108 <span class="diffstat-remove" style="width:100.0%;">&nbsp;</span>
107 </td>
109 </td>
108 </tr>
110 </tr>
109 </table>
111 </table>
110 </div>
112 </div>
111 </td>
113 </td>
112 </tr>
114 </tr>
113 </table>
115 </table>
114
116
115 <div class="overflow">
117 <div class="overflow">
116 <div class="sourcefirst"> line diff</div>
118 <div class="sourcefirst"> line diff</div>
117
119
118 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000
120 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000
119 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
121 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
120 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -1,1 +0,0 @@
122 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -1,1 +0,0 @@
121 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="minusline">-a
123 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="minusline">-a
122 </span></pre></div>
124 </span></pre></div>
123 </div>
125 </div>
124
126
125 </div>
127 </div>
126 </div>
128 </div>
127 <script type="text/javascript">process_dates()</script>
129 <script type="text/javascript">process_dates()</script>
128
130
129
131
130 </body>
132 </body>
131 </html>
133 </html>
132
134
133
135
134 diff removed file
136 diff removed file
135
137
136 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
138 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a'
137 200 Script output follows
139 200 Script output follows
138
140
139 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
141 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
140 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
142 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
141 <head>
143 <head>
142 <link rel="icon" href="/static/hgicon.png" type="image/png" />
144 <link rel="icon" href="/static/hgicon.png" type="image/png" />
143 <meta name="robots" content="index, nofollow" />
145 <meta name="robots" content="index, nofollow" />
144 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
146 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
145 <script type="text/javascript" src="/static/mercurial.js"></script>
147 <script type="text/javascript" src="/static/mercurial.js"></script>
146
148
147 <title>test: a diff</title>
149 <title>test: a diff</title>
148 </head>
150 </head>
149 <body>
151 <body>
150
152
151 <div class="container">
153 <div class="container">
152 <div class="menu">
154 <div class="menu">
153 <div class="logo">
155 <div class="logo">
154 <a href="http://mercurial.selenic.com/">
156 <a href="http://mercurial.selenic.com/">
155 <img src="/static/hglogo.png" alt="mercurial" /></a>
157 <img src="/static/hglogo.png" alt="mercurial" /></a>
156 </div>
158 </div>
157 <ul>
159 <ul>
158 <li><a href="/shortlog/c78f6c5cbea9">log</a></li>
160 <li><a href="/shortlog/c78f6c5cbea9">log</a></li>
159 <li><a href="/graph/c78f6c5cbea9">graph</a></li>
161 <li><a href="/graph/c78f6c5cbea9">graph</a></li>
160 <li><a href="/tags">tags</a></li>
162 <li><a href="/tags">tags</a></li>
161 <li><a href="/bookmarks">bookmarks</a></li>
163 <li><a href="/bookmarks">bookmarks</a></li>
162 <li><a href="/branches">branches</a></li>
164 <li><a href="/branches">branches</a></li>
163 </ul>
165 </ul>
164 <ul>
166 <ul>
165 <li><a href="/rev/c78f6c5cbea9">changeset</a></li>
167 <li><a href="/rev/c78f6c5cbea9">changeset</a></li>
166 <li><a href="/file/c78f6c5cbea9">browse</a></li>
168 <li><a href="/file/c78f6c5cbea9">browse</a></li>
167 </ul>
169 </ul>
168 <ul>
170 <ul>
169 <li><a href="/file/c78f6c5cbea9/a">file</a></li>
171 <li><a href="/file/c78f6c5cbea9/a">file</a></li>
170 <li><a href="/file/tip/a">latest</a></li>
172 <li><a href="/file/tip/a">latest</a></li>
171 <li class="active">diff</li>
173 <li class="active">diff</li>
172 <li><a href="/annotate/c78f6c5cbea9/a">annotate</a></li>
174 <li><a href="/annotate/c78f6c5cbea9/a">annotate</a></li>
173 <li><a href="/log/c78f6c5cbea9/a">file log</a></li>
175 <li><a href="/log/c78f6c5cbea9/a">file log</a></li>
174 <li><a href="/raw-file/c78f6c5cbea9/a">raw</a></li>
176 <li><a href="/raw-file/c78f6c5cbea9/a">raw</a></li>
175 </ul>
177 </ul>
176 <ul>
178 <ul>
177 <li><a href="/help">help</a></li>
179 <li><a href="/help">help</a></li>
178 </ul>
180 </ul>
179 </div>
181 </div>
180
182
181 <div class="main">
183 <div class="main">
182 <h2><a href="/">test</a></h2>
184 <h2><a href="/">test</a></h2>
183 <h3>diff a @ 1:c78f6c5cbea9</h3>
185 <h3>diff a @ 1:c78f6c5cbea9</h3>
184
186
185 <form class="search" action="/log">
187 <form class="search" action="/log">
186 <p></p>
188 <p></p>
187 <p><input name="rev" id="search1" type="text" size="30" /></p>
189 <p><input name="rev" id="search1" type="text" size="30" /></p>
188 <div id="hint">find changesets by author, revision,
190 <div id="hint">find changesets by author, revision,
189 files, or words in the commit message</div>
191 files, or words in the commit message</div>
190 </form>
192 </form>
191
193
192 <div class="description">del</div>
194 <div class="description">del</div>
193
195
194 <table id="changesetEntry">
196 <table id="changesetEntry">
195 <tr>
197 <tr>
196 <th>author</th>
198 <th>author</th>
197 <td>&#116;&#101;&#115;&#116;</td>
199 <td>&#116;&#101;&#115;&#116;</td>
198 </tr>
200 </tr>
199 <tr>
201 <tr>
200 <th>date</th>
202 <th>date</th>
201 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
203 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
202 </tr>
204 </tr>
203 <tr>
205 <tr>
204 <th>parents</th>
206 <th>parents</th>
205 <td><a href="/file/cb9a9f314b8b/a">cb9a9f314b8b</a> </td>
207 <td><a href="/file/cb9a9f314b8b/a">cb9a9f314b8b</a> </td>
206 </tr>
208 </tr>
207 <tr>
209 <tr>
208 <th>children</th>
210 <th>children</th>
209 <td></td>
211 <td></td>
210 </tr>
212 </tr>
211
213
212 </table>
214 </table>
213
215
214 <div class="overflow">
216 <div class="overflow">
215 <div class="sourcefirst"> line diff</div>
217 <div class="sourcefirst"> line diff</div>
216
218
217 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000
219 <div class="source bottomline parity0"><pre><a href="#l1.1" id="l1.1"> 1.1</a> <span class="minusline">--- a/a Thu Jan 01 00:00:00 1970 +0000
218 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
220 </span><a href="#l1.2" id="l1.2"> 1.2</a> <span class="plusline">+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
219 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -1,1 +0,0 @@
221 </span><a href="#l1.3" id="l1.3"> 1.3</a> <span class="atline">@@ -1,1 +0,0 @@
220 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="minusline">-a
222 </span><a href="#l1.4" id="l1.4"> 1.4</a> <span class="minusline">-a
221 </span></pre></div>
223 </span></pre></div>
222 </div>
224 </div>
223 </div>
225 </div>
224 </div>
226 </div>
225
227
226 <script type="text/javascript">process_dates()</script>
228 <script type="text/javascript">process_dates()</script>
227
229
228
230
229 </body>
231 </body>
230 </html>
232 </html>
231
233
@@ -1,443 +1,445 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Some tests for hgweb. Tests static files, plain files and different 404's.
3 Some tests for hgweb. Tests static files, plain files and different 404's.
2
4
3 $ hg init test
5 $ hg init test
4 $ cd test
6 $ cd test
5 $ mkdir da
7 $ mkdir da
6 $ echo foo > da/foo
8 $ echo foo > da/foo
7 $ echo foo > foo
9 $ echo foo > foo
8 $ hg ci -Ambase
10 $ hg ci -Ambase
9 adding da/foo
11 adding da/foo
10 adding foo
12 adding foo
11 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
13 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
12 $ cat hg.pid >> $DAEMON_PIDS
14 $ cat hg.pid >> $DAEMON_PIDS
13
15
14 manifest
16 manifest
15
17
16 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
18 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw')
17 200 Script output follows
19 200 Script output follows
18
20
19
21
20 drwxr-xr-x da
22 drwxr-xr-x da
21 -rw-r--r-- 4 foo
23 -rw-r--r-- 4 foo
22
24
23
25
24 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/da?style=raw')
26 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/da?style=raw')
25 200 Script output follows
27 200 Script output follows
26
28
27
29
28 -rw-r--r-- 4 foo
30 -rw-r--r-- 4 foo
29
31
30
32
31
33
32 plain file
34 plain file
33
35
34 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?style=raw'
36 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?style=raw'
35 200 Script output follows
37 200 Script output follows
36
38
37 foo
39 foo
38
40
39 should give a 404 - static file that does not exist
41 should give a 404 - static file that does not exist
40
42
41 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/bogus'
43 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/bogus'
42 404 Not Found
44 404 Not Found
43
45
44 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
46 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
45 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
47 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
46 <head>
48 <head>
47 <link rel="icon" href="/static/hgicon.png" type="image/png" />
49 <link rel="icon" href="/static/hgicon.png" type="image/png" />
48 <meta name="robots" content="index, nofollow" />
50 <meta name="robots" content="index, nofollow" />
49 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
51 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
50 <script type="text/javascript" src="/static/mercurial.js"></script>
52 <script type="text/javascript" src="/static/mercurial.js"></script>
51
53
52 <title>test: error</title>
54 <title>test: error</title>
53 </head>
55 </head>
54 <body>
56 <body>
55
57
56 <div class="container">
58 <div class="container">
57 <div class="menu">
59 <div class="menu">
58 <div class="logo">
60 <div class="logo">
59 <a href="http://mercurial.selenic.com/">
61 <a href="http://mercurial.selenic.com/">
60 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
62 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
61 </div>
63 </div>
62 <ul>
64 <ul>
63 <li><a href="/shortlog">log</a></li>
65 <li><a href="/shortlog">log</a></li>
64 <li><a href="/graph">graph</a></li>
66 <li><a href="/graph">graph</a></li>
65 <li><a href="/tags">tags</a></li>
67 <li><a href="/tags">tags</a></li>
66 <li><a href="/bookmarks">bookmarks</a></li>
68 <li><a href="/bookmarks">bookmarks</a></li>
67 <li><a href="/branches">branches</a></li>
69 <li><a href="/branches">branches</a></li>
68 <li><a href="/help">help</a></li>
70 <li><a href="/help">help</a></li>
69 </ul>
71 </ul>
70 </div>
72 </div>
71
73
72 <div class="main">
74 <div class="main">
73
75
74 <h2><a href="/">test</a></h2>
76 <h2><a href="/">test</a></h2>
75 <h3>error</h3>
77 <h3>error</h3>
76
78
77 <form class="search" action="/log">
79 <form class="search" action="/log">
78
80
79 <p><input name="rev" id="search1" type="text" size="30"></p>
81 <p><input name="rev" id="search1" type="text" size="30"></p>
80 <div id="hint">find changesets by author, revision,
82 <div id="hint">find changesets by author, revision,
81 files, or words in the commit message</div>
83 files, or words in the commit message</div>
82 </form>
84 </form>
83
85
84 <div class="description">
86 <div class="description">
85 <p>
87 <p>
86 An error occurred while processing your request:
88 An error occurred while processing your request:
87 </p>
89 </p>
88 <p>
90 <p>
89 Not Found
91 Not Found
90 </p>
92 </p>
91 </div>
93 </div>
92 </div>
94 </div>
93 </div>
95 </div>
94
96
95 <script type="text/javascript">process_dates()</script>
97 <script type="text/javascript">process_dates()</script>
96
98
97
99
98 </body>
100 </body>
99 </html>
101 </html>
100
102
101 [1]
103 [1]
102
104
103 should give a 404 - bad revision
105 should give a 404 - bad revision
104
106
105 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/spam/foo?style=raw'
107 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/spam/foo?style=raw'
106 404 Not Found
108 404 Not Found
107
109
108
110
109 error: revision not found: spam
111 error: revision not found: spam
110 [1]
112 [1]
111
113
112 should give a 400 - bad command
114 should give a 400 - bad command
113
115
114 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?cmd=spam&style=raw'
116 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?cmd=spam&style=raw'
115 400* (glob)
117 400* (glob)
116
118
117
119
118 error: no such method: spam
120 error: no such method: spam
119 [1]
121 [1]
120
122
121 should give a 404 - file does not exist
123 should give a 404 - file does not exist
122
124
123 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw'
125 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw'
124 404 Not Found
126 404 Not Found
125
127
126
128
127 error: bork@2ef0ac749a14: not found in manifest
129 error: bork@2ef0ac749a14: not found in manifest
128 [1]
130 [1]
129 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork'
131 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork'
130 404 Not Found
132 404 Not Found
131
133
132 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
134 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
133 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
135 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
134 <head>
136 <head>
135 <link rel="icon" href="/static/hgicon.png" type="image/png" />
137 <link rel="icon" href="/static/hgicon.png" type="image/png" />
136 <meta name="robots" content="index, nofollow" />
138 <meta name="robots" content="index, nofollow" />
137 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
139 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
138 <script type="text/javascript" src="/static/mercurial.js"></script>
140 <script type="text/javascript" src="/static/mercurial.js"></script>
139
141
140 <title>test: error</title>
142 <title>test: error</title>
141 </head>
143 </head>
142 <body>
144 <body>
143
145
144 <div class="container">
146 <div class="container">
145 <div class="menu">
147 <div class="menu">
146 <div class="logo">
148 <div class="logo">
147 <a href="http://mercurial.selenic.com/">
149 <a href="http://mercurial.selenic.com/">
148 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
150 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
149 </div>
151 </div>
150 <ul>
152 <ul>
151 <li><a href="/shortlog">log</a></li>
153 <li><a href="/shortlog">log</a></li>
152 <li><a href="/graph">graph</a></li>
154 <li><a href="/graph">graph</a></li>
153 <li><a href="/tags">tags</a></li>
155 <li><a href="/tags">tags</a></li>
154 <li><a href="/bookmarks">bookmarks</a></li>
156 <li><a href="/bookmarks">bookmarks</a></li>
155 <li><a href="/branches">branches</a></li>
157 <li><a href="/branches">branches</a></li>
156 <li><a href="/help">help</a></li>
158 <li><a href="/help">help</a></li>
157 </ul>
159 </ul>
158 </div>
160 </div>
159
161
160 <div class="main">
162 <div class="main">
161
163
162 <h2><a href="/">test</a></h2>
164 <h2><a href="/">test</a></h2>
163 <h3>error</h3>
165 <h3>error</h3>
164
166
165 <form class="search" action="/log">
167 <form class="search" action="/log">
166
168
167 <p><input name="rev" id="search1" type="text" size="30"></p>
169 <p><input name="rev" id="search1" type="text" size="30"></p>
168 <div id="hint">find changesets by author, revision,
170 <div id="hint">find changesets by author, revision,
169 files, or words in the commit message</div>
171 files, or words in the commit message</div>
170 </form>
172 </form>
171
173
172 <div class="description">
174 <div class="description">
173 <p>
175 <p>
174 An error occurred while processing your request:
176 An error occurred while processing your request:
175 </p>
177 </p>
176 <p>
178 <p>
177 bork@2ef0ac749a14: not found in manifest
179 bork@2ef0ac749a14: not found in manifest
178 </p>
180 </p>
179 </div>
181 </div>
180 </div>
182 </div>
181 </div>
183 </div>
182
184
183 <script type="text/javascript">process_dates()</script>
185 <script type="text/javascript">process_dates()</script>
184
186
185
187
186 </body>
188 </body>
187 </html>
189 </html>
188
190
189 [1]
191 [1]
190 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/bork?style=raw'
192 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/bork?style=raw'
191 404 Not Found
193 404 Not Found
192
194
193
195
194 error: bork@2ef0ac749a14: not found in manifest
196 error: bork@2ef0ac749a14: not found in manifest
195 [1]
197 [1]
196
198
197 try bad style
199 try bad style
198
200
199 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=foobar')
201 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=foobar')
200 200 Script output follows
202 200 Script output follows
201
203
202 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
204 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
203 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
205 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
204 <head>
206 <head>
205 <link rel="icon" href="/static/hgicon.png" type="image/png" />
207 <link rel="icon" href="/static/hgicon.png" type="image/png" />
206 <meta name="robots" content="index, nofollow" />
208 <meta name="robots" content="index, nofollow" />
207 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
209 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
208 <script type="text/javascript" src="/static/mercurial.js"></script>
210 <script type="text/javascript" src="/static/mercurial.js"></script>
209
211
210 <title>test: 2ef0ac749a14 /</title>
212 <title>test: 2ef0ac749a14 /</title>
211 </head>
213 </head>
212 <body>
214 <body>
213
215
214 <div class="container">
216 <div class="container">
215 <div class="menu">
217 <div class="menu">
216 <div class="logo">
218 <div class="logo">
217 <a href="http://mercurial.selenic.com/">
219 <a href="http://mercurial.selenic.com/">
218 <img src="/static/hglogo.png" alt="mercurial" /></a>
220 <img src="/static/hglogo.png" alt="mercurial" /></a>
219 </div>
221 </div>
220 <ul>
222 <ul>
221 <li><a href="/shortlog/2ef0ac749a14">log</a></li>
223 <li><a href="/shortlog/2ef0ac749a14">log</a></li>
222 <li><a href="/graph/2ef0ac749a14">graph</a></li>
224 <li><a href="/graph/2ef0ac749a14">graph</a></li>
223 <li><a href="/tags">tags</a></li>
225 <li><a href="/tags">tags</a></li>
224 <li><a href="/bookmarks">bookmarks</a></li>
226 <li><a href="/bookmarks">bookmarks</a></li>
225 <li><a href="/branches">branches</a></li>
227 <li><a href="/branches">branches</a></li>
226 </ul>
228 </ul>
227 <ul>
229 <ul>
228 <li><a href="/rev/2ef0ac749a14">changeset</a></li>
230 <li><a href="/rev/2ef0ac749a14">changeset</a></li>
229 <li class="active">browse</li>
231 <li class="active">browse</li>
230 </ul>
232 </ul>
231 <ul>
233 <ul>
232
234
233 </ul>
235 </ul>
234 <ul>
236 <ul>
235 <li><a href="/help">help</a></li>
237 <li><a href="/help">help</a></li>
236 </ul>
238 </ul>
237 </div>
239 </div>
238
240
239 <div class="main">
241 <div class="main">
240 <h2><a href="/">test</a></h2>
242 <h2><a href="/">test</a></h2>
241 <h3>directory / @ 0:2ef0ac749a14 <span class="tag">tip</span> </h3>
243 <h3>directory / @ 0:2ef0ac749a14 <span class="tag">tip</span> </h3>
242
244
243 <form class="search" action="/log">
245 <form class="search" action="/log">
244
246
245 <p><input name="rev" id="search1" type="text" size="30" /></p>
247 <p><input name="rev" id="search1" type="text" size="30" /></p>
246 <div id="hint">find changesets by author, revision,
248 <div id="hint">find changesets by author, revision,
247 files, or words in the commit message</div>
249 files, or words in the commit message</div>
248 </form>
250 </form>
249
251
250 <table class="bigtable">
252 <table class="bigtable">
251 <tr>
253 <tr>
252 <th class="name">name</th>
254 <th class="name">name</th>
253 <th class="size">size</th>
255 <th class="size">size</th>
254 <th class="permissions">permissions</th>
256 <th class="permissions">permissions</th>
255 </tr>
257 </tr>
256 <tr class="fileline parity0">
258 <tr class="fileline parity0">
257 <td class="name"><a href="/file/2ef0ac749a14/">[up]</a></td>
259 <td class="name"><a href="/file/2ef0ac749a14/">[up]</a></td>
258 <td class="size"></td>
260 <td class="size"></td>
259 <td class="permissions">drwxr-xr-x</td>
261 <td class="permissions">drwxr-xr-x</td>
260 </tr>
262 </tr>
261
263
262 <tr class="fileline parity1">
264 <tr class="fileline parity1">
263 <td class="name">
265 <td class="name">
264 <a href="/file/2ef0ac749a14/da">
266 <a href="/file/2ef0ac749a14/da">
265 <img src="/static/coal-folder.png" alt="dir."/> da/
267 <img src="/static/coal-folder.png" alt="dir."/> da/
266 </a>
268 </a>
267 <a href="/file/2ef0ac749a14/da/">
269 <a href="/file/2ef0ac749a14/da/">
268
270
269 </a>
271 </a>
270 </td>
272 </td>
271 <td class="size"></td>
273 <td class="size"></td>
272 <td class="permissions">drwxr-xr-x</td>
274 <td class="permissions">drwxr-xr-x</td>
273 </tr>
275 </tr>
274
276
275 <tr class="fileline parity0">
277 <tr class="fileline parity0">
276 <td class="filename">
278 <td class="filename">
277 <a href="/file/2ef0ac749a14/foo">
279 <a href="/file/2ef0ac749a14/foo">
278 <img src="/static/coal-file.png" alt="file"/> foo
280 <img src="/static/coal-file.png" alt="file"/> foo
279 </a>
281 </a>
280 </td>
282 </td>
281 <td class="size">4</td>
283 <td class="size">4</td>
282 <td class="permissions">-rw-r--r--</td>
284 <td class="permissions">-rw-r--r--</td>
283 </tr>
285 </tr>
284 </table>
286 </table>
285 </div>
287 </div>
286 </div>
288 </div>
287 <script type="text/javascript">process_dates()</script>
289 <script type="text/javascript">process_dates()</script>
288
290
289
291
290 </body>
292 </body>
291 </html>
293 </html>
292
294
293
295
294 stop and restart
296 stop and restart
295
297
296 $ "$TESTDIR/killdaemons.py"
298 $ "$TESTDIR/killdaemons.py"
297 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
299 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log
298 $ cat hg.pid >> $DAEMON_PIDS
300 $ cat hg.pid >> $DAEMON_PIDS
299
301
300 Test the access/error files are opened in append mode
302 Test the access/error files are opened in append mode
301
303
302 $ python -c "print len(file('access.log').readlines()), 'log lines written'"
304 $ python -c "print len(file('access.log').readlines()), 'log lines written'"
303 10 log lines written
305 10 log lines written
304
306
305 static file
307 static file
306
308
307 $ "$TESTDIR/get-with-headers.py" --twice localhost:$HGPORT '/static/style-gitweb.css'
309 $ "$TESTDIR/get-with-headers.py" --twice localhost:$HGPORT '/static/style-gitweb.css'
308 200 Script output follows
310 200 Script output follows
309
311
310 body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; }
312 body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; }
311 a { color:#0000cc; }
313 a { color:#0000cc; }
312 a:hover, a:visited, a:active { color:#880000; }
314 a:hover, a:visited, a:active { color:#880000; }
313 div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
315 div.page_header { height:25px; padding:8px; font-size:18px; font-weight:bold; background-color:#d9d8d1; }
314 div.page_header a:visited { color:#0000cc; }
316 div.page_header a:visited { color:#0000cc; }
315 div.page_header a:hover { color:#880000; }
317 div.page_header a:hover { color:#880000; }
316 div.page_nav { padding:8px; }
318 div.page_nav { padding:8px; }
317 div.page_nav a:visited { color:#0000cc; }
319 div.page_nav a:visited { color:#0000cc; }
318 div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
320 div.page_path { padding:8px; border:solid #d9d8d1; border-width:0px 0px 1px}
319 div.page_footer { padding:4px 8px; background-color: #d9d8d1; }
321 div.page_footer { padding:4px 8px; background-color: #d9d8d1; }
320 div.page_footer_text { float:left; color:#555555; font-style:italic; }
322 div.page_footer_text { float:left; color:#555555; font-style:italic; }
321 div.page_body { padding:8px; }
323 div.page_body { padding:8px; }
322 div.title, a.title {
324 div.title, a.title {
323 display:block; padding:6px 8px;
325 display:block; padding:6px 8px;
324 font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000;
326 font-weight:bold; background-color:#edece6; text-decoration:none; color:#000000;
325 }
327 }
326 a.title:hover { background-color: #d9d8d1; }
328 a.title:hover { background-color: #d9d8d1; }
327 div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
329 div.title_text { padding:6px 0px; border: solid #d9d8d1; border-width:0px 0px 1px; }
328 div.log_body { padding:8px 8px 8px 150px; }
330 div.log_body { padding:8px 8px 8px 150px; }
329 .age { white-space:nowrap; }
331 .age { white-space:nowrap; }
330 span.age { position:relative; float:left; width:142px; font-style:italic; }
332 span.age { position:relative; float:left; width:142px; font-style:italic; }
331 div.log_link {
333 div.log_link {
332 padding:0px 8px;
334 padding:0px 8px;
333 font-size:10px; font-family:sans-serif; font-style:normal;
335 font-size:10px; font-family:sans-serif; font-style:normal;
334 position:relative; float:left; width:136px;
336 position:relative; float:left; width:136px;
335 }
337 }
336 div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; }
338 div.list_head { padding:6px 8px 4px; border:solid #d9d8d1; border-width:1px 0px 0px; font-style:italic; }
337 a.list { text-decoration:none; color:#000000; }
339 a.list { text-decoration:none; color:#000000; }
338 a.list:hover { text-decoration:underline; color:#880000; }
340 a.list:hover { text-decoration:underline; color:#880000; }
339 table { padding:8px 4px; }
341 table { padding:8px 4px; }
340 th { padding:2px 5px; font-size:12px; text-align:left; }
342 th { padding:2px 5px; font-size:12px; text-align:left; }
341 tr.light:hover, .parity0:hover { background-color:#edece6; }
343 tr.light:hover, .parity0:hover { background-color:#edece6; }
342 tr.dark, .parity1 { background-color:#f6f6f0; }
344 tr.dark, .parity1 { background-color:#f6f6f0; }
343 tr.dark:hover, .parity1:hover { background-color:#edece6; }
345 tr.dark:hover, .parity1:hover { background-color:#edece6; }
344 td { padding:2px 5px; font-size:12px; vertical-align:top; }
346 td { padding:2px 5px; font-size:12px; vertical-align:top; }
345 td.closed { background-color: #99f; }
347 td.closed { background-color: #99f; }
346 td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; }
348 td.link { padding:2px 5px; font-family:sans-serif; font-size:10px; }
347 td.indexlinks { white-space: nowrap; }
349 td.indexlinks { white-space: nowrap; }
348 td.indexlinks a {
350 td.indexlinks a {
349 padding: 2px 5px; line-height: 10px;
351 padding: 2px 5px; line-height: 10px;
350 border: 1px solid;
352 border: 1px solid;
351 color: #ffffff; background-color: #7777bb;
353 color: #ffffff; background-color: #7777bb;
352 border-color: #aaaadd #333366 #333366 #aaaadd;
354 border-color: #aaaadd #333366 #333366 #aaaadd;
353 font-weight: bold; text-align: center; text-decoration: none;
355 font-weight: bold; text-align: center; text-decoration: none;
354 font-size: 10px;
356 font-size: 10px;
355 }
357 }
356 td.indexlinks a:hover { background-color: #6666aa; }
358 td.indexlinks a:hover { background-color: #6666aa; }
357 div.pre { font-family:monospace; font-size:12px; white-space:pre; }
359 div.pre { font-family:monospace; font-size:12px; white-space:pre; }
358 div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
360 div.diff_info { font-family:monospace; color:#000099; background-color:#edece6; font-style:italic; }
359 div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
361 div.index_include { border:solid #d9d8d1; border-width:0px 0px 1px; padding:12px 8px; }
360 div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
362 div.search { margin:4px 8px; position:absolute; top:56px; right:12px }
361 .linenr { color:#999999; text-decoration:none }
363 .linenr { color:#999999; text-decoration:none }
362 div.rss_logo { float: right; white-space: nowrap; }
364 div.rss_logo { float: right; white-space: nowrap; }
363 div.rss_logo a {
365 div.rss_logo a {
364 padding:3px 6px; line-height:10px;
366 padding:3px 6px; line-height:10px;
365 border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
367 border:1px solid; border-color:#fcc7a5 #7d3302 #3e1a01 #ff954e;
366 color:#ffffff; background-color:#ff6600;
368 color:#ffffff; background-color:#ff6600;
367 font-weight:bold; font-family:sans-serif; font-size:10px;
369 font-weight:bold; font-family:sans-serif; font-size:10px;
368 text-align:center; text-decoration:none;
370 text-align:center; text-decoration:none;
369 }
371 }
370 div.rss_logo a:hover { background-color:#ee5500; }
372 div.rss_logo a:hover { background-color:#ee5500; }
371 pre { margin: 0; }
373 pre { margin: 0; }
372 span.logtags span {
374 span.logtags span {
373 padding: 0px 4px;
375 padding: 0px 4px;
374 font-size: 10px;
376 font-size: 10px;
375 font-weight: normal;
377 font-weight: normal;
376 border: 1px solid;
378 border: 1px solid;
377 background-color: #ffaaff;
379 background-color: #ffaaff;
378 border-color: #ffccff #ff00ee #ff00ee #ffccff;
380 border-color: #ffccff #ff00ee #ff00ee #ffccff;
379 }
381 }
380 span.logtags span.tagtag {
382 span.logtags span.tagtag {
381 background-color: #ffffaa;
383 background-color: #ffffaa;
382 border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
384 border-color: #ffffcc #ffee00 #ffee00 #ffffcc;
383 }
385 }
384 span.logtags span.branchtag {
386 span.logtags span.branchtag {
385 background-color: #aaffaa;
387 background-color: #aaffaa;
386 border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
388 border-color: #ccffcc #00cc33 #00cc33 #ccffcc;
387 }
389 }
388 span.logtags span.inbranchtag {
390 span.logtags span.inbranchtag {
389 background-color: #d5dde6;
391 background-color: #d5dde6;
390 border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4;
392 border-color: #e3ecf4 #9398f4 #9398f4 #e3ecf4;
391 }
393 }
392 span.logtags span.bookmarktag {
394 span.logtags span.bookmarktag {
393 background-color: #afdffa;
395 background-color: #afdffa;
394 border-color: #ccecff #46ace6 #46ace6 #ccecff;
396 border-color: #ccecff #46ace6 #46ace6 #ccecff;
395 }
397 }
396
398
397 /* Graph */
399 /* Graph */
398 div#wrapper {
400 div#wrapper {
399 position: relative;
401 position: relative;
400 margin: 0;
402 margin: 0;
401 padding: 0;
403 padding: 0;
402 margin-top: 3px;
404 margin-top: 3px;
403 }
405 }
404
406
405 canvas {
407 canvas {
406 position: absolute;
408 position: absolute;
407 z-index: 5;
409 z-index: 5;
408 top: -0.9em;
410 top: -0.9em;
409 margin: 0;
411 margin: 0;
410 }
412 }
411
413
412 ul#nodebgs {
414 ul#nodebgs {
413 list-style: none inside none;
415 list-style: none inside none;
414 padding: 0;
416 padding: 0;
415 margin: 0;
417 margin: 0;
416 top: -0.7em;
418 top: -0.7em;
417 }
419 }
418
420
419 ul#graphnodes li, ul#nodebgs li {
421 ul#graphnodes li, ul#nodebgs li {
420 height: 39px;
422 height: 39px;
421 }
423 }
422
424
423 ul#graphnodes {
425 ul#graphnodes {
424 position: absolute;
426 position: absolute;
425 z-index: 10;
427 z-index: 10;
426 top: -0.8em;
428 top: -0.8em;
427 list-style: none inside none;
429 list-style: none inside none;
428 padding: 0;
430 padding: 0;
429 }
431 }
430
432
431 ul#graphnodes li .info {
433 ul#graphnodes li .info {
432 display: block;
434 display: block;
433 font-size: 100%;
435 font-size: 100%;
434 position: relative;
436 position: relative;
435 top: -3px;
437 top: -3px;
436 font-style: italic;
438 font-style: italic;
437 }
439 }
438 304 Not Modified
440 304 Not Modified
439
441
440
442
441 errors
443 errors
442
444
443 $ cat errors.log
445 $ cat errors.log
@@ -1,679 +1,681 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Tests some basic hgwebdir functionality. Tests setting up paths and
3 Tests some basic hgwebdir functionality. Tests setting up paths and
2 collection, different forms of 404s and the subdirectory support.
4 collection, different forms of 404s and the subdirectory support.
3
5
4 $ mkdir webdir
6 $ mkdir webdir
5 $ cd webdir
7 $ cd webdir
6 $ hg init a
8 $ hg init a
7 $ echo a > a/a
9 $ echo a > a/a
8 $ hg --cwd a ci -Ama -d'1 0'
10 $ hg --cwd a ci -Ama -d'1 0'
9 adding a
11 adding a
10
12
11 create a mercurial queue repository
13 create a mercurial queue repository
12
14
13 $ hg --cwd a qinit --config extensions.hgext.mq= -c
15 $ hg --cwd a qinit --config extensions.hgext.mq= -c
14 $ hg init b
16 $ hg init b
15 $ echo b > b/b
17 $ echo b > b/b
16 $ hg --cwd b ci -Amb -d'2 0'
18 $ hg --cwd b ci -Amb -d'2 0'
17 adding b
19 adding b
18
20
19 create a nested repository
21 create a nested repository
20
22
21 $ cd b
23 $ cd b
22 $ hg init d
24 $ hg init d
23 $ echo d > d/d
25 $ echo d > d/d
24 $ hg --cwd d ci -Amd -d'3 0'
26 $ hg --cwd d ci -Amd -d'3 0'
25 adding d
27 adding d
26 $ cd ..
28 $ cd ..
27 $ hg init c
29 $ hg init c
28 $ echo c > c/c
30 $ echo c > c/c
29 $ hg --cwd c ci -Amc -d'3 0'
31 $ hg --cwd c ci -Amc -d'3 0'
30 adding c
32 adding c
31
33
32 create repository without .hg/store
34 create repository without .hg/store
33
35
34 $ hg init nostore
36 $ hg init nostore
35 $ rm -R nostore/.hg/store
37 $ rm -R nostore/.hg/store
36 $ root=`pwd`
38 $ root=`pwd`
37 $ cd ..
39 $ cd ..
38 $ cat > paths.conf <<EOF
40 $ cat > paths.conf <<EOF
39 > [paths]
41 > [paths]
40 > a=$root/a
42 > a=$root/a
41 > b=$root/b
43 > b=$root/b
42 > EOF
44 > EOF
43 $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf paths.conf \
45 $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf paths.conf \
44 > -A access-paths.log -E error-paths-1.log
46 > -A access-paths.log -E error-paths-1.log
45 $ cat hg.pid >> $DAEMON_PIDS
47 $ cat hg.pid >> $DAEMON_PIDS
46
48
47 should give a 404 - file does not exist
49 should give a 404 - file does not exist
48
50
49 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/bork?style=raw'
51 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/bork?style=raw'
50 404 Not Found
52 404 Not Found
51
53
52
54
53 error: bork@8580ff50825a: not found in manifest
55 error: bork@8580ff50825a: not found in manifest
54 [1]
56 [1]
55
57
56 should succeed
58 should succeed
57
59
58 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw'
60 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw'
59 200 Script output follows
61 200 Script output follows
60
62
61
63
62 /a/
64 /a/
63 /b/
65 /b/
64
66
65 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/a?style=raw'
67 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/a?style=raw'
66 200 Script output follows
68 200 Script output follows
67
69
68 a
70 a
69 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw'
71 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw'
70 200 Script output follows
72 200 Script output follows
71
73
72 b
74 b
73
75
74 should give a 404 - repo is not published
76 should give a 404 - repo is not published
75
77
76 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw'
78 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw'
77 404 Not Found
79 404 Not Found
78
80
79
81
80 error: repository c/file/tip/c not found
82 error: repository c/file/tip/c not found
81 [1]
83 [1]
82
84
83 atom-log without basedir
85 atom-log without basedir
84
86
85 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/atom-log' | grep '<link'
87 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/atom-log' | grep '<link'
86 <link rel="self" href="http://*:$HGPORT/a/atom-log"/> (glob)
88 <link rel="self" href="http://*:$HGPORT/a/atom-log"/> (glob)
87 <link rel="alternate" href="http://*:$HGPORT/a/"/> (glob)
89 <link rel="alternate" href="http://*:$HGPORT/a/"/> (glob)
88 <link href="http://*:$HGPORT/a/rev/8580ff50825a"/> (glob)
90 <link href="http://*:$HGPORT/a/rev/8580ff50825a"/> (glob)
89
91
90 rss-log without basedir
92 rss-log without basedir
91
93
92 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/rss-log' | grep '<guid'
94 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/rss-log' | grep '<guid'
93 <guid isPermaLink="true">http://*:$HGPORT/a/rev/8580ff50825a</guid> (glob)
95 <guid isPermaLink="true">http://*:$HGPORT/a/rev/8580ff50825a</guid> (glob)
94 $ cat > paths.conf <<EOF
96 $ cat > paths.conf <<EOF
95 > [paths]
97 > [paths]
96 > t/a/=$root/a
98 > t/a/=$root/a
97 > b=$root/b
99 > b=$root/b
98 > coll=$root/*
100 > coll=$root/*
99 > rcoll=$root/**
101 > rcoll=$root/**
100 > star=*
102 > star=*
101 > starstar=**
103 > starstar=**
102 > astar=webdir/a/*
104 > astar=webdir/a/*
103 > EOF
105 > EOF
104 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
106 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
105 > -A access-paths.log -E error-paths-2.log
107 > -A access-paths.log -E error-paths-2.log
106 $ cat hg.pid >> $DAEMON_PIDS
108 $ cat hg.pid >> $DAEMON_PIDS
107
109
108 should succeed, slashy names
110 should succeed, slashy names
109
111
110 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
112 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
111 200 Script output follows
113 200 Script output follows
112
114
113
115
114 /t/a/
116 /t/a/
115 /b/
117 /b/
116 /coll/a/
118 /coll/a/
117 /coll/a/.hg/patches/
119 /coll/a/.hg/patches/
118 /coll/b/
120 /coll/b/
119 /coll/c/
121 /coll/c/
120 /rcoll/a/
122 /rcoll/a/
121 /rcoll/a/.hg/patches/
123 /rcoll/a/.hg/patches/
122 /rcoll/b/
124 /rcoll/b/
123 /rcoll/b/d/
125 /rcoll/b/d/
124 /rcoll/c/
126 /rcoll/c/
125 /star/webdir/a/
127 /star/webdir/a/
126 /star/webdir/a/.hg/patches/
128 /star/webdir/a/.hg/patches/
127 /star/webdir/b/
129 /star/webdir/b/
128 /star/webdir/c/
130 /star/webdir/c/
129 /starstar/webdir/a/
131 /starstar/webdir/a/
130 /starstar/webdir/a/.hg/patches/
132 /starstar/webdir/a/.hg/patches/
131 /starstar/webdir/b/
133 /starstar/webdir/b/
132 /starstar/webdir/b/d/
134 /starstar/webdir/b/d/
133 /starstar/webdir/c/
135 /starstar/webdir/c/
134 /astar/
136 /astar/
135 /astar/.hg/patches/
137 /astar/.hg/patches/
136
138
137 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=paper'
139 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=paper'
138 200 Script output follows
140 200 Script output follows
139
141
140 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
142 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
141 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
143 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
142 <head>
144 <head>
143 <link rel="icon" href="/static/hgicon.png" type="image/png" />
145 <link rel="icon" href="/static/hgicon.png" type="image/png" />
144 <meta name="robots" content="index, nofollow" />
146 <meta name="robots" content="index, nofollow" />
145 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
147 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
146 <script type="text/javascript" src="/static/mercurial.js"></script>
148 <script type="text/javascript" src="/static/mercurial.js"></script>
147
149
148 <title>Mercurial repositories index</title>
150 <title>Mercurial repositories index</title>
149 </head>
151 </head>
150 <body>
152 <body>
151
153
152 <div class="container">
154 <div class="container">
153 <div class="menu">
155 <div class="menu">
154 <a href="http://mercurial.selenic.com/">
156 <a href="http://mercurial.selenic.com/">
155 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
157 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
156 </div>
158 </div>
157 <div class="main">
159 <div class="main">
158 <h2>Mercurial Repositories</h2>
160 <h2>Mercurial Repositories</h2>
159
161
160 <table class="bigtable">
162 <table class="bigtable">
161 <tr>
163 <tr>
162 <th><a href="?sort=name">Name</a></th>
164 <th><a href="?sort=name">Name</a></th>
163 <th><a href="?sort=description">Description</a></th>
165 <th><a href="?sort=description">Description</a></th>
164 <th><a href="?sort=contact">Contact</a></th>
166 <th><a href="?sort=contact">Contact</a></th>
165 <th><a href="?sort=lastchange">Last modified</a></th>
167 <th><a href="?sort=lastchange">Last modified</a></th>
166 <th>&nbsp;</th>
168 <th>&nbsp;</th>
167 </tr>
169 </tr>
168
170
169 <tr class="parity0">
171 <tr class="parity0">
170 <td><a href="/t/a/?style=paper">t/a</a></td>
172 <td><a href="/t/a/?style=paper">t/a</a></td>
171 <td>unknown</td>
173 <td>unknown</td>
172 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
174 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
173 <td class="age">*</td> (glob)
175 <td class="age">*</td> (glob)
174 <td class="indexlinks"></td>
176 <td class="indexlinks"></td>
175 </tr>
177 </tr>
176
178
177 <tr class="parity1">
179 <tr class="parity1">
178 <td><a href="/b/?style=paper">b</a></td>
180 <td><a href="/b/?style=paper">b</a></td>
179 <td>unknown</td>
181 <td>unknown</td>
180 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
182 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
181 <td class="age">*</td> (glob)
183 <td class="age">*</td> (glob)
182 <td class="indexlinks"></td>
184 <td class="indexlinks"></td>
183 </tr>
185 </tr>
184
186
185 <tr class="parity0">
187 <tr class="parity0">
186 <td><a href="/coll/a/?style=paper">coll/a</a></td>
188 <td><a href="/coll/a/?style=paper">coll/a</a></td>
187 <td>unknown</td>
189 <td>unknown</td>
188 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
190 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
189 <td class="age">*</td> (glob)
191 <td class="age">*</td> (glob)
190 <td class="indexlinks"></td>
192 <td class="indexlinks"></td>
191 </tr>
193 </tr>
192
194
193 <tr class="parity1">
195 <tr class="parity1">
194 <td><a href="/coll/a/.hg/patches/?style=paper">coll/a/.hg/patches</a></td>
196 <td><a href="/coll/a/.hg/patches/?style=paper">coll/a/.hg/patches</a></td>
195 <td>unknown</td>
197 <td>unknown</td>
196 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
198 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
197 <td class="age">*</td> (glob)
199 <td class="age">*</td> (glob)
198 <td class="indexlinks"></td>
200 <td class="indexlinks"></td>
199 </tr>
201 </tr>
200
202
201 <tr class="parity0">
203 <tr class="parity0">
202 <td><a href="/coll/b/?style=paper">coll/b</a></td>
204 <td><a href="/coll/b/?style=paper">coll/b</a></td>
203 <td>unknown</td>
205 <td>unknown</td>
204 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
206 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
205 <td class="age">*</td> (glob)
207 <td class="age">*</td> (glob)
206 <td class="indexlinks"></td>
208 <td class="indexlinks"></td>
207 </tr>
209 </tr>
208
210
209 <tr class="parity1">
211 <tr class="parity1">
210 <td><a href="/coll/c/?style=paper">coll/c</a></td>
212 <td><a href="/coll/c/?style=paper">coll/c</a></td>
211 <td>unknown</td>
213 <td>unknown</td>
212 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
214 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
213 <td class="age">*</td> (glob)
215 <td class="age">*</td> (glob)
214 <td class="indexlinks"></td>
216 <td class="indexlinks"></td>
215 </tr>
217 </tr>
216
218
217 <tr class="parity0">
219 <tr class="parity0">
218 <td><a href="/rcoll/a/?style=paper">rcoll/a</a></td>
220 <td><a href="/rcoll/a/?style=paper">rcoll/a</a></td>
219 <td>unknown</td>
221 <td>unknown</td>
220 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
222 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
221 <td class="age">*</td> (glob)
223 <td class="age">*</td> (glob)
222 <td class="indexlinks"></td>
224 <td class="indexlinks"></td>
223 </tr>
225 </tr>
224
226
225 <tr class="parity1">
227 <tr class="parity1">
226 <td><a href="/rcoll/a/.hg/patches/?style=paper">rcoll/a/.hg/patches</a></td>
228 <td><a href="/rcoll/a/.hg/patches/?style=paper">rcoll/a/.hg/patches</a></td>
227 <td>unknown</td>
229 <td>unknown</td>
228 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
230 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
229 <td class="age">*</td> (glob)
231 <td class="age">*</td> (glob)
230 <td class="indexlinks"></td>
232 <td class="indexlinks"></td>
231 </tr>
233 </tr>
232
234
233 <tr class="parity0">
235 <tr class="parity0">
234 <td><a href="/rcoll/b/?style=paper">rcoll/b</a></td>
236 <td><a href="/rcoll/b/?style=paper">rcoll/b</a></td>
235 <td>unknown</td>
237 <td>unknown</td>
236 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
238 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
237 <td class="age">*</td> (glob)
239 <td class="age">*</td> (glob)
238 <td class="indexlinks"></td>
240 <td class="indexlinks"></td>
239 </tr>
241 </tr>
240
242
241 <tr class="parity1">
243 <tr class="parity1">
242 <td><a href="/rcoll/b/d/?style=paper">rcoll/b/d</a></td>
244 <td><a href="/rcoll/b/d/?style=paper">rcoll/b/d</a></td>
243 <td>unknown</td>
245 <td>unknown</td>
244 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
246 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
245 <td class="age">*</td> (glob)
247 <td class="age">*</td> (glob)
246 <td class="indexlinks"></td>
248 <td class="indexlinks"></td>
247 </tr>
249 </tr>
248
250
249 <tr class="parity0">
251 <tr class="parity0">
250 <td><a href="/rcoll/c/?style=paper">rcoll/c</a></td>
252 <td><a href="/rcoll/c/?style=paper">rcoll/c</a></td>
251 <td>unknown</td>
253 <td>unknown</td>
252 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
254 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
253 <td class="age">*</td> (glob)
255 <td class="age">*</td> (glob)
254 <td class="indexlinks"></td>
256 <td class="indexlinks"></td>
255 </tr>
257 </tr>
256
258
257 <tr class="parity1">
259 <tr class="parity1">
258 <td><a href="/star/webdir/a/?style=paper">star/webdir/a</a></td>
260 <td><a href="/star/webdir/a/?style=paper">star/webdir/a</a></td>
259 <td>unknown</td>
261 <td>unknown</td>
260 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
262 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
261 <td class="age">*</td> (glob)
263 <td class="age">*</td> (glob)
262 <td class="indexlinks"></td>
264 <td class="indexlinks"></td>
263 </tr>
265 </tr>
264
266
265 <tr class="parity0">
267 <tr class="parity0">
266 <td><a href="/star/webdir/a/.hg/patches/?style=paper">star/webdir/a/.hg/patches</a></td>
268 <td><a href="/star/webdir/a/.hg/patches/?style=paper">star/webdir/a/.hg/patches</a></td>
267 <td>unknown</td>
269 <td>unknown</td>
268 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
270 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
269 <td class="age">*</td> (glob)
271 <td class="age">*</td> (glob)
270 <td class="indexlinks"></td>
272 <td class="indexlinks"></td>
271 </tr>
273 </tr>
272
274
273 <tr class="parity1">
275 <tr class="parity1">
274 <td><a href="/star/webdir/b/?style=paper">star/webdir/b</a></td>
276 <td><a href="/star/webdir/b/?style=paper">star/webdir/b</a></td>
275 <td>unknown</td>
277 <td>unknown</td>
276 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
278 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
277 <td class="age">*</td> (glob)
279 <td class="age">*</td> (glob)
278 <td class="indexlinks"></td>
280 <td class="indexlinks"></td>
279 </tr>
281 </tr>
280
282
281 <tr class="parity0">
283 <tr class="parity0">
282 <td><a href="/star/webdir/c/?style=paper">star/webdir/c</a></td>
284 <td><a href="/star/webdir/c/?style=paper">star/webdir/c</a></td>
283 <td>unknown</td>
285 <td>unknown</td>
284 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
286 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
285 <td class="age">*</td> (glob)
287 <td class="age">*</td> (glob)
286 <td class="indexlinks"></td>
288 <td class="indexlinks"></td>
287 </tr>
289 </tr>
288
290
289 <tr class="parity1">
291 <tr class="parity1">
290 <td><a href="/starstar/webdir/a/?style=paper">starstar/webdir/a</a></td>
292 <td><a href="/starstar/webdir/a/?style=paper">starstar/webdir/a</a></td>
291 <td>unknown</td>
293 <td>unknown</td>
292 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
294 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
293 <td class="age">*</td> (glob)
295 <td class="age">*</td> (glob)
294 <td class="indexlinks"></td>
296 <td class="indexlinks"></td>
295 </tr>
297 </tr>
296
298
297 <tr class="parity0">
299 <tr class="parity0">
298 <td><a href="/starstar/webdir/a/.hg/patches/?style=paper">starstar/webdir/a/.hg/patches</a></td>
300 <td><a href="/starstar/webdir/a/.hg/patches/?style=paper">starstar/webdir/a/.hg/patches</a></td>
299 <td>unknown</td>
301 <td>unknown</td>
300 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
302 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
301 <td class="age">*</td> (glob)
303 <td class="age">*</td> (glob)
302 <td class="indexlinks"></td>
304 <td class="indexlinks"></td>
303 </tr>
305 </tr>
304
306
305 <tr class="parity1">
307 <tr class="parity1">
306 <td><a href="/starstar/webdir/b/?style=paper">starstar/webdir/b</a></td>
308 <td><a href="/starstar/webdir/b/?style=paper">starstar/webdir/b</a></td>
307 <td>unknown</td>
309 <td>unknown</td>
308 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
310 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
309 <td class="age">*</td> (glob)
311 <td class="age">*</td> (glob)
310 <td class="indexlinks"></td>
312 <td class="indexlinks"></td>
311 </tr>
313 </tr>
312
314
313 <tr class="parity0">
315 <tr class="parity0">
314 <td><a href="/starstar/webdir/b/d/?style=paper">starstar/webdir/b/d</a></td>
316 <td><a href="/starstar/webdir/b/d/?style=paper">starstar/webdir/b/d</a></td>
315 <td>unknown</td>
317 <td>unknown</td>
316 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
318 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
317 <td class="age">*</td> (glob)
319 <td class="age">*</td> (glob)
318 <td class="indexlinks"></td>
320 <td class="indexlinks"></td>
319 </tr>
321 </tr>
320
322
321 <tr class="parity1">
323 <tr class="parity1">
322 <td><a href="/starstar/webdir/c/?style=paper">starstar/webdir/c</a></td>
324 <td><a href="/starstar/webdir/c/?style=paper">starstar/webdir/c</a></td>
323 <td>unknown</td>
325 <td>unknown</td>
324 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
326 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
325 <td class="age">*</td> (glob)
327 <td class="age">*</td> (glob)
326 <td class="indexlinks"></td>
328 <td class="indexlinks"></td>
327 </tr>
329 </tr>
328
330
329 <tr class="parity0">
331 <tr class="parity0">
330 <td><a href="/astar/?style=paper">astar</a></td>
332 <td><a href="/astar/?style=paper">astar</a></td>
331 <td>unknown</td>
333 <td>unknown</td>
332 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
334 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
333 <td class="age">*</td> (glob)
335 <td class="age">*</td> (glob)
334 <td class="indexlinks"></td>
336 <td class="indexlinks"></td>
335 </tr>
337 </tr>
336
338
337 <tr class="parity1">
339 <tr class="parity1">
338 <td><a href="/astar/.hg/patches/?style=paper">astar/.hg/patches</a></td>
340 <td><a href="/astar/.hg/patches/?style=paper">astar/.hg/patches</a></td>
339 <td>unknown</td>
341 <td>unknown</td>
340 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
342 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
341 <td class="age">*</td> (glob)
343 <td class="age">*</td> (glob)
342 <td class="indexlinks"></td>
344 <td class="indexlinks"></td>
343 </tr>
345 </tr>
344
346
345 </table>
347 </table>
346 </div>
348 </div>
347 </div>
349 </div>
348 <script type="text/javascript">process_dates()</script>
350 <script type="text/javascript">process_dates()</script>
349
351
350
352
351 </body>
353 </body>
352 </html>
354 </html>
353
355
354 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t?style=raw'
356 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t?style=raw'
355 200 Script output follows
357 200 Script output follows
356
358
357
359
358 /t/a/
360 /t/a/
359
361
360 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
362 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
361 200 Script output follows
363 200 Script output follows
362
364
363
365
364 /t/a/
366 /t/a/
365
367
366 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=paper'
368 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=paper'
367 200 Script output follows
369 200 Script output follows
368
370
369 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
371 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
370 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
372 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
371 <head>
373 <head>
372 <link rel="icon" href="/static/hgicon.png" type="image/png" />
374 <link rel="icon" href="/static/hgicon.png" type="image/png" />
373 <meta name="robots" content="index, nofollow" />
375 <meta name="robots" content="index, nofollow" />
374 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
376 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
375 <script type="text/javascript" src="/static/mercurial.js"></script>
377 <script type="text/javascript" src="/static/mercurial.js"></script>
376
378
377 <title>Mercurial repositories index</title>
379 <title>Mercurial repositories index</title>
378 </head>
380 </head>
379 <body>
381 <body>
380
382
381 <div class="container">
383 <div class="container">
382 <div class="menu">
384 <div class="menu">
383 <a href="http://mercurial.selenic.com/">
385 <a href="http://mercurial.selenic.com/">
384 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
386 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
385 </div>
387 </div>
386 <div class="main">
388 <div class="main">
387 <h2>Mercurial Repositories</h2>
389 <h2>Mercurial Repositories</h2>
388
390
389 <table class="bigtable">
391 <table class="bigtable">
390 <tr>
392 <tr>
391 <th><a href="?sort=name">Name</a></th>
393 <th><a href="?sort=name">Name</a></th>
392 <th><a href="?sort=description">Description</a></th>
394 <th><a href="?sort=description">Description</a></th>
393 <th><a href="?sort=contact">Contact</a></th>
395 <th><a href="?sort=contact">Contact</a></th>
394 <th><a href="?sort=lastchange">Last modified</a></th>
396 <th><a href="?sort=lastchange">Last modified</a></th>
395 <th>&nbsp;</th>
397 <th>&nbsp;</th>
396 </tr>
398 </tr>
397
399
398 <tr class="parity0">
400 <tr class="parity0">
399 <td><a href="/t/a/?style=paper">a</a></td>
401 <td><a href="/t/a/?style=paper">a</a></td>
400 <td>unknown</td>
402 <td>unknown</td>
401 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
403 <td>&#70;&#111;&#111;&#32;&#66;&#97;&#114;&#32;&#60;&#102;&#111;&#111;&#46;&#98;&#97;&#114;&#64;&#101;&#120;&#97;&#109;&#112;&#108;&#101;&#46;&#99;&#111;&#109;&#62;</td>
402 <td class="age">*</td> (glob)
404 <td class="age">*</td> (glob)
403 <td class="indexlinks"></td>
405 <td class="indexlinks"></td>
404 </tr>
406 </tr>
405
407
406 </table>
408 </table>
407 </div>
409 </div>
408 </div>
410 </div>
409 <script type="text/javascript">process_dates()</script>
411 <script type="text/javascript">process_dates()</script>
410
412
411
413
412 </body>
414 </body>
413 </html>
415 </html>
414
416
415 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a?style=atom'
417 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a?style=atom'
416 200 Script output follows
418 200 Script output follows
417
419
418 <?xml version="1.0" encoding="ascii"?>
420 <?xml version="1.0" encoding="ascii"?>
419 <feed xmlns="http://www.w3.org/2005/Atom">
421 <feed xmlns="http://www.w3.org/2005/Atom">
420 <!-- Changelog -->
422 <!-- Changelog -->
421 <id>http://*:$HGPORT1/t/a/</id> (glob)
423 <id>http://*:$HGPORT1/t/a/</id> (glob)
422 <link rel="self" href="http://*:$HGPORT1/t/a/atom-log"/> (glob)
424 <link rel="self" href="http://*:$HGPORT1/t/a/atom-log"/> (glob)
423 <link rel="alternate" href="http://*:$HGPORT1/t/a/"/> (glob)
425 <link rel="alternate" href="http://*:$HGPORT1/t/a/"/> (glob)
424 <title>t/a Changelog</title>
426 <title>t/a Changelog</title>
425 <updated>1970-01-01T00:00:01+00:00</updated>
427 <updated>1970-01-01T00:00:01+00:00</updated>
426
428
427 <entry>
429 <entry>
428 <title>a</title>
430 <title>a</title>
429 <id>http://*:$HGPORT1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> (glob)
431 <id>http://*:$HGPORT1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> (glob)
430 <link href="http://*:$HGPORT1/t/a/rev/8580ff50825a"/> (glob)
432 <link href="http://*:$HGPORT1/t/a/rev/8580ff50825a"/> (glob)
431 <author>
433 <author>
432 <name>test</name>
434 <name>test</name>
433 <email>&#116;&#101;&#115;&#116;</email>
435 <email>&#116;&#101;&#115;&#116;</email>
434 </author>
436 </author>
435 <updated>1970-01-01T00:00:01+00:00</updated>
437 <updated>1970-01-01T00:00:01+00:00</updated>
436 <published>1970-01-01T00:00:01+00:00</published>
438 <published>1970-01-01T00:00:01+00:00</published>
437 <content type="xhtml">
439 <content type="xhtml">
438 <div xmlns="http://www.w3.org/1999/xhtml">
440 <div xmlns="http://www.w3.org/1999/xhtml">
439 <pre xml:space="preserve">a</pre>
441 <pre xml:space="preserve">a</pre>
440 </div>
442 </div>
441 </content>
443 </content>
442 </entry>
444 </entry>
443
445
444 </feed>
446 </feed>
445 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/?style=atom'
447 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/?style=atom'
446 200 Script output follows
448 200 Script output follows
447
449
448 <?xml version="1.0" encoding="ascii"?>
450 <?xml version="1.0" encoding="ascii"?>
449 <feed xmlns="http://www.w3.org/2005/Atom">
451 <feed xmlns="http://www.w3.org/2005/Atom">
450 <!-- Changelog -->
452 <!-- Changelog -->
451 <id>http://*:$HGPORT1/t/a/</id> (glob)
453 <id>http://*:$HGPORT1/t/a/</id> (glob)
452 <link rel="self" href="http://*:$HGPORT1/t/a/atom-log"/> (glob)
454 <link rel="self" href="http://*:$HGPORT1/t/a/atom-log"/> (glob)
453 <link rel="alternate" href="http://*:$HGPORT1/t/a/"/> (glob)
455 <link rel="alternate" href="http://*:$HGPORT1/t/a/"/> (glob)
454 <title>t/a Changelog</title>
456 <title>t/a Changelog</title>
455 <updated>1970-01-01T00:00:01+00:00</updated>
457 <updated>1970-01-01T00:00:01+00:00</updated>
456
458
457 <entry>
459 <entry>
458 <title>a</title>
460 <title>a</title>
459 <id>http://*:$HGPORT1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> (glob)
461 <id>http://*:$HGPORT1/t/a/#changeset-8580ff50825a50c8f716709acdf8de0deddcd6ab</id> (glob)
460 <link href="http://*:$HGPORT1/t/a/rev/8580ff50825a"/> (glob)
462 <link href="http://*:$HGPORT1/t/a/rev/8580ff50825a"/> (glob)
461 <author>
463 <author>
462 <name>test</name>
464 <name>test</name>
463 <email>&#116;&#101;&#115;&#116;</email>
465 <email>&#116;&#101;&#115;&#116;</email>
464 </author>
466 </author>
465 <updated>1970-01-01T00:00:01+00:00</updated>
467 <updated>1970-01-01T00:00:01+00:00</updated>
466 <published>1970-01-01T00:00:01+00:00</published>
468 <published>1970-01-01T00:00:01+00:00</published>
467 <content type="xhtml">
469 <content type="xhtml">
468 <div xmlns="http://www.w3.org/1999/xhtml">
470 <div xmlns="http://www.w3.org/1999/xhtml">
469 <pre xml:space="preserve">a</pre>
471 <pre xml:space="preserve">a</pre>
470 </div>
472 </div>
471 </content>
473 </content>
472 </entry>
474 </entry>
473
475
474 </feed>
476 </feed>
475 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/file/tip/a?style=raw'
477 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/file/tip/a?style=raw'
476 200 Script output follows
478 200 Script output follows
477
479
478 a
480 a
479
481
480 Test [paths] '*' extension
482 Test [paths] '*' extension
481
483
482 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw'
484 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw'
483 200 Script output follows
485 200 Script output follows
484
486
485
487
486 /coll/a/
488 /coll/a/
487 /coll/a/.hg/patches/
489 /coll/a/.hg/patches/
488 /coll/b/
490 /coll/b/
489 /coll/c/
491 /coll/c/
490
492
491 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw'
493 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw'
492 200 Script output follows
494 200 Script output follows
493
495
494 a
496 a
495
497
496 Test [paths] '**' extension
498 Test [paths] '**' extension
497
499
498 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw'
500 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw'
499 200 Script output follows
501 200 Script output follows
500
502
501
503
502 /rcoll/a/
504 /rcoll/a/
503 /rcoll/a/.hg/patches/
505 /rcoll/a/.hg/patches/
504 /rcoll/b/
506 /rcoll/b/
505 /rcoll/b/d/
507 /rcoll/b/d/
506 /rcoll/c/
508 /rcoll/c/
507
509
508 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw'
510 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw'
509 200 Script output follows
511 200 Script output follows
510
512
511 d
513 d
512
514
513 Test [paths] '*' in a repo root
515 Test [paths] '*' in a repo root
514
516
515 $ hg id http://localhost:$HGPORT1/astar
517 $ hg id http://localhost:$HGPORT1/astar
516 8580ff50825a
518 8580ff50825a
517
519
518 $ "$TESTDIR/killdaemons.py"
520 $ "$TESTDIR/killdaemons.py"
519 $ cat > paths.conf <<EOF
521 $ cat > paths.conf <<EOF
520 > [paths]
522 > [paths]
521 > t/a = $root/a
523 > t/a = $root/a
522 > t/b = $root/b
524 > t/b = $root/b
523 > c = $root/c
525 > c = $root/c
524 > [web]
526 > [web]
525 > descend=false
527 > descend=false
526 > EOF
528 > EOF
527 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
529 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
528 > -A access-paths.log -E error-paths-3.log
530 > -A access-paths.log -E error-paths-3.log
529 $ cat hg.pid >> $DAEMON_PIDS
531 $ cat hg.pid >> $DAEMON_PIDS
530
532
531 test descend = False
533 test descend = False
532
534
533 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
535 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
534 200 Script output follows
536 200 Script output follows
535
537
536
538
537 /c/
539 /c/
538
540
539 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
541 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw'
540 200 Script output follows
542 200 Script output follows
541
543
542
544
543 /t/a/
545 /t/a/
544 /t/b/
546 /t/b/
545
547
546 $ "$TESTDIR/killdaemons.py"
548 $ "$TESTDIR/killdaemons.py"
547 $ cat > paths.conf <<EOF
549 $ cat > paths.conf <<EOF
548 > [paths]
550 > [paths]
549 > nostore = $root/nostore
551 > nostore = $root/nostore
550 > inexistent = $root/inexistent
552 > inexistent = $root/inexistent
551 > EOF
553 > EOF
552 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
554 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \
553 > -A access-paths.log -E error-paths-4.log
555 > -A access-paths.log -E error-paths-4.log
554 $ cat hg.pid >> $DAEMON_PIDS
556 $ cat hg.pid >> $DAEMON_PIDS
555
557
556 test inexistent and inaccessible repo should be ignored silently
558 test inexistent and inaccessible repo should be ignored silently
557
559
558 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/'
560 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/'
559 200 Script output follows
561 200 Script output follows
560
562
561 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
563 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
562 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
564 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
563 <head>
565 <head>
564 <link rel="icon" href="/static/hgicon.png" type="image/png" />
566 <link rel="icon" href="/static/hgicon.png" type="image/png" />
565 <meta name="robots" content="index, nofollow" />
567 <meta name="robots" content="index, nofollow" />
566 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
568 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
567 <script type="text/javascript" src="/static/mercurial.js"></script>
569 <script type="text/javascript" src="/static/mercurial.js"></script>
568
570
569 <title>Mercurial repositories index</title>
571 <title>Mercurial repositories index</title>
570 </head>
572 </head>
571 <body>
573 <body>
572
574
573 <div class="container">
575 <div class="container">
574 <div class="menu">
576 <div class="menu">
575 <a href="http://mercurial.selenic.com/">
577 <a href="http://mercurial.selenic.com/">
576 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
578 <img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a>
577 </div>
579 </div>
578 <div class="main">
580 <div class="main">
579 <h2>Mercurial Repositories</h2>
581 <h2>Mercurial Repositories</h2>
580
582
581 <table class="bigtable">
583 <table class="bigtable">
582 <tr>
584 <tr>
583 <th><a href="?sort=name">Name</a></th>
585 <th><a href="?sort=name">Name</a></th>
584 <th><a href="?sort=description">Description</a></th>
586 <th><a href="?sort=description">Description</a></th>
585 <th><a href="?sort=contact">Contact</a></th>
587 <th><a href="?sort=contact">Contact</a></th>
586 <th><a href="?sort=lastchange">Last modified</a></th>
588 <th><a href="?sort=lastchange">Last modified</a></th>
587 <th>&nbsp;</th>
589 <th>&nbsp;</th>
588 </tr>
590 </tr>
589
591
590 </table>
592 </table>
591 </div>
593 </div>
592 </div>
594 </div>
593 <script type="text/javascript">process_dates()</script>
595 <script type="text/javascript">process_dates()</script>
594
596
595
597
596 </body>
598 </body>
597 </html>
599 </html>
598
600
599 $ cat > collections.conf <<EOF
601 $ cat > collections.conf <<EOF
600 > [collections]
602 > [collections]
601 > $root=$root
603 > $root=$root
602 > EOF
604 > EOF
603 $ hg serve --config web.baseurl=http://hg.example.com:8080/ -p $HGPORT2 -d \
605 $ hg serve --config web.baseurl=http://hg.example.com:8080/ -p $HGPORT2 -d \
604 > --pid-file=hg.pid --webdir-conf collections.conf \
606 > --pid-file=hg.pid --webdir-conf collections.conf \
605 > -A access-collections.log -E error-collections.log
607 > -A access-collections.log -E error-collections.log
606 $ cat hg.pid >> $DAEMON_PIDS
608 $ cat hg.pid >> $DAEMON_PIDS
607
609
608 collections: should succeed
610 collections: should succeed
609
611
610 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw'
612 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw'
611 200 Script output follows
613 200 Script output follows
612
614
613
615
614 /a/
616 /a/
615 /a/.hg/patches/
617 /a/.hg/patches/
616 /b/
618 /b/
617 /c/
619 /c/
618
620
619 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw'
621 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw'
620 200 Script output follows
622 200 Script output follows
621
623
622 a
624 a
623 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw'
625 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw'
624 200 Script output follows
626 200 Script output follows
625
627
626 b
628 b
627 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/c/file/tip/c?style=raw'
629 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/c/file/tip/c?style=raw'
628 200 Script output follows
630 200 Script output follows
629
631
630 c
632 c
631
633
632 atom-log with basedir /
634 atom-log with basedir /
633
635
634 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link'
636 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link'
635 <link rel="self" href="http://hg.example.com:8080/a/atom-log"/>
637 <link rel="self" href="http://hg.example.com:8080/a/atom-log"/>
636 <link rel="alternate" href="http://hg.example.com:8080/a/"/>
638 <link rel="alternate" href="http://hg.example.com:8080/a/"/>
637 <link href="http://hg.example.com:8080/a/rev/8580ff50825a"/>
639 <link href="http://hg.example.com:8080/a/rev/8580ff50825a"/>
638
640
639 rss-log with basedir /
641 rss-log with basedir /
640
642
641 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid'
643 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid'
642 <guid isPermaLink="true">http://hg.example.com:8080/a/rev/8580ff50825a</guid>
644 <guid isPermaLink="true">http://hg.example.com:8080/a/rev/8580ff50825a</guid>
643 $ "$TESTDIR/killdaemons.py"
645 $ "$TESTDIR/killdaemons.py"
644 $ hg serve --config web.baseurl=http://hg.example.com:8080/foo/ -p $HGPORT2 -d \
646 $ hg serve --config web.baseurl=http://hg.example.com:8080/foo/ -p $HGPORT2 -d \
645 > --pid-file=hg.pid --webdir-conf collections.conf \
647 > --pid-file=hg.pid --webdir-conf collections.conf \
646 > -A access-collections-2.log -E error-collections-2.log
648 > -A access-collections-2.log -E error-collections-2.log
647 $ cat hg.pid >> $DAEMON_PIDS
649 $ cat hg.pid >> $DAEMON_PIDS
648
650
649 atom-log with basedir /foo/
651 atom-log with basedir /foo/
650
652
651 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link'
653 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link'
652 <link rel="self" href="http://hg.example.com:8080/foo/a/atom-log"/>
654 <link rel="self" href="http://hg.example.com:8080/foo/a/atom-log"/>
653 <link rel="alternate" href="http://hg.example.com:8080/foo/a/"/>
655 <link rel="alternate" href="http://hg.example.com:8080/foo/a/"/>
654 <link href="http://hg.example.com:8080/foo/a/rev/8580ff50825a"/>
656 <link href="http://hg.example.com:8080/foo/a/rev/8580ff50825a"/>
655
657
656 rss-log with basedir /foo/
658 rss-log with basedir /foo/
657
659
658 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid'
660 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid'
659 <guid isPermaLink="true">http://hg.example.com:8080/foo/a/rev/8580ff50825a</guid>
661 <guid isPermaLink="true">http://hg.example.com:8080/foo/a/rev/8580ff50825a</guid>
660
662
661 paths errors 1
663 paths errors 1
662
664
663 $ cat error-paths-1.log
665 $ cat error-paths-1.log
664
666
665 paths errors 2
667 paths errors 2
666
668
667 $ cat error-paths-2.log
669 $ cat error-paths-2.log
668
670
669 paths errors 3
671 paths errors 3
670
672
671 $ cat error-paths-3.log
673 $ cat error-paths-3.log
672
674
673 collections errors
675 collections errors
674
676
675 $ cat error-collections.log
677 $ cat error-collections.log
676
678
677 collections errors 2
679 collections errors 2
678
680
679 $ cat error-collections-2.log
681 $ cat error-collections-2.log
@@ -1,76 +1,76 b''
1 Tests whether or not hgwebdir properly handles various symlink topologies.
1 Tests whether or not hgwebdir properly handles various symlink topologies.
2
2
3 $ "$TESTDIR/hghave" symlink || exit 80
3 $ "$TESTDIR/hghave" serve symlink || exit 80
4 $ hg init a
4 $ hg init a
5 $ echo a > a/a
5 $ echo a > a/a
6 $ hg --cwd a ci -Ama -d'1 0'
6 $ hg --cwd a ci -Ama -d'1 0'
7 adding a
7 adding a
8 $ mkdir webdir
8 $ mkdir webdir
9 $ cd webdir
9 $ cd webdir
10 $ hg init b
10 $ hg init b
11 $ echo b > b/b
11 $ echo b > b/b
12 $ hg --cwd b ci -Amb -d'2 0'
12 $ hg --cwd b ci -Amb -d'2 0'
13 adding b
13 adding b
14 $ hg init c
14 $ hg init c
15 $ echo c > c/c
15 $ echo c > c/c
16 $ hg --cwd c ci -Amc -d'3 0'
16 $ hg --cwd c ci -Amc -d'3 0'
17 adding c
17 adding c
18 $ ln -s ../a al
18 $ ln -s ../a al
19 $ ln -s ../webdir circle
19 $ ln -s ../webdir circle
20 $ root=`pwd`
20 $ root=`pwd`
21 $ cd ..
21 $ cd ..
22 $ cat > collections.conf <<EOF
22 $ cat > collections.conf <<EOF
23 > [collections]
23 > [collections]
24 > $root=$root
24 > $root=$root
25 > EOF
25 > EOF
26 $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \
26 $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \
27 > -A access-collections.log -E error-collections.log
27 > -A access-collections.log -E error-collections.log
28 $ cat hg.pid >> $DAEMON_PIDS
28 $ cat hg.pid >> $DAEMON_PIDS
29
29
30 should succeed
30 should succeed
31
31
32 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw'
32 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw'
33 200 Script output follows
33 200 Script output follows
34
34
35
35
36 /al/
36 /al/
37 /b/
37 /b/
38 /c/
38 /c/
39
39
40 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/al/file/tip/a?style=raw'
40 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/al/file/tip/a?style=raw'
41 200 Script output follows
41 200 Script output follows
42
42
43 a
43 a
44 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw'
44 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw'
45 200 Script output follows
45 200 Script output follows
46
46
47 b
47 b
48 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw'
48 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw'
49 200 Script output follows
49 200 Script output follows
50
50
51 c
51 c
52
52
53 should fail
53 should fail
54
54
55 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/al/file/tip/a?style=raw'
55 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/al/file/tip/a?style=raw'
56 404 Not Found
56 404 Not Found
57
57
58
58
59 error: repository circle/al/file/tip/a not found
59 error: repository circle/al/file/tip/a not found
60 [1]
60 [1]
61 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/b/file/tip/a?style=raw'
61 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/b/file/tip/a?style=raw'
62 404 Not Found
62 404 Not Found
63
63
64
64
65 error: repository circle/b/file/tip/a not found
65 error: repository circle/b/file/tip/a not found
66 [1]
66 [1]
67 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/c/file/tip/a?style=raw'
67 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/c/file/tip/a?style=raw'
68 404 Not Found
68 404 Not Found
69
69
70
70
71 error: repository circle/c/file/tip/a not found
71 error: repository circle/c/file/tip/a not found
72 [1]
72 [1]
73
73
74 collections errors
74 collections errors
75
75
76 $ cat error-collections.log
76 $ cat error-collections.log
@@ -1,605 +1,605 b''
1
1
2 $ "$TESTDIR/hghave" pygments || exit 80
2 $ "$TESTDIR/hghave" pygments serve || exit 80
3 $ cat <<EOF >> $HGRCPATH
3 $ cat <<EOF >> $HGRCPATH
4 > [extensions]
4 > [extensions]
5 > highlight =
5 > highlight =
6 > [web]
6 > [web]
7 > pygments_style = friendly
7 > pygments_style = friendly
8 > EOF
8 > EOF
9 $ hg init test
9 $ hg init test
10 $ cd test
10 $ cd test
11
11
12 create random Python file to exercise Pygments
12 create random Python file to exercise Pygments
13
13
14 $ cat <<EOF > primes.py
14 $ cat <<EOF > primes.py
15 > #!/usr/bin/env python
15 > #!/usr/bin/env python
16 >
16 >
17 > """Fun with generators. Corresponding Haskell implementation:
17 > """Fun with generators. Corresponding Haskell implementation:
18 >
18 >
19 > primes = 2 : sieve [3, 5..]
19 > primes = 2 : sieve [3, 5..]
20 > where sieve (p:ns) = p : sieve [n | n <- ns, mod n p /= 0]
20 > where sieve (p:ns) = p : sieve [n | n <- ns, mod n p /= 0]
21 > """
21 > """
22 >
22 >
23 > from itertools import dropwhile, ifilter, islice, count, chain
23 > from itertools import dropwhile, ifilter, islice, count, chain
24 >
24 >
25 > def primes():
25 > def primes():
26 > """Generate all primes."""
26 > """Generate all primes."""
27 > def sieve(ns):
27 > def sieve(ns):
28 > p = ns.next()
28 > p = ns.next()
29 > # It is important to yield *here* in order to stop the
29 > # It is important to yield *here* in order to stop the
30 > # infinite recursion.
30 > # infinite recursion.
31 > yield p
31 > yield p
32 > ns = ifilter(lambda n: n % p != 0, ns)
32 > ns = ifilter(lambda n: n % p != 0, ns)
33 > for n in sieve(ns):
33 > for n in sieve(ns):
34 > yield n
34 > yield n
35 >
35 >
36 > odds = ifilter(lambda i: i % 2 == 1, count())
36 > odds = ifilter(lambda i: i % 2 == 1, count())
37 > return chain([2], sieve(dropwhile(lambda n: n < 3, odds)))
37 > return chain([2], sieve(dropwhile(lambda n: n < 3, odds)))
38 >
38 >
39 > if __name__ == "__main__":
39 > if __name__ == "__main__":
40 > import sys
40 > import sys
41 > try:
41 > try:
42 > n = int(sys.argv[1])
42 > n = int(sys.argv[1])
43 > except (ValueError, IndexError):
43 > except (ValueError, IndexError):
44 > n = 10
44 > n = 10
45 > p = primes()
45 > p = primes()
46 > print "The first %d primes: %s" % (n, list(islice(p, n)))
46 > print "The first %d primes: %s" % (n, list(islice(p, n)))
47 > EOF
47 > EOF
48 $ hg ci -Ama
48 $ hg ci -Ama
49 adding primes.py
49 adding primes.py
50
50
51 hg serve
51 hg serve
52
52
53 $ hg serve -p $HGPORT -d -n test --pid-file=hg.pid -A access.log -E errors.log
53 $ hg serve -p $HGPORT -d -n test --pid-file=hg.pid -A access.log -E errors.log
54 $ cat hg.pid >> $DAEMON_PIDS
54 $ cat hg.pid >> $DAEMON_PIDS
55
55
56 hgweb filerevision, html
56 hgweb filerevision, html
57
57
58 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/primes.py') \
58 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/primes.py') \
59 > | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mf\"/class=\"mi\"/g"
59 > | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mf\"/class=\"mi\"/g"
60 200 Script output follows
60 200 Script output follows
61
61
62 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
62 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
63 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
63 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
64 <head>
64 <head>
65 <link rel="icon" href="/static/hgicon.png" type="image/png" />
65 <link rel="icon" href="/static/hgicon.png" type="image/png" />
66 <meta name="robots" content="index, nofollow" />
66 <meta name="robots" content="index, nofollow" />
67 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
67 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
68 <script type="text/javascript" src="/static/mercurial.js"></script>
68 <script type="text/javascript" src="/static/mercurial.js"></script>
69
69
70 <link rel="stylesheet" href="/highlightcss" type="text/css" />
70 <link rel="stylesheet" href="/highlightcss" type="text/css" />
71 <title>test: 853dcd4de2a6 primes.py</title>
71 <title>test: 853dcd4de2a6 primes.py</title>
72 </head>
72 </head>
73 <body>
73 <body>
74
74
75 <div class="container">
75 <div class="container">
76 <div class="menu">
76 <div class="menu">
77 <div class="logo">
77 <div class="logo">
78 <a href="http://mercurial.selenic.com/">
78 <a href="http://mercurial.selenic.com/">
79 <img src="/static/hglogo.png" alt="mercurial" /></a>
79 <img src="/static/hglogo.png" alt="mercurial" /></a>
80 </div>
80 </div>
81 <ul>
81 <ul>
82 <li><a href="/shortlog/853dcd4de2a6">log</a></li>
82 <li><a href="/shortlog/853dcd4de2a6">log</a></li>
83 <li><a href="/graph/853dcd4de2a6">graph</a></li>
83 <li><a href="/graph/853dcd4de2a6">graph</a></li>
84 <li><a href="/tags">tags</a></li>
84 <li><a href="/tags">tags</a></li>
85 <li><a href="/branches">branches</a></li>
85 <li><a href="/branches">branches</a></li>
86 </ul>
86 </ul>
87 <ul>
87 <ul>
88 <li><a href="/rev/853dcd4de2a6">changeset</a></li>
88 <li><a href="/rev/853dcd4de2a6">changeset</a></li>
89 <li><a href="/file/853dcd4de2a6/">browse</a></li>
89 <li><a href="/file/853dcd4de2a6/">browse</a></li>
90 </ul>
90 </ul>
91 <ul>
91 <ul>
92 <li class="active">file</li>
92 <li class="active">file</li>
93 <li><a href="/file/tip/primes.py">latest</a></li>
93 <li><a href="/file/tip/primes.py">latest</a></li>
94 <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
94 <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
95 <li><a href="/annotate/853dcd4de2a6/primes.py">annotate</a></li>
95 <li><a href="/annotate/853dcd4de2a6/primes.py">annotate</a></li>
96 <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
96 <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
97 <li><a href="/raw-file/853dcd4de2a6/primes.py">raw</a></li>
97 <li><a href="/raw-file/853dcd4de2a6/primes.py">raw</a></li>
98 </ul>
98 </ul>
99 <ul>
99 <ul>
100 <li><a href="/help">help</a></li>
100 <li><a href="/help">help</a></li>
101 </ul>
101 </ul>
102 </div>
102 </div>
103
103
104 <div class="main">
104 <div class="main">
105 <h2><a href="/">test</a></h2>
105 <h2><a href="/">test</a></h2>
106 <h3>view primes.py @ 0:853dcd4de2a6</h3>
106 <h3>view primes.py @ 0:853dcd4de2a6</h3>
107
107
108 <form class="search" action="/log">
108 <form class="search" action="/log">
109
109
110 <p><input name="rev" id="search1" type="text" size="30" /></p>
110 <p><input name="rev" id="search1" type="text" size="30" /></p>
111 <div id="hint">find changesets by author, revision,
111 <div id="hint">find changesets by author, revision,
112 files, or words in the commit message</div>
112 files, or words in the commit message</div>
113 </form>
113 </form>
114
114
115 <div class="description">a</div>
115 <div class="description">a</div>
116
116
117 <table id="changesetEntry">
117 <table id="changesetEntry">
118 <tr>
118 <tr>
119 <th class="author">author</th>
119 <th class="author">author</th>
120 <td class="author">&#116;&#101;&#115;&#116;</td>
120 <td class="author">&#116;&#101;&#115;&#116;</td>
121 </tr>
121 </tr>
122 <tr>
122 <tr>
123 <th class="date">date</th>
123 <th class="date">date</th>
124 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
124 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
125 </tr>
125 </tr>
126 <tr>
126 <tr>
127 <th class="author">parents</th>
127 <th class="author">parents</th>
128 <td class="author"></td>
128 <td class="author"></td>
129 </tr>
129 </tr>
130 <tr>
130 <tr>
131 <th class="author">children</th>
131 <th class="author">children</th>
132 <td class="author"></td>
132 <td class="author"></td>
133 </tr>
133 </tr>
134
134
135 </table>
135 </table>
136
136
137 <div class="overflow">
137 <div class="overflow">
138 <div class="sourcefirst"> line source</div>
138 <div class="sourcefirst"> line source</div>
139
139
140 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> <span class="c">#!/usr/bin/env python</span></div>
140 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> <span class="c">#!/usr/bin/env python</span></div>
141 <div class="parity1 source"><a href="#l2" id="l2"> 2</a> </div>
141 <div class="parity1 source"><a href="#l2" id="l2"> 2</a> </div>
142 <div class="parity0 source"><a href="#l3" id="l3"> 3</a> <span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></div>
142 <div class="parity0 source"><a href="#l3" id="l3"> 3</a> <span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></div>
143 <div class="parity1 source"><a href="#l4" id="l4"> 4</a> </div>
143 <div class="parity1 source"><a href="#l4" id="l4"> 4</a> </div>
144 <div class="parity0 source"><a href="#l5" id="l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></div>
144 <div class="parity0 source"><a href="#l5" id="l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></div>
145 <div class="parity1 source"><a href="#l6" id="l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></div>
145 <div class="parity1 source"><a href="#l6" id="l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></div>
146 <div class="parity0 source"><a href="#l7" id="l7"> 7</a> <span class="sd">&quot;&quot;&quot;</span></div>
146 <div class="parity0 source"><a href="#l7" id="l7"> 7</a> <span class="sd">&quot;&quot;&quot;</span></div>
147 <div class="parity1 source"><a href="#l8" id="l8"> 8</a> </div>
147 <div class="parity1 source"><a href="#l8" id="l8"> 8</a> </div>
148 <div class="parity0 source"><a href="#l9" id="l9"> 9</a> <span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">dropwhile</span><span class="p">,</span> <span class="n">ifilter</span><span class="p">,</span> <span class="n">islice</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span> <span class="n">chain</span></div>
148 <div class="parity0 source"><a href="#l9" id="l9"> 9</a> <span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">dropwhile</span><span class="p">,</span> <span class="n">ifilter</span><span class="p">,</span> <span class="n">islice</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span> <span class="n">chain</span></div>
149 <div class="parity1 source"><a href="#l10" id="l10"> 10</a> </div>
149 <div class="parity1 source"><a href="#l10" id="l10"> 10</a> </div>
150 <div class="parity0 source"><a href="#l11" id="l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></div>
150 <div class="parity0 source"><a href="#l11" id="l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></div>
151 <div class="parity1 source"><a href="#l12" id="l12"> 12</a> <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></div>
151 <div class="parity1 source"><a href="#l12" id="l12"> 12</a> <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></div>
152 <div class="parity0 source"><a href="#l13" id="l13"> 13</a> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></div>
152 <div class="parity0 source"><a href="#l13" id="l13"> 13</a> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></div>
153 <div class="parity1 source"><a href="#l14" id="l14"> 14</a> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></div>
153 <div class="parity1 source"><a href="#l14" id="l14"> 14</a> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></div>
154 <div class="parity0 source"><a href="#l15" id="l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></div>
154 <div class="parity0 source"><a href="#l15" id="l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></div>
155 <div class="parity1 source"><a href="#l16" id="l16"> 16</a> <span class="c"># infinite recursion.</span></div>
155 <div class="parity1 source"><a href="#l16" id="l16"> 16</a> <span class="c"># infinite recursion.</span></div>
156 <div class="parity0 source"><a href="#l17" id="l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></div>
156 <div class="parity0 source"><a href="#l17" id="l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></div>
157 <div class="parity1 source"><a href="#l18" id="l18"> 18</a> <span class="n">ns</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">%</span> <span class="n">p</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></div>
157 <div class="parity1 source"><a href="#l18" id="l18"> 18</a> <span class="n">ns</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">%</span> <span class="n">p</span> <span class="o">!=</span> <span class="mi">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></div>
158 <div class="parity0 source"><a href="#l19" id="l19"> 19</a> <span class="kn">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></div>
158 <div class="parity0 source"><a href="#l19" id="l19"> 19</a> <span class="kn">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></div>
159 <div class="parity1 source"><a href="#l20" id="l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></div>
159 <div class="parity1 source"><a href="#l20" id="l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></div>
160 <div class="parity0 source"><a href="#l21" id="l21"> 21</a> </div>
160 <div class="parity0 source"><a href="#l21" id="l21"> 21</a> </div>
161 <div class="parity1 source"><a href="#l22" id="l22"> 22</a> <span class="n">odds</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">i</span><span class="p">:</span> <span class="n">i</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="n">count</span><span class="p">())</span></div>
161 <div class="parity1 source"><a href="#l22" id="l22"> 22</a> <span class="n">odds</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">i</span><span class="p">:</span> <span class="n">i</span> <span class="o">%</span> <span class="mi">2</span> <span class="o">==</span> <span class="mi">1</span><span class="p">,</span> <span class="n">count</span><span class="p">())</span></div>
162 <div class="parity0 source"><a href="#l23" id="l23"> 23</a> <span class="kn">return</span> <span class="n">chain</span><span class="p">([</span><span class="mi">2</span><span class="p">],</span> <span class="n">sieve</span><span class="p">(</span><span class="n">dropwhile</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mi">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></div>
162 <div class="parity0 source"><a href="#l23" id="l23"> 23</a> <span class="kn">return</span> <span class="n">chain</span><span class="p">([</span><span class="mi">2</span><span class="p">],</span> <span class="n">sieve</span><span class="p">(</span><span class="n">dropwhile</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mi">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></div>
163 <div class="parity1 source"><a href="#l24" id="l24"> 24</a> </div>
163 <div class="parity1 source"><a href="#l24" id="l24"> 24</a> </div>
164 <div class="parity0 source"><a href="#l25" id="l25"> 25</a> <span class="kn">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&quot;__main__&quot;</span><span class="p">:</span></div>
164 <div class="parity0 source"><a href="#l25" id="l25"> 25</a> <span class="kn">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&quot;__main__&quot;</span><span class="p">:</span></div>
165 <div class="parity1 source"><a href="#l26" id="l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></div>
165 <div class="parity1 source"><a href="#l26" id="l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></div>
166 <div class="parity0 source"><a href="#l27" id="l27"> 27</a> <span class="kn">try</span><span class="p">:</span></div>
166 <div class="parity0 source"><a href="#l27" id="l27"> 27</a> <span class="kn">try</span><span class="p">:</span></div>
167 <div class="parity1 source"><a href="#l28" id="l28"> 28</a> <span class="n">n</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span></div>
167 <div class="parity1 source"><a href="#l28" id="l28"> 28</a> <span class="n">n</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mi">1</span><span class="p">])</span></div>
168 <div class="parity0 source"><a href="#l29" id="l29"> 29</a> <span class="kn">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">):</span></div>
168 <div class="parity0 source"><a href="#l29" id="l29"> 29</a> <span class="kn">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">):</span></div>
169 <div class="parity1 source"><a href="#l30" id="l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mi">10</span></div>
169 <div class="parity1 source"><a href="#l30" id="l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mi">10</span></div>
170 <div class="parity0 source"><a href="#l31" id="l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></div>
170 <div class="parity0 source"><a href="#l31" id="l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></div>
171 <div class="parity1 source"><a href="#l32" id="l32"> 32</a> <span class="kn">print</span> <span class="s">&quot;The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></div>
171 <div class="parity1 source"><a href="#l32" id="l32"> 32</a> <span class="kn">print</span> <span class="s">&quot;The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></div>
172 <div class="sourcelast"></div>
172 <div class="sourcelast"></div>
173 </div>
173 </div>
174 </div>
174 </div>
175 </div>
175 </div>
176
176
177 <script type="text/javascript">process_dates()</script>
177 <script type="text/javascript">process_dates()</script>
178
178
179
179
180 </body>
180 </body>
181 </html>
181 </html>
182
182
183
183
184 hgweb fileannotate, html
184 hgweb fileannotate, html
185
185
186 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/primes.py') \
186 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/primes.py') \
187 > | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mi\"/class=\"mf\"/g"
187 > | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mi\"/class=\"mf\"/g"
188 200 Script output follows
188 200 Script output follows
189
189
190 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
190 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
191 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
191 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US">
192 <head>
192 <head>
193 <link rel="icon" href="/static/hgicon.png" type="image/png" />
193 <link rel="icon" href="/static/hgicon.png" type="image/png" />
194 <meta name="robots" content="index, nofollow" />
194 <meta name="robots" content="index, nofollow" />
195 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
195 <link rel="stylesheet" href="/static/style-paper.css" type="text/css" />
196 <script type="text/javascript" src="/static/mercurial.js"></script>
196 <script type="text/javascript" src="/static/mercurial.js"></script>
197
197
198 <link rel="stylesheet" href="/highlightcss" type="text/css" />
198 <link rel="stylesheet" href="/highlightcss" type="text/css" />
199 <title>test: primes.py annotate</title>
199 <title>test: primes.py annotate</title>
200 </head>
200 </head>
201 <body>
201 <body>
202
202
203 <div class="container">
203 <div class="container">
204 <div class="menu">
204 <div class="menu">
205 <div class="logo">
205 <div class="logo">
206 <a href="http://mercurial.selenic.com/">
206 <a href="http://mercurial.selenic.com/">
207 <img src="/static/hglogo.png" alt="mercurial" /></a>
207 <img src="/static/hglogo.png" alt="mercurial" /></a>
208 </div>
208 </div>
209 <ul>
209 <ul>
210 <li><a href="/shortlog/853dcd4de2a6">log</a></li>
210 <li><a href="/shortlog/853dcd4de2a6">log</a></li>
211 <li><a href="/graph/853dcd4de2a6">graph</a></li>
211 <li><a href="/graph/853dcd4de2a6">graph</a></li>
212 <li><a href="/tags">tags</a></li>
212 <li><a href="/tags">tags</a></li>
213 <li><a href="/bookmarks">bookmarks</a></li>
213 <li><a href="/bookmarks">bookmarks</a></li>
214 <li><a href="/branches">branches</a></li>
214 <li><a href="/branches">branches</a></li>
215 </ul>
215 </ul>
216
216
217 <ul>
217 <ul>
218 <li><a href="/rev/853dcd4de2a6">changeset</a></li>
218 <li><a href="/rev/853dcd4de2a6">changeset</a></li>
219 <li><a href="/file/853dcd4de2a6/">browse</a></li>
219 <li><a href="/file/853dcd4de2a6/">browse</a></li>
220 </ul>
220 </ul>
221 <ul>
221 <ul>
222 <li><a href="/file/853dcd4de2a6/primes.py">file</a></li>
222 <li><a href="/file/853dcd4de2a6/primes.py">file</a></li>
223 <li><a href="/file/tip/primes.py">latest</a></li>
223 <li><a href="/file/tip/primes.py">latest</a></li>
224 <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
224 <li><a href="/diff/853dcd4de2a6/primes.py">diff</a></li>
225 <li class="active">annotate</li>
225 <li class="active">annotate</li>
226 <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
226 <li><a href="/log/853dcd4de2a6/primes.py">file log</a></li>
227 <li><a href="/raw-annotate/853dcd4de2a6/primes.py">raw</a></li>
227 <li><a href="/raw-annotate/853dcd4de2a6/primes.py">raw</a></li>
228 </ul>
228 </ul>
229 <ul>
229 <ul>
230 <li><a href="/help">help</a></li>
230 <li><a href="/help">help</a></li>
231 </ul>
231 </ul>
232 </div>
232 </div>
233
233
234 <div class="main">
234 <div class="main">
235 <h2><a href="/">test</a></h2>
235 <h2><a href="/">test</a></h2>
236 <h3>annotate primes.py @ 0:853dcd4de2a6</h3>
236 <h3>annotate primes.py @ 0:853dcd4de2a6</h3>
237
237
238 <form class="search" action="/log">
238 <form class="search" action="/log">
239
239
240 <p><input name="rev" id="search1" type="text" size="30" /></p>
240 <p><input name="rev" id="search1" type="text" size="30" /></p>
241 <div id="hint">find changesets by author, revision,
241 <div id="hint">find changesets by author, revision,
242 files, or words in the commit message</div>
242 files, or words in the commit message</div>
243 </form>
243 </form>
244
244
245 <div class="description">a</div>
245 <div class="description">a</div>
246
246
247 <table id="changesetEntry">
247 <table id="changesetEntry">
248 <tr>
248 <tr>
249 <th class="author">author</th>
249 <th class="author">author</th>
250 <td class="author">&#116;&#101;&#115;&#116;</td>
250 <td class="author">&#116;&#101;&#115;&#116;</td>
251 </tr>
251 </tr>
252 <tr>
252 <tr>
253 <th class="date">date</th>
253 <th class="date">date</th>
254 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
254 <td class="date age">Thu, 01 Jan 1970 00:00:00 +0000</td>
255 </tr>
255 </tr>
256 <tr>
256 <tr>
257 <th class="author">parents</th>
257 <th class="author">parents</th>
258 <td class="author"></td>
258 <td class="author"></td>
259 </tr>
259 </tr>
260 <tr>
260 <tr>
261 <th class="author">children</th>
261 <th class="author">children</th>
262 <td class="author"></td>
262 <td class="author"></td>
263 </tr>
263 </tr>
264
264
265 </table>
265 </table>
266
266
267 <div class="overflow">
267 <div class="overflow">
268 <table class="bigtable">
268 <table class="bigtable">
269 <tr>
269 <tr>
270 <th class="annotate">rev</th>
270 <th class="annotate">rev</th>
271 <th class="line">&nbsp;&nbsp;line source</th>
271 <th class="line">&nbsp;&nbsp;line source</th>
272 </tr>
272 </tr>
273
273
274 <tr class="parity0">
274 <tr class="parity0">
275 <td class="annotate">
275 <td class="annotate">
276 <a href="/annotate/853dcd4de2a6/primes.py#1"
276 <a href="/annotate/853dcd4de2a6/primes.py#1"
277 title="853dcd4de2a6: a">test@0</a>
277 title="853dcd4de2a6: a">test@0</a>
278 </td>
278 </td>
279 <td class="source"><a href="#l1" id="l1"> 1</a> <span class="c">#!/usr/bin/env python</span></td>
279 <td class="source"><a href="#l1" id="l1"> 1</a> <span class="c">#!/usr/bin/env python</span></td>
280 </tr>
280 </tr>
281 <tr class="parity1">
281 <tr class="parity1">
282 <td class="annotate">
282 <td class="annotate">
283 <a href="/annotate/853dcd4de2a6/primes.py#2"
283 <a href="/annotate/853dcd4de2a6/primes.py#2"
284 title="853dcd4de2a6: a">test@0</a>
284 title="853dcd4de2a6: a">test@0</a>
285 </td>
285 </td>
286 <td class="source"><a href="#l2" id="l2"> 2</a> </td>
286 <td class="source"><a href="#l2" id="l2"> 2</a> </td>
287 </tr>
287 </tr>
288 <tr class="parity0">
288 <tr class="parity0">
289 <td class="annotate">
289 <td class="annotate">
290 <a href="/annotate/853dcd4de2a6/primes.py#3"
290 <a href="/annotate/853dcd4de2a6/primes.py#3"
291 title="853dcd4de2a6: a">test@0</a>
291 title="853dcd4de2a6: a">test@0</a>
292 </td>
292 </td>
293 <td class="source"><a href="#l3" id="l3"> 3</a> <span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></td>
293 <td class="source"><a href="#l3" id="l3"> 3</a> <span class="sd">&quot;&quot;&quot;Fun with generators. Corresponding Haskell implementation:</span></td>
294 </tr>
294 </tr>
295 <tr class="parity1">
295 <tr class="parity1">
296 <td class="annotate">
296 <td class="annotate">
297 <a href="/annotate/853dcd4de2a6/primes.py#4"
297 <a href="/annotate/853dcd4de2a6/primes.py#4"
298 title="853dcd4de2a6: a">test@0</a>
298 title="853dcd4de2a6: a">test@0</a>
299 </td>
299 </td>
300 <td class="source"><a href="#l4" id="l4"> 4</a> </td>
300 <td class="source"><a href="#l4" id="l4"> 4</a> </td>
301 </tr>
301 </tr>
302 <tr class="parity0">
302 <tr class="parity0">
303 <td class="annotate">
303 <td class="annotate">
304 <a href="/annotate/853dcd4de2a6/primes.py#5"
304 <a href="/annotate/853dcd4de2a6/primes.py#5"
305 title="853dcd4de2a6: a">test@0</a>
305 title="853dcd4de2a6: a">test@0</a>
306 </td>
306 </td>
307 <td class="source"><a href="#l5" id="l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></td>
307 <td class="source"><a href="#l5" id="l5"> 5</a> <span class="sd">primes = 2 : sieve [3, 5..]</span></td>
308 </tr>
308 </tr>
309 <tr class="parity1">
309 <tr class="parity1">
310 <td class="annotate">
310 <td class="annotate">
311 <a href="/annotate/853dcd4de2a6/primes.py#6"
311 <a href="/annotate/853dcd4de2a6/primes.py#6"
312 title="853dcd4de2a6: a">test@0</a>
312 title="853dcd4de2a6: a">test@0</a>
313 </td>
313 </td>
314 <td class="source"><a href="#l6" id="l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></td>
314 <td class="source"><a href="#l6" id="l6"> 6</a> <span class="sd"> where sieve (p:ns) = p : sieve [n | n &lt;- ns, mod n p /= 0]</span></td>
315 </tr>
315 </tr>
316 <tr class="parity0">
316 <tr class="parity0">
317 <td class="annotate">
317 <td class="annotate">
318 <a href="/annotate/853dcd4de2a6/primes.py#7"
318 <a href="/annotate/853dcd4de2a6/primes.py#7"
319 title="853dcd4de2a6: a">test@0</a>
319 title="853dcd4de2a6: a">test@0</a>
320 </td>
320 </td>
321 <td class="source"><a href="#l7" id="l7"> 7</a> <span class="sd">&quot;&quot;&quot;</span></td>
321 <td class="source"><a href="#l7" id="l7"> 7</a> <span class="sd">&quot;&quot;&quot;</span></td>
322 </tr>
322 </tr>
323 <tr class="parity1">
323 <tr class="parity1">
324 <td class="annotate">
324 <td class="annotate">
325 <a href="/annotate/853dcd4de2a6/primes.py#8"
325 <a href="/annotate/853dcd4de2a6/primes.py#8"
326 title="853dcd4de2a6: a">test@0</a>
326 title="853dcd4de2a6: a">test@0</a>
327 </td>
327 </td>
328 <td class="source"><a href="#l8" id="l8"> 8</a> </td>
328 <td class="source"><a href="#l8" id="l8"> 8</a> </td>
329 </tr>
329 </tr>
330 <tr class="parity0">
330 <tr class="parity0">
331 <td class="annotate">
331 <td class="annotate">
332 <a href="/annotate/853dcd4de2a6/primes.py#9"
332 <a href="/annotate/853dcd4de2a6/primes.py#9"
333 title="853dcd4de2a6: a">test@0</a>
333 title="853dcd4de2a6: a">test@0</a>
334 </td>
334 </td>
335 <td class="source"><a href="#l9" id="l9"> 9</a> <span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">dropwhile</span><span class="p">,</span> <span class="n">ifilter</span><span class="p">,</span> <span class="n">islice</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span> <span class="n">chain</span></td>
335 <td class="source"><a href="#l9" id="l9"> 9</a> <span class="kn">from</span> <span class="nn">itertools</span> <span class="kn">import</span> <span class="n">dropwhile</span><span class="p">,</span> <span class="n">ifilter</span><span class="p">,</span> <span class="n">islice</span><span class="p">,</span> <span class="n">count</span><span class="p">,</span> <span class="n">chain</span></td>
336 </tr>
336 </tr>
337 <tr class="parity1">
337 <tr class="parity1">
338 <td class="annotate">
338 <td class="annotate">
339 <a href="/annotate/853dcd4de2a6/primes.py#10"
339 <a href="/annotate/853dcd4de2a6/primes.py#10"
340 title="853dcd4de2a6: a">test@0</a>
340 title="853dcd4de2a6: a">test@0</a>
341 </td>
341 </td>
342 <td class="source"><a href="#l10" id="l10"> 10</a> </td>
342 <td class="source"><a href="#l10" id="l10"> 10</a> </td>
343 </tr>
343 </tr>
344 <tr class="parity0">
344 <tr class="parity0">
345 <td class="annotate">
345 <td class="annotate">
346 <a href="/annotate/853dcd4de2a6/primes.py#11"
346 <a href="/annotate/853dcd4de2a6/primes.py#11"
347 title="853dcd4de2a6: a">test@0</a>
347 title="853dcd4de2a6: a">test@0</a>
348 </td>
348 </td>
349 <td class="source"><a href="#l11" id="l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></td>
349 <td class="source"><a href="#l11" id="l11"> 11</a> <span class="kn">def</span> <span class="nf">primes</span><span class="p">():</span></td>
350 </tr>
350 </tr>
351 <tr class="parity1">
351 <tr class="parity1">
352 <td class="annotate">
352 <td class="annotate">
353 <a href="/annotate/853dcd4de2a6/primes.py#12"
353 <a href="/annotate/853dcd4de2a6/primes.py#12"
354 title="853dcd4de2a6: a">test@0</a>
354 title="853dcd4de2a6: a">test@0</a>
355 </td>
355 </td>
356 <td class="source"><a href="#l12" id="l12"> 12</a> <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></td>
356 <td class="source"><a href="#l12" id="l12"> 12</a> <span class="sd">&quot;&quot;&quot;Generate all primes.&quot;&quot;&quot;</span></td>
357 </tr>
357 </tr>
358 <tr class="parity0">
358 <tr class="parity0">
359 <td class="annotate">
359 <td class="annotate">
360 <a href="/annotate/853dcd4de2a6/primes.py#13"
360 <a href="/annotate/853dcd4de2a6/primes.py#13"
361 title="853dcd4de2a6: a">test@0</a>
361 title="853dcd4de2a6: a">test@0</a>
362 </td>
362 </td>
363 <td class="source"><a href="#l13" id="l13"> 13</a> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td>
363 <td class="source"><a href="#l13" id="l13"> 13</a> <span class="kn">def</span> <span class="nf">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td>
364 </tr>
364 </tr>
365 <tr class="parity1">
365 <tr class="parity1">
366 <td class="annotate">
366 <td class="annotate">
367 <a href="/annotate/853dcd4de2a6/primes.py#14"
367 <a href="/annotate/853dcd4de2a6/primes.py#14"
368 title="853dcd4de2a6: a">test@0</a>
368 title="853dcd4de2a6: a">test@0</a>
369 </td>
369 </td>
370 <td class="source"><a href="#l14" id="l14"> 14</a> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></td>
370 <td class="source"><a href="#l14" id="l14"> 14</a> <span class="n">p</span> <span class="o">=</span> <span class="n">ns</span><span class="o">.</span><span class="n">next</span><span class="p">()</span></td>
371 </tr>
371 </tr>
372 <tr class="parity0">
372 <tr class="parity0">
373 <td class="annotate">
373 <td class="annotate">
374 <a href="/annotate/853dcd4de2a6/primes.py#15"
374 <a href="/annotate/853dcd4de2a6/primes.py#15"
375 title="853dcd4de2a6: a">test@0</a>
375 title="853dcd4de2a6: a">test@0</a>
376 </td>
376 </td>
377 <td class="source"><a href="#l15" id="l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></td>
377 <td class="source"><a href="#l15" id="l15"> 15</a> <span class="c"># It is important to yield *here* in order to stop the</span></td>
378 </tr>
378 </tr>
379 <tr class="parity1">
379 <tr class="parity1">
380 <td class="annotate">
380 <td class="annotate">
381 <a href="/annotate/853dcd4de2a6/primes.py#16"
381 <a href="/annotate/853dcd4de2a6/primes.py#16"
382 title="853dcd4de2a6: a">test@0</a>
382 title="853dcd4de2a6: a">test@0</a>
383 </td>
383 </td>
384 <td class="source"><a href="#l16" id="l16"> 16</a> <span class="c"># infinite recursion.</span></td>
384 <td class="source"><a href="#l16" id="l16"> 16</a> <span class="c"># infinite recursion.</span></td>
385 </tr>
385 </tr>
386 <tr class="parity0">
386 <tr class="parity0">
387 <td class="annotate">
387 <td class="annotate">
388 <a href="/annotate/853dcd4de2a6/primes.py#17"
388 <a href="/annotate/853dcd4de2a6/primes.py#17"
389 title="853dcd4de2a6: a">test@0</a>
389 title="853dcd4de2a6: a">test@0</a>
390 </td>
390 </td>
391 <td class="source"><a href="#l17" id="l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></td>
391 <td class="source"><a href="#l17" id="l17"> 17</a> <span class="kn">yield</span> <span class="n">p</span></td>
392 </tr>
392 </tr>
393 <tr class="parity1">
393 <tr class="parity1">
394 <td class="annotate">
394 <td class="annotate">
395 <a href="/annotate/853dcd4de2a6/primes.py#18"
395 <a href="/annotate/853dcd4de2a6/primes.py#18"
396 title="853dcd4de2a6: a">test@0</a>
396 title="853dcd4de2a6: a">test@0</a>
397 </td>
397 </td>
398 <td class="source"><a href="#l18" id="l18"> 18</a> <span class="n">ns</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">%</span> <span class="n">p</span> <span class="o">!=</span> <span class="mf">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></td>
398 <td class="source"><a href="#l18" id="l18"> 18</a> <span class="n">ns</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">%</span> <span class="n">p</span> <span class="o">!=</span> <span class="mf">0</span><span class="p">,</span> <span class="n">ns</span><span class="p">)</span></td>
399 </tr>
399 </tr>
400 <tr class="parity0">
400 <tr class="parity0">
401 <td class="annotate">
401 <td class="annotate">
402 <a href="/annotate/853dcd4de2a6/primes.py#19"
402 <a href="/annotate/853dcd4de2a6/primes.py#19"
403 title="853dcd4de2a6: a">test@0</a>
403 title="853dcd4de2a6: a">test@0</a>
404 </td>
404 </td>
405 <td class="source"><a href="#l19" id="l19"> 19</a> <span class="kn">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td>
405 <td class="source"><a href="#l19" id="l19"> 19</a> <span class="kn">for</span> <span class="n">n</span> <span class="ow">in</span> <span class="n">sieve</span><span class="p">(</span><span class="n">ns</span><span class="p">):</span></td>
406 </tr>
406 </tr>
407 <tr class="parity1">
407 <tr class="parity1">
408 <td class="annotate">
408 <td class="annotate">
409 <a href="/annotate/853dcd4de2a6/primes.py#20"
409 <a href="/annotate/853dcd4de2a6/primes.py#20"
410 title="853dcd4de2a6: a">test@0</a>
410 title="853dcd4de2a6: a">test@0</a>
411 </td>
411 </td>
412 <td class="source"><a href="#l20" id="l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></td>
412 <td class="source"><a href="#l20" id="l20"> 20</a> <span class="kn">yield</span> <span class="n">n</span></td>
413 </tr>
413 </tr>
414 <tr class="parity0">
414 <tr class="parity0">
415 <td class="annotate">
415 <td class="annotate">
416 <a href="/annotate/853dcd4de2a6/primes.py#21"
416 <a href="/annotate/853dcd4de2a6/primes.py#21"
417 title="853dcd4de2a6: a">test@0</a>
417 title="853dcd4de2a6: a">test@0</a>
418 </td>
418 </td>
419 <td class="source"><a href="#l21" id="l21"> 21</a> </td>
419 <td class="source"><a href="#l21" id="l21"> 21</a> </td>
420 </tr>
420 </tr>
421 <tr class="parity1">
421 <tr class="parity1">
422 <td class="annotate">
422 <td class="annotate">
423 <a href="/annotate/853dcd4de2a6/primes.py#22"
423 <a href="/annotate/853dcd4de2a6/primes.py#22"
424 title="853dcd4de2a6: a">test@0</a>
424 title="853dcd4de2a6: a">test@0</a>
425 </td>
425 </td>
426 <td class="source"><a href="#l22" id="l22"> 22</a> <span class="n">odds</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">i</span><span class="p">:</span> <span class="n">i</span> <span class="o">%</span> <span class="mf">2</span> <span class="o">==</span> <span class="mf">1</span><span class="p">,</span> <span class="n">count</span><span class="p">())</span></td>
426 <td class="source"><a href="#l22" id="l22"> 22</a> <span class="n">odds</span> <span class="o">=</span> <span class="n">ifilter</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">i</span><span class="p">:</span> <span class="n">i</span> <span class="o">%</span> <span class="mf">2</span> <span class="o">==</span> <span class="mf">1</span><span class="p">,</span> <span class="n">count</span><span class="p">())</span></td>
427 </tr>
427 </tr>
428 <tr class="parity0">
428 <tr class="parity0">
429 <td class="annotate">
429 <td class="annotate">
430 <a href="/annotate/853dcd4de2a6/primes.py#23"
430 <a href="/annotate/853dcd4de2a6/primes.py#23"
431 title="853dcd4de2a6: a">test@0</a>
431 title="853dcd4de2a6: a">test@0</a>
432 </td>
432 </td>
433 <td class="source"><a href="#l23" id="l23"> 23</a> <span class="kn">return</span> <span class="n">chain</span><span class="p">([</span><span class="mf">2</span><span class="p">],</span> <span class="n">sieve</span><span class="p">(</span><span class="n">dropwhile</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mf">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></td>
433 <td class="source"><a href="#l23" id="l23"> 23</a> <span class="kn">return</span> <span class="n">chain</span><span class="p">([</span><span class="mf">2</span><span class="p">],</span> <span class="n">sieve</span><span class="p">(</span><span class="n">dropwhile</span><span class="p">(</span><span class="kn">lambda</span> <span class="n">n</span><span class="p">:</span> <span class="n">n</span> <span class="o">&lt;</span> <span class="mf">3</span><span class="p">,</span> <span class="n">odds</span><span class="p">)))</span></td>
434 </tr>
434 </tr>
435 <tr class="parity1">
435 <tr class="parity1">
436 <td class="annotate">
436 <td class="annotate">
437 <a href="/annotate/853dcd4de2a6/primes.py#24"
437 <a href="/annotate/853dcd4de2a6/primes.py#24"
438 title="853dcd4de2a6: a">test@0</a>
438 title="853dcd4de2a6: a">test@0</a>
439 </td>
439 </td>
440 <td class="source"><a href="#l24" id="l24"> 24</a> </td>
440 <td class="source"><a href="#l24" id="l24"> 24</a> </td>
441 </tr>
441 </tr>
442 <tr class="parity0">
442 <tr class="parity0">
443 <td class="annotate">
443 <td class="annotate">
444 <a href="/annotate/853dcd4de2a6/primes.py#25"
444 <a href="/annotate/853dcd4de2a6/primes.py#25"
445 title="853dcd4de2a6: a">test@0</a>
445 title="853dcd4de2a6: a">test@0</a>
446 </td>
446 </td>
447 <td class="source"><a href="#l25" id="l25"> 25</a> <span class="kn">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&quot;__main__&quot;</span><span class="p">:</span></td>
447 <td class="source"><a href="#l25" id="l25"> 25</a> <span class="kn">if</span> <span class="n">__name__</span> <span class="o">==</span> <span class="s">&quot;__main__&quot;</span><span class="p">:</span></td>
448 </tr>
448 </tr>
449 <tr class="parity1">
449 <tr class="parity1">
450 <td class="annotate">
450 <td class="annotate">
451 <a href="/annotate/853dcd4de2a6/primes.py#26"
451 <a href="/annotate/853dcd4de2a6/primes.py#26"
452 title="853dcd4de2a6: a">test@0</a>
452 title="853dcd4de2a6: a">test@0</a>
453 </td>
453 </td>
454 <td class="source"><a href="#l26" id="l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></td>
454 <td class="source"><a href="#l26" id="l26"> 26</a> <span class="kn">import</span> <span class="nn">sys</span></td>
455 </tr>
455 </tr>
456 <tr class="parity0">
456 <tr class="parity0">
457 <td class="annotate">
457 <td class="annotate">
458 <a href="/annotate/853dcd4de2a6/primes.py#27"
458 <a href="/annotate/853dcd4de2a6/primes.py#27"
459 title="853dcd4de2a6: a">test@0</a>
459 title="853dcd4de2a6: a">test@0</a>
460 </td>
460 </td>
461 <td class="source"><a href="#l27" id="l27"> 27</a> <span class="kn">try</span><span class="p">:</span></td>
461 <td class="source"><a href="#l27" id="l27"> 27</a> <span class="kn">try</span><span class="p">:</span></td>
462 </tr>
462 </tr>
463 <tr class="parity1">
463 <tr class="parity1">
464 <td class="annotate">
464 <td class="annotate">
465 <a href="/annotate/853dcd4de2a6/primes.py#28"
465 <a href="/annotate/853dcd4de2a6/primes.py#28"
466 title="853dcd4de2a6: a">test@0</a>
466 title="853dcd4de2a6: a">test@0</a>
467 </td>
467 </td>
468 <td class="source"><a href="#l28" id="l28"> 28</a> <span class="n">n</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">1</span><span class="p">])</span></td>
468 <td class="source"><a href="#l28" id="l28"> 28</a> <span class="n">n</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="n">sys</span><span class="o">.</span><span class="n">argv</span><span class="p">[</span><span class="mf">1</span><span class="p">])</span></td>
469 </tr>
469 </tr>
470 <tr class="parity0">
470 <tr class="parity0">
471 <td class="annotate">
471 <td class="annotate">
472 <a href="/annotate/853dcd4de2a6/primes.py#29"
472 <a href="/annotate/853dcd4de2a6/primes.py#29"
473 title="853dcd4de2a6: a">test@0</a>
473 title="853dcd4de2a6: a">test@0</a>
474 </td>
474 </td>
475 <td class="source"><a href="#l29" id="l29"> 29</a> <span class="kn">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">):</span></td>
475 <td class="source"><a href="#l29" id="l29"> 29</a> <span class="kn">except</span> <span class="p">(</span><span class="ne">ValueError</span><span class="p">,</span> <span class="ne">IndexError</span><span class="p">):</span></td>
476 </tr>
476 </tr>
477 <tr class="parity1">
477 <tr class="parity1">
478 <td class="annotate">
478 <td class="annotate">
479 <a href="/annotate/853dcd4de2a6/primes.py#30"
479 <a href="/annotate/853dcd4de2a6/primes.py#30"
480 title="853dcd4de2a6: a">test@0</a>
480 title="853dcd4de2a6: a">test@0</a>
481 </td>
481 </td>
482 <td class="source"><a href="#l30" id="l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mf">10</span></td>
482 <td class="source"><a href="#l30" id="l30"> 30</a> <span class="n">n</span> <span class="o">=</span> <span class="mf">10</span></td>
483 </tr>
483 </tr>
484 <tr class="parity0">
484 <tr class="parity0">
485 <td class="annotate">
485 <td class="annotate">
486 <a href="/annotate/853dcd4de2a6/primes.py#31"
486 <a href="/annotate/853dcd4de2a6/primes.py#31"
487 title="853dcd4de2a6: a">test@0</a>
487 title="853dcd4de2a6: a">test@0</a>
488 </td>
488 </td>
489 <td class="source"><a href="#l31" id="l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></td>
489 <td class="source"><a href="#l31" id="l31"> 31</a> <span class="n">p</span> <span class="o">=</span> <span class="n">primes</span><span class="p">()</span></td>
490 </tr>
490 </tr>
491 <tr class="parity1">
491 <tr class="parity1">
492 <td class="annotate">
492 <td class="annotate">
493 <a href="/annotate/853dcd4de2a6/primes.py#32"
493 <a href="/annotate/853dcd4de2a6/primes.py#32"
494 title="853dcd4de2a6: a">test@0</a>
494 title="853dcd4de2a6: a">test@0</a>
495 </td>
495 </td>
496 <td class="source"><a href="#l32" id="l32"> 32</a> <span class="kn">print</span> <span class="s">&quot;The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></td>
496 <td class="source"><a href="#l32" id="l32"> 32</a> <span class="kn">print</span> <span class="s">&quot;The first </span><span class="si">%d</span><span class="s"> primes: </span><span class="si">%s</span><span class="s">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">n</span><span class="p">,</span> <span class="nb">list</span><span class="p">(</span><span class="n">islice</span><span class="p">(</span><span class="n">p</span><span class="p">,</span> <span class="n">n</span><span class="p">)))</span></td>
497 </tr>
497 </tr>
498 </table>
498 </table>
499 </div>
499 </div>
500 </div>
500 </div>
501 </div>
501 </div>
502
502
503 <script type="text/javascript">process_dates()</script>
503 <script type="text/javascript">process_dates()</script>
504
504
505
505
506 </body>
506 </body>
507 </html>
507 </html>
508
508
509
509
510 hgweb fileannotate, raw
510 hgweb fileannotate, raw
511
511
512 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/primes.py?style=raw') \
512 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/primes.py?style=raw') \
513 > | sed "s/test@//" > a
513 > | sed "s/test@//" > a
514 $ echo "200 Script output follows" > b
514 $ echo "200 Script output follows" > b
515 $ echo "" >> b
515 $ echo "" >> b
516 $ echo "" >> b
516 $ echo "" >> b
517 $ hg annotate "primes.py" >> b
517 $ hg annotate "primes.py" >> b
518 $ echo "" >> b
518 $ echo "" >> b
519 $ echo "" >> b
519 $ echo "" >> b
520 $ echo "" >> b
520 $ echo "" >> b
521 $ echo "" >> b
521 $ echo "" >> b
522 $ diff -u b a
522 $ diff -u b a
523
523
524 hgweb filerevision, raw
524 hgweb filerevision, raw
525
525
526 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/primes.py?style=raw') \
526 $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/primes.py?style=raw') \
527 > > a
527 > > a
528 $ echo "200 Script output follows" > b
528 $ echo "200 Script output follows" > b
529 $ echo "" >> b
529 $ echo "" >> b
530 $ hg cat primes.py >> b
530 $ hg cat primes.py >> b
531 $ diff -u b a
531 $ diff -u b a
532
532
533 hgweb highlightcss friendly
533 hgweb highlightcss friendly
534
534
535 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/highlightcss' > out
535 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/highlightcss' > out
536 $ head -n 4 out
536 $ head -n 4 out
537 200 Script output follows
537 200 Script output follows
538
538
539 /* pygments_style = friendly */
539 /* pygments_style = friendly */
540
540
541 $ rm out
541 $ rm out
542
542
543 errors encountered
543 errors encountered
544
544
545 $ cat errors.log
545 $ cat errors.log
546 $ "$TESTDIR/killdaemons.py"
546 $ "$TESTDIR/killdaemons.py"
547
547
548 Change the pygments style
548 Change the pygments style
549
549
550 $ cat > .hg/hgrc <<EOF
550 $ cat > .hg/hgrc <<EOF
551 > [web]
551 > [web]
552 > pygments_style = fruity
552 > pygments_style = fruity
553 > EOF
553 > EOF
554
554
555 hg serve again
555 hg serve again
556
556
557 $ hg serve -p $HGPORT -d -n test --pid-file=hg.pid -A access.log -E errors.log
557 $ hg serve -p $HGPORT -d -n test --pid-file=hg.pid -A access.log -E errors.log
558 $ cat hg.pid >> $DAEMON_PIDS
558 $ cat hg.pid >> $DAEMON_PIDS
559
559
560 hgweb highlightcss fruity
560 hgweb highlightcss fruity
561
561
562 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/highlightcss' > out
562 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/highlightcss' > out
563 $ head -n 4 out
563 $ head -n 4 out
564 200 Script output follows
564 200 Script output follows
565
565
566 /* pygments_style = fruity */
566 /* pygments_style = fruity */
567
567
568 $ rm out
568 $ rm out
569
569
570 errors encountered
570 errors encountered
571
571
572 $ cat errors.log
572 $ cat errors.log
573 $ cd ..
573 $ cd ..
574 $ hg init eucjp
574 $ hg init eucjp
575 $ cd eucjp
575 $ cd eucjp
576 $ python -c 'print("\265\376")' >> eucjp.txt # Japanese kanji "Kyo"
576 $ python -c 'print("\265\376")' >> eucjp.txt # Japanese kanji "Kyo"
577 $ hg ci -Ama
577 $ hg ci -Ama
578 adding eucjp.txt
578 adding eucjp.txt
579 $ hgserveget () {
579 $ hgserveget () {
580 > "$TESTDIR/killdaemons.py"
580 > "$TESTDIR/killdaemons.py"
581 > echo % HGENCODING="$1" hg serve
581 > echo % HGENCODING="$1" hg serve
582 > HGENCODING="$1" hg serve -p $HGPORT -d -n test --pid-file=hg.pid -E errors.log
582 > HGENCODING="$1" hg serve -p $HGPORT -d -n test --pid-file=hg.pid -E errors.log
583 > cat hg.pid >> $DAEMON_PIDS
583 > cat hg.pid >> $DAEMON_PIDS
584 >
584 >
585 > echo % hgweb filerevision, html
585 > echo % hgweb filerevision, html
586 > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/file/tip/$2" \
586 > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/file/tip/$2" \
587 > | grep '<div class="parity0 source">'
587 > | grep '<div class="parity0 source">'
588 > echo % errors encountered
588 > echo % errors encountered
589 > cat errors.log
589 > cat errors.log
590 > }
590 > }
591 $ hgserveget euc-jp eucjp.txt
591 $ hgserveget euc-jp eucjp.txt
592 % HGENCODING=euc-jp hg serve
592 % HGENCODING=euc-jp hg serve
593 % hgweb filerevision, html
593 % hgweb filerevision, html
594 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xb5\xfe</div> (esc)
594 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xb5\xfe</div> (esc)
595 % errors encountered
595 % errors encountered
596 $ hgserveget utf-8 eucjp.txt
596 $ hgserveget utf-8 eucjp.txt
597 % HGENCODING=utf-8 hg serve
597 % HGENCODING=utf-8 hg serve
598 % hgweb filerevision, html
598 % hgweb filerevision, html
599 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xef\xbf\xbd\xef\xbf\xbd</div> (esc)
599 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> \xef\xbf\xbd\xef\xbf\xbd</div> (esc)
600 % errors encountered
600 % errors encountered
601 $ hgserveget us-ascii eucjp.txt
601 $ hgserveget us-ascii eucjp.txt
602 % HGENCODING=us-ascii hg serve
602 % HGENCODING=us-ascii hg serve
603 % hgweb filerevision, html
603 % hgweb filerevision, html
604 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> ??</div>
604 <div class="parity0 source"><a href="#l1" id="l1"> 1</a> ??</div>
605 % errors encountered
605 % errors encountered
@@ -1,92 +1,93 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hgserve() {
3 $ hgserve() {
3 > hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -E errors.log -v $@
4 > hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -E errors.log -v $@
4 > cat hg.pid >> "$DAEMON_PIDS"
5 > cat hg.pid >> "$DAEMON_PIDS"
5 > }
6 > }
6 $ hg init a
7 $ hg init a
7 $ hg --encoding utf-8 -R a branch æ
8 $ hg --encoding utf-8 -R a branch æ
8 marked working directory as branch \xc3\xa6 (esc)
9 marked working directory as branch \xc3\xa6 (esc)
9 $ echo foo > a/foo
10 $ echo foo > a/foo
10 $ hg -R a ci -Am foo
11 $ hg -R a ci -Am foo
11 adding foo
12 adding foo
12 $ hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
13 $ hgserve -R a --config web.push_ssl=False --config web.allow_push=* --encoding latin1
13 listening at http://*:$HGPORT1/ (bound to 127.0.0.1:$HGPORT1) (glob)
14 listening at http://*:$HGPORT1/ (bound to 127.0.0.1:$HGPORT1) (glob)
14 $ hg --encoding utf-8 clone http://localhost:$HGPORT1 b
15 $ hg --encoding utf-8 clone http://localhost:$HGPORT1 b
15 requesting all changes
16 requesting all changes
16 adding changesets
17 adding changesets
17 adding manifests
18 adding manifests
18 adding file changes
19 adding file changes
19 added 1 changesets with 1 changes to 1 files
20 added 1 changesets with 1 changes to 1 files
20 updating to branch \xc3\xa6 (esc)
21 updating to branch \xc3\xa6 (esc)
21 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
22 $ hg --encoding utf-8 -R b log
23 $ hg --encoding utf-8 -R b log
23 changeset: 0:867c11ce77b8
24 changeset: 0:867c11ce77b8
24 branch: \xc3\xa6 (esc)
25 branch: \xc3\xa6 (esc)
25 tag: tip
26 tag: tip
26 user: test
27 user: test
27 date: Thu Jan 01 00:00:00 1970 +0000
28 date: Thu Jan 01 00:00:00 1970 +0000
28 summary: foo
29 summary: foo
29
30
30 $ echo bar >> b/foo
31 $ echo bar >> b/foo
31 $ hg -R b ci -m bar
32 $ hg -R b ci -m bar
32 $ hg --encoding utf-8 -R b push
33 $ hg --encoding utf-8 -R b push
33 pushing to http://localhost:$HGPORT1/
34 pushing to http://localhost:$HGPORT1/
34 searching for changes
35 searching for changes
35 remote: adding changesets
36 remote: adding changesets
36 remote: adding manifests
37 remote: adding manifests
37 remote: adding file changes
38 remote: adding file changes
38 remote: added 1 changesets with 1 changes to 1 files
39 remote: added 1 changesets with 1 changes to 1 files
39 $ hg -R a --encoding utf-8 log
40 $ hg -R a --encoding utf-8 log
40 changeset: 1:58e7c90d67cb
41 changeset: 1:58e7c90d67cb
41 branch: \xc3\xa6 (esc)
42 branch: \xc3\xa6 (esc)
42 tag: tip
43 tag: tip
43 user: test
44 user: test
44 date: Thu Jan 01 00:00:00 1970 +0000
45 date: Thu Jan 01 00:00:00 1970 +0000
45 summary: bar
46 summary: bar
46
47
47 changeset: 0:867c11ce77b8
48 changeset: 0:867c11ce77b8
48 branch: \xc3\xa6 (esc)
49 branch: \xc3\xa6 (esc)
49 user: test
50 user: test
50 date: Thu Jan 01 00:00:00 1970 +0000
51 date: Thu Jan 01 00:00:00 1970 +0000
51 summary: foo
52 summary: foo
52
53
53 $ kill `cat hg.pid`
54 $ kill `cat hg.pid`
54
55
55 verify 7e7d56fe4833 (encoding fallback in branchmap to maintain compatibility with 1.3.x)
56 verify 7e7d56fe4833 (encoding fallback in branchmap to maintain compatibility with 1.3.x)
56
57
57 $ cat <<EOF > oldhg
58 $ cat <<EOF > oldhg
58 > import sys
59 > import sys
59 > from mercurial import ui, hg, commands
60 > from mercurial import ui, hg, commands
60 >
61 >
61 > class StdoutWrapper(object):
62 > class StdoutWrapper(object):
62 > def __init__(self, stdout):
63 > def __init__(self, stdout):
63 > self._file = stdout
64 > self._file = stdout
64 >
65 >
65 > def write(self, data):
66 > def write(self, data):
66 > if data == '47\n':
67 > if data == '47\n':
67 > # latin1 encoding is one %xx (3 bytes) shorter
68 > # latin1 encoding is one %xx (3 bytes) shorter
68 > data = '44\n'
69 > data = '44\n'
69 > elif data.startswith('%C3%A6 '):
70 > elif data.startswith('%C3%A6 '):
70 > # translate to latin1 encoding
71 > # translate to latin1 encoding
71 > data = '%%E6 %s' % data[7:]
72 > data = '%%E6 %s' % data[7:]
72 > self._file.write(data)
73 > self._file.write(data)
73 >
74 >
74 > def __getattr__(self, name):
75 > def __getattr__(self, name):
75 > return getattr(self._file, name)
76 > return getattr(self._file, name)
76 >
77 >
77 > sys.stdout = StdoutWrapper(sys.stdout)
78 > sys.stdout = StdoutWrapper(sys.stdout)
78 > sys.stderr = StdoutWrapper(sys.stderr)
79 > sys.stderr = StdoutWrapper(sys.stderr)
79 >
80 >
80 > myui = ui.ui()
81 > myui = ui.ui()
81 > repo = hg.repository(myui, 'a')
82 > repo = hg.repository(myui, 'a')
82 > commands.serve(myui, repo, stdio=True, cmdserver=False)
83 > commands.serve(myui, repo, stdio=True, cmdserver=False)
83 > EOF
84 > EOF
84 $ echo baz >> b/foo
85 $ echo baz >> b/foo
85 $ hg -R b ci -m baz
86 $ hg -R b ci -m baz
86 $ hg push -R b -e 'python oldhg' ssh://dummy/ --encoding latin1
87 $ hg push -R b -e 'python oldhg' ssh://dummy/ --encoding latin1
87 pushing to ssh://dummy/
88 pushing to ssh://dummy/
88 searching for changes
89 searching for changes
89 remote: adding changesets
90 remote: adding changesets
90 remote: adding manifests
91 remote: adding manifests
91 remote: adding file changes
92 remote: adding file changes
92 remote: added 1 changesets with 1 changes to 1 files
93 remote: added 1 changesets with 1 changes to 1 files
@@ -1,198 +1,200 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 creating 'remote
3 creating 'remote
2
4
3 $ hg init remote
5 $ hg init remote
4 $ cd remote
6 $ cd remote
5 $ hg unbundle $TESTDIR/bundles/remote.hg
7 $ hg unbundle $TESTDIR/bundles/remote.hg
6 adding changesets
8 adding changesets
7 adding manifests
9 adding manifests
8 adding file changes
10 adding file changes
9 added 9 changesets with 7 changes to 4 files (+1 heads)
11 added 9 changesets with 7 changes to 4 files (+1 heads)
10 (run 'hg heads' to see heads, 'hg merge' to merge)
12 (run 'hg heads' to see heads, 'hg merge' to merge)
11 $ hg up tip
13 $ hg up tip
12 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
14 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
13
15
14 Starting server
16 Starting server
15
17
16 $ hg serve -p $HGPORT -E ../error.log -d --pid-file=../hg1.pid
18 $ hg serve -p $HGPORT -E ../error.log -d --pid-file=../hg1.pid
17 $ cd ..
19 $ cd ..
18 $ cat hg1.pid >> $DAEMON_PIDS
20 $ cat hg1.pid >> $DAEMON_PIDS
19
21
20 clone remote via stream
22 clone remote via stream
21
23
22 $ for i in 0 1 2 3 4 5 6 7 8; do
24 $ for i in 0 1 2 3 4 5 6 7 8; do
23 > hg clone -r "$i" http://localhost:$HGPORT/ test-"$i"
25 > hg clone -r "$i" http://localhost:$HGPORT/ test-"$i"
24 > if cd test-"$i"; then
26 > if cd test-"$i"; then
25 > hg verify
27 > hg verify
26 > cd ..
28 > cd ..
27 > fi
29 > fi
28 > done
30 > done
29 adding changesets
31 adding changesets
30 adding manifests
32 adding manifests
31 adding file changes
33 adding file changes
32 added 1 changesets with 1 changes to 1 files
34 added 1 changesets with 1 changes to 1 files
33 updating to branch default
35 updating to branch default
34 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
36 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
35 checking changesets
37 checking changesets
36 checking manifests
38 checking manifests
37 crosschecking files in changesets and manifests
39 crosschecking files in changesets and manifests
38 checking files
40 checking files
39 1 files, 1 changesets, 1 total revisions
41 1 files, 1 changesets, 1 total revisions
40 adding changesets
42 adding changesets
41 adding manifests
43 adding manifests
42 adding file changes
44 adding file changes
43 added 2 changesets with 2 changes to 1 files
45 added 2 changesets with 2 changes to 1 files
44 updating to branch default
46 updating to branch default
45 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
47 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
46 checking changesets
48 checking changesets
47 checking manifests
49 checking manifests
48 crosschecking files in changesets and manifests
50 crosschecking files in changesets and manifests
49 checking files
51 checking files
50 1 files, 2 changesets, 2 total revisions
52 1 files, 2 changesets, 2 total revisions
51 adding changesets
53 adding changesets
52 adding manifests
54 adding manifests
53 adding file changes
55 adding file changes
54 added 3 changesets with 3 changes to 1 files
56 added 3 changesets with 3 changes to 1 files
55 updating to branch default
57 updating to branch default
56 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
58 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
57 checking changesets
59 checking changesets
58 checking manifests
60 checking manifests
59 crosschecking files in changesets and manifests
61 crosschecking files in changesets and manifests
60 checking files
62 checking files
61 1 files, 3 changesets, 3 total revisions
63 1 files, 3 changesets, 3 total revisions
62 adding changesets
64 adding changesets
63 adding manifests
65 adding manifests
64 adding file changes
66 adding file changes
65 added 4 changesets with 4 changes to 1 files
67 added 4 changesets with 4 changes to 1 files
66 updating to branch default
68 updating to branch default
67 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
68 checking changesets
70 checking changesets
69 checking manifests
71 checking manifests
70 crosschecking files in changesets and manifests
72 crosschecking files in changesets and manifests
71 checking files
73 checking files
72 1 files, 4 changesets, 4 total revisions
74 1 files, 4 changesets, 4 total revisions
73 adding changesets
75 adding changesets
74 adding manifests
76 adding manifests
75 adding file changes
77 adding file changes
76 added 2 changesets with 2 changes to 1 files
78 added 2 changesets with 2 changes to 1 files
77 updating to branch default
79 updating to branch default
78 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
80 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
79 checking changesets
81 checking changesets
80 checking manifests
82 checking manifests
81 crosschecking files in changesets and manifests
83 crosschecking files in changesets and manifests
82 checking files
84 checking files
83 1 files, 2 changesets, 2 total revisions
85 1 files, 2 changesets, 2 total revisions
84 adding changesets
86 adding changesets
85 adding manifests
87 adding manifests
86 adding file changes
88 adding file changes
87 added 3 changesets with 3 changes to 1 files
89 added 3 changesets with 3 changes to 1 files
88 updating to branch default
90 updating to branch default
89 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
91 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 checking changesets
92 checking changesets
91 checking manifests
93 checking manifests
92 crosschecking files in changesets and manifests
94 crosschecking files in changesets and manifests
93 checking files
95 checking files
94 1 files, 3 changesets, 3 total revisions
96 1 files, 3 changesets, 3 total revisions
95 adding changesets
97 adding changesets
96 adding manifests
98 adding manifests
97 adding file changes
99 adding file changes
98 added 4 changesets with 5 changes to 2 files
100 added 4 changesets with 5 changes to 2 files
99 updating to branch default
101 updating to branch default
100 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
102 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
101 checking changesets
103 checking changesets
102 checking manifests
104 checking manifests
103 crosschecking files in changesets and manifests
105 crosschecking files in changesets and manifests
104 checking files
106 checking files
105 2 files, 4 changesets, 5 total revisions
107 2 files, 4 changesets, 5 total revisions
106 adding changesets
108 adding changesets
107 adding manifests
109 adding manifests
108 adding file changes
110 adding file changes
109 added 5 changesets with 6 changes to 3 files
111 added 5 changesets with 6 changes to 3 files
110 updating to branch default
112 updating to branch default
111 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
113 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
112 checking changesets
114 checking changesets
113 checking manifests
115 checking manifests
114 crosschecking files in changesets and manifests
116 crosschecking files in changesets and manifests
115 checking files
117 checking files
116 3 files, 5 changesets, 6 total revisions
118 3 files, 5 changesets, 6 total revisions
117 adding changesets
119 adding changesets
118 adding manifests
120 adding manifests
119 adding file changes
121 adding file changes
120 added 5 changesets with 5 changes to 2 files
122 added 5 changesets with 5 changes to 2 files
121 updating to branch default
123 updating to branch default
122 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
124 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
123 checking changesets
125 checking changesets
124 checking manifests
126 checking manifests
125 crosschecking files in changesets and manifests
127 crosschecking files in changesets and manifests
126 checking files
128 checking files
127 2 files, 5 changesets, 5 total revisions
129 2 files, 5 changesets, 5 total revisions
128 $ cd test-8
130 $ cd test-8
129 $ hg pull ../test-7
131 $ hg pull ../test-7
130 pulling from ../test-7
132 pulling from ../test-7
131 searching for changes
133 searching for changes
132 adding changesets
134 adding changesets
133 adding manifests
135 adding manifests
134 adding file changes
136 adding file changes
135 added 4 changesets with 2 changes to 3 files (+1 heads)
137 added 4 changesets with 2 changes to 3 files (+1 heads)
136 (run 'hg heads' to see heads, 'hg merge' to merge)
138 (run 'hg heads' to see heads, 'hg merge' to merge)
137 $ hg verify
139 $ hg verify
138 checking changesets
140 checking changesets
139 checking manifests
141 checking manifests
140 crosschecking files in changesets and manifests
142 crosschecking files in changesets and manifests
141 checking files
143 checking files
142 4 files, 9 changesets, 7 total revisions
144 4 files, 9 changesets, 7 total revisions
143 $ cd ..
145 $ cd ..
144 $ cd test-1
146 $ cd test-1
145 $ hg pull -r 4 http://localhost:$HGPORT/
147 $ hg pull -r 4 http://localhost:$HGPORT/
146 pulling from http://localhost:$HGPORT/
148 pulling from http://localhost:$HGPORT/
147 searching for changes
149 searching for changes
148 adding changesets
150 adding changesets
149 adding manifests
151 adding manifests
150 adding file changes
152 adding file changes
151 added 1 changesets with 0 changes to 0 files (+1 heads)
153 added 1 changesets with 0 changes to 0 files (+1 heads)
152 (run 'hg heads' to see heads, 'hg merge' to merge)
154 (run 'hg heads' to see heads, 'hg merge' to merge)
153 $ hg verify
155 $ hg verify
154 checking changesets
156 checking changesets
155 checking manifests
157 checking manifests
156 crosschecking files in changesets and manifests
158 crosschecking files in changesets and manifests
157 checking files
159 checking files
158 1 files, 3 changesets, 2 total revisions
160 1 files, 3 changesets, 2 total revisions
159 $ hg pull http://localhost:$HGPORT/
161 $ hg pull http://localhost:$HGPORT/
160 pulling from http://localhost:$HGPORT/
162 pulling from http://localhost:$HGPORT/
161 searching for changes
163 searching for changes
162 adding changesets
164 adding changesets
163 adding manifests
165 adding manifests
164 adding file changes
166 adding file changes
165 added 6 changesets with 5 changes to 4 files
167 added 6 changesets with 5 changes to 4 files
166 (run 'hg update' to get a working copy)
168 (run 'hg update' to get a working copy)
167 $ cd ..
169 $ cd ..
168 $ cd test-2
170 $ cd test-2
169 $ hg pull -r 5 http://localhost:$HGPORT/
171 $ hg pull -r 5 http://localhost:$HGPORT/
170 pulling from http://localhost:$HGPORT/
172 pulling from http://localhost:$HGPORT/
171 searching for changes
173 searching for changes
172 adding changesets
174 adding changesets
173 adding manifests
175 adding manifests
174 adding file changes
176 adding file changes
175 added 2 changesets with 0 changes to 0 files (+1 heads)
177 added 2 changesets with 0 changes to 0 files (+1 heads)
176 (run 'hg heads' to see heads, 'hg merge' to merge)
178 (run 'hg heads' to see heads, 'hg merge' to merge)
177 $ hg verify
179 $ hg verify
178 checking changesets
180 checking changesets
179 checking manifests
181 checking manifests
180 crosschecking files in changesets and manifests
182 crosschecking files in changesets and manifests
181 checking files
183 checking files
182 1 files, 5 changesets, 3 total revisions
184 1 files, 5 changesets, 3 total revisions
183 $ hg pull http://localhost:$HGPORT/
185 $ hg pull http://localhost:$HGPORT/
184 pulling from http://localhost:$HGPORT/
186 pulling from http://localhost:$HGPORT/
185 searching for changes
187 searching for changes
186 adding changesets
188 adding changesets
187 adding manifests
189 adding manifests
188 adding file changes
190 adding file changes
189 added 4 changesets with 4 changes to 4 files
191 added 4 changesets with 4 changes to 4 files
190 (run 'hg update' to get a working copy)
192 (run 'hg update' to get a working copy)
191 $ hg verify
193 $ hg verify
192 checking changesets
194 checking changesets
193 checking manifests
195 checking manifests
194 crosschecking files in changesets and manifests
196 crosschecking files in changesets and manifests
195 checking files
197 checking files
196 4 files, 9 changesets, 7 total revisions
198 4 files, 9 changesets, 7 total revisions
197 $ cd ..
199 $ cd ..
198 $ cat error.log
200 $ cat error.log
@@ -1,120 +1,121 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg init a
3 $ hg init a
3 $ cd a
4 $ cd a
4 $ echo a > a
5 $ echo a > a
5 $ hg ci -Ama -d '1123456789 0'
6 $ hg ci -Ama -d '1123456789 0'
6 adding a
7 adding a
7 $ hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=hg.pid
8 $ hg --config server.uncompressed=True serve -p $HGPORT -d --pid-file=hg.pid
8 $ cat hg.pid >> $DAEMON_PIDS
9 $ cat hg.pid >> $DAEMON_PIDS
9 $ cd ..
10 $ cd ..
10 $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
11 $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
11 $ echo $! > proxy.pid)
12 $ echo $! > proxy.pid)
12 $ cat proxy.pid >> $DAEMON_PIDS
13 $ cat proxy.pid >> $DAEMON_PIDS
13 $ sleep 2
14 $ sleep 2
14
15
15 url for proxy, stream
16 url for proxy, stream
16
17
17 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b
18 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b
18 streaming all changes
19 streaming all changes
19 3 files to transfer, 303 bytes of data
20 3 files to transfer, 303 bytes of data
20 transferred * bytes in * seconds (*/sec) (glob)
21 transferred * bytes in * seconds (*/sec) (glob)
21 updating to branch default
22 updating to branch default
22 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
23 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
23 $ cd b
24 $ cd b
24 $ hg verify
25 $ hg verify
25 checking changesets
26 checking changesets
26 checking manifests
27 checking manifests
27 crosschecking files in changesets and manifests
28 crosschecking files in changesets and manifests
28 checking files
29 checking files
29 1 files, 1 changesets, 1 total revisions
30 1 files, 1 changesets, 1 total revisions
30 $ cd ..
31 $ cd ..
31
32
32 url for proxy, pull
33 url for proxy, pull
33
34
34 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull
35 $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone http://localhost:$HGPORT/ b-pull
35 requesting all changes
36 requesting all changes
36 adding changesets
37 adding changesets
37 adding manifests
38 adding manifests
38 adding file changes
39 adding file changes
39 added 1 changesets with 1 changes to 1 files
40 added 1 changesets with 1 changes to 1 files
40 updating to branch default
41 updating to branch default
41 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
42 $ cd b-pull
43 $ cd b-pull
43 $ hg verify
44 $ hg verify
44 checking changesets
45 checking changesets
45 checking manifests
46 checking manifests
46 crosschecking files in changesets and manifests
47 crosschecking files in changesets and manifests
47 checking files
48 checking files
48 1 files, 1 changesets, 1 total revisions
49 1 files, 1 changesets, 1 total revisions
49 $ cd ..
50 $ cd ..
50
51
51 host:port for proxy
52 host:port for proxy
52
53
53 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c
54 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ c
54 requesting all changes
55 requesting all changes
55 adding changesets
56 adding changesets
56 adding manifests
57 adding manifests
57 adding file changes
58 adding file changes
58 added 1 changesets with 1 changes to 1 files
59 added 1 changesets with 1 changes to 1 files
59 updating to branch default
60 updating to branch default
60 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
61
62
62 proxy url with user name and password
63 proxy url with user name and password
63
64
64 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d
65 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ d
65 requesting all changes
66 requesting all changes
66 adding changesets
67 adding changesets
67 adding manifests
68 adding manifests
68 adding file changes
69 adding file changes
69 added 1 changesets with 1 changes to 1 files
70 added 1 changesets with 1 changes to 1 files
70 updating to branch default
71 updating to branch default
71 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
72 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
72
73
73 url with user name and password
74 url with user name and password
74
75
75 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e
76 $ http_proxy=http://user:passwd@localhost:$HGPORT1 hg clone --config http_proxy.always=True http://user:passwd@localhost:$HGPORT/ e
76 requesting all changes
77 requesting all changes
77 adding changesets
78 adding changesets
78 adding manifests
79 adding manifests
79 adding file changes
80 adding file changes
80 added 1 changesets with 1 changes to 1 files
81 added 1 changesets with 1 changes to 1 files
81 updating to branch default
82 updating to branch default
82 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
83 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
83
84
84 bad host:port for proxy
85 bad host:port for proxy
85
86
86 $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f
87 $ http_proxy=localhost:$HGPORT2 hg clone --config http_proxy.always=True http://localhost:$HGPORT/ f
87 abort: error: Connection refused
88 abort: error: Connection refused
88 [255]
89 [255]
89
90
90 do not use the proxy if it is in the no list
91 do not use the proxy if it is in the no list
91
92
92 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g
93 $ http_proxy=localhost:$HGPORT1 hg clone --config http_proxy.no=localhost http://localhost:$HGPORT/ g
93 requesting all changes
94 requesting all changes
94 adding changesets
95 adding changesets
95 adding manifests
96 adding manifests
96 adding file changes
97 adding file changes
97 added 1 changesets with 1 changes to 1 files
98 added 1 changesets with 1 changes to 1 files
98 updating to branch default
99 updating to branch default
99 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 $ cat proxy.log
101 $ cat proxy.log
101 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
102 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
102 * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - (glob)
103 * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - (glob)
103 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
104 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
104 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
105 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
105 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
106 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
106 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
107 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
107 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
108 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
108 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
109 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
109 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
110 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
110 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
111 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
111 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
112 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
112 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
113 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
113 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
114 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
114 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
115 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
115 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
116 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
116 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
117 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
117 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
119 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
119 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
120 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
120
121
@@ -1,190 +1,191 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg init test
3 $ hg init test
3 $ cd test
4 $ cd test
4 $ echo foo>foo
5 $ echo foo>foo
5 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
6 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
6 $ echo foo>foo.d/foo
7 $ echo foo>foo.d/foo
7 $ echo bar>foo.d/bAr.hg.d/BaR
8 $ echo bar>foo.d/bAr.hg.d/BaR
8 $ echo bar>foo.d/baR.d.hg/bAR
9 $ echo bar>foo.d/baR.d.hg/bAR
9 $ hg commit -A -m 1
10 $ hg commit -A -m 1
10 adding foo
11 adding foo
11 adding foo.d/bAr.hg.d/BaR
12 adding foo.d/bAr.hg.d/BaR
12 adding foo.d/baR.d.hg/bAR
13 adding foo.d/baR.d.hg/bAR
13 adding foo.d/foo
14 adding foo.d/foo
14 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
15 $ hg serve -p $HGPORT -d --pid-file=../hg1.pid -E ../error.log
15 $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid
16 $ hg --config server.uncompressed=False serve -p $HGPORT1 -d --pid-file=../hg2.pid
16
17
17 Test server address cannot be reused
18 Test server address cannot be reused
18
19
19 $ hg serve -p $HGPORT1 2>&1
20 $ hg serve -p $HGPORT1 2>&1
20 abort: cannot start server at ':$HGPORT1': Address already in use
21 abort: cannot start server at ':$HGPORT1': Address already in use
21 [255]
22 [255]
22 $ cd ..
23 $ cd ..
23 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
24 $ cat hg1.pid hg2.pid >> $DAEMON_PIDS
24
25
25 clone via stream
26 clone via stream
26
27
27 $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1
28 $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1
28 streaming all changes
29 streaming all changes
29 6 files to transfer, 606 bytes of data
30 6 files to transfer, 606 bytes of data
30 transferred * bytes in * seconds (*/sec) (glob)
31 transferred * bytes in * seconds (*/sec) (glob)
31 updating to branch default
32 updating to branch default
32 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
33 $ hg verify -R copy
34 $ hg verify -R copy
34 checking changesets
35 checking changesets
35 checking manifests
36 checking manifests
36 crosschecking files in changesets and manifests
37 crosschecking files in changesets and manifests
37 checking files
38 checking files
38 4 files, 1 changesets, 4 total revisions
39 4 files, 1 changesets, 4 total revisions
39
40
40 try to clone via stream, should use pull instead
41 try to clone via stream, should use pull instead
41
42
42 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
43 $ hg clone --uncompressed http://localhost:$HGPORT1/ copy2
43 requesting all changes
44 requesting all changes
44 adding changesets
45 adding changesets
45 adding manifests
46 adding manifests
46 adding file changes
47 adding file changes
47 added 1 changesets with 4 changes to 4 files
48 added 1 changesets with 4 changes to 4 files
48 updating to branch default
49 updating to branch default
49 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
50 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
50
51
51 clone via pull
52 clone via pull
52
53
53 $ hg clone http://localhost:$HGPORT1/ copy-pull
54 $ hg clone http://localhost:$HGPORT1/ copy-pull
54 requesting all changes
55 requesting all changes
55 adding changesets
56 adding changesets
56 adding manifests
57 adding manifests
57 adding file changes
58 adding file changes
58 added 1 changesets with 4 changes to 4 files
59 added 1 changesets with 4 changes to 4 files
59 updating to branch default
60 updating to branch default
60 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
61 $ hg verify -R copy-pull
62 $ hg verify -R copy-pull
62 checking changesets
63 checking changesets
63 checking manifests
64 checking manifests
64 crosschecking files in changesets and manifests
65 crosschecking files in changesets and manifests
65 checking files
66 checking files
66 4 files, 1 changesets, 4 total revisions
67 4 files, 1 changesets, 4 total revisions
67 $ cd test
68 $ cd test
68 $ echo bar > bar
69 $ echo bar > bar
69 $ hg commit -A -d '1 0' -m 2
70 $ hg commit -A -d '1 0' -m 2
70 adding bar
71 adding bar
71 $ cd ..
72 $ cd ..
72
73
73 incoming via HTTP
74 incoming via HTTP
74
75
75 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
76 $ hg clone http://localhost:$HGPORT1/ --rev 0 partial
76 adding changesets
77 adding changesets
77 adding manifests
78 adding manifests
78 adding file changes
79 adding file changes
79 added 1 changesets with 4 changes to 4 files
80 added 1 changesets with 4 changes to 4 files
80 updating to branch default
81 updating to branch default
81 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
82 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
82 $ cd partial
83 $ cd partial
83 $ touch LOCAL
84 $ touch LOCAL
84 $ hg ci -qAm LOCAL
85 $ hg ci -qAm LOCAL
85 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
86 $ hg incoming http://localhost:$HGPORT1/ --template '{desc}\n'
86 comparing with http://localhost:$HGPORT1/
87 comparing with http://localhost:$HGPORT1/
87 searching for changes
88 searching for changes
88 2
89 2
89 $ cd ..
90 $ cd ..
90
91
91 pull
92 pull
92
93
93 $ cd copy-pull
94 $ cd copy-pull
94 $ echo '[hooks]' >> .hg/hgrc
95 $ echo '[hooks]' >> .hg/hgrc
95 $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup' >> .hg/hgrc
96 $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup' >> .hg/hgrc
96 $ hg pull
97 $ hg pull
97 pulling from http://localhost:$HGPORT1/
98 pulling from http://localhost:$HGPORT1/
98 searching for changes
99 searching for changes
99 adding changesets
100 adding changesets
100 adding manifests
101 adding manifests
101 adding file changes
102 adding file changes
102 added 1 changesets with 1 changes to 1 files
103 added 1 changesets with 1 changes to 1 files
103 changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=http://localhost:$HGPORT1/
104 changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=http://localhost:$HGPORT1/
104 (run 'hg update' to get a working copy)
105 (run 'hg update' to get a working copy)
105 $ cd ..
106 $ cd ..
106
107
107 clone from invalid URL
108 clone from invalid URL
108
109
109 $ hg clone http://localhost:$HGPORT/bad
110 $ hg clone http://localhost:$HGPORT/bad
110 abort: HTTP Error 404: Not Found
111 abort: HTTP Error 404: Not Found
111 [255]
112 [255]
112
113
113 test http authentication
114 test http authentication
114
115
115 $ cd test
116 $ cd test
116 $ cat << EOT > userpass.py
117 $ cat << EOT > userpass.py
117 > import base64
118 > import base64
118 > from mercurial.hgweb import common
119 > from mercurial.hgweb import common
119 > def perform_authentication(hgweb, req, op):
120 > def perform_authentication(hgweb, req, op):
120 > auth = req.env.get('HTTP_AUTHORIZATION')
121 > auth = req.env.get('HTTP_AUTHORIZATION')
121 > if not auth:
122 > if not auth:
122 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
123 > raise common.ErrorResponse(common.HTTP_UNAUTHORIZED, 'who',
123 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
124 > [('WWW-Authenticate', 'Basic Realm="mercurial"')])
124 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
125 > if base64.b64decode(auth.split()[1]).split(':', 1) != ['user', 'pass']:
125 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
126 > raise common.ErrorResponse(common.HTTP_FORBIDDEN, 'no')
126 > def extsetup():
127 > def extsetup():
127 > common.permhooks.insert(0, perform_authentication)
128 > common.permhooks.insert(0, perform_authentication)
128 > EOT
129 > EOT
129 $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid
130 $ hg --config extensions.x=userpass.py serve -p $HGPORT2 -d --pid-file=pid
130 $ cat pid >> $DAEMON_PIDS
131 $ cat pid >> $DAEMON_PIDS
131
132
132 $ hg id http://localhost:$HGPORT2/
133 $ hg id http://localhost:$HGPORT2/
133 abort: http authorization required
134 abort: http authorization required
134 [255]
135 [255]
135 $ hg id http://user@localhost:$HGPORT2/
136 $ hg id http://user@localhost:$HGPORT2/
136 abort: http authorization required
137 abort: http authorization required
137 [255]
138 [255]
138 $ hg id http://user:pass@localhost:$HGPORT2/
139 $ hg id http://user:pass@localhost:$HGPORT2/
139 5fed3813f7f5
140 5fed3813f7f5
140 $ echo '[auth]' >> .hg/hgrc
141 $ echo '[auth]' >> .hg/hgrc
141 $ echo 'l.schemes=http' >> .hg/hgrc
142 $ echo 'l.schemes=http' >> .hg/hgrc
142 $ echo 'l.prefix=lo' >> .hg/hgrc
143 $ echo 'l.prefix=lo' >> .hg/hgrc
143 $ echo 'l.username=user' >> .hg/hgrc
144 $ echo 'l.username=user' >> .hg/hgrc
144 $ echo 'l.password=pass' >> .hg/hgrc
145 $ echo 'l.password=pass' >> .hg/hgrc
145 $ hg id http://localhost:$HGPORT2/
146 $ hg id http://localhost:$HGPORT2/
146 5fed3813f7f5
147 5fed3813f7f5
147 $ hg id http://localhost:$HGPORT2/
148 $ hg id http://localhost:$HGPORT2/
148 5fed3813f7f5
149 5fed3813f7f5
149 $ hg id http://user@localhost:$HGPORT2/
150 $ hg id http://user@localhost:$HGPORT2/
150 5fed3813f7f5
151 5fed3813f7f5
151 $ hg id http://user:pass@localhost:$HGPORT2/
152 $ hg id http://user:pass@localhost:$HGPORT2/
152 5fed3813f7f5
153 5fed3813f7f5
153 $ hg id http://user2@localhost:$HGPORT2/
154 $ hg id http://user2@localhost:$HGPORT2/
154 abort: http authorization required
155 abort: http authorization required
155 [255]
156 [255]
156 $ hg id http://user:pass2@localhost:$HGPORT2/
157 $ hg id http://user:pass2@localhost:$HGPORT2/
157 abort: HTTP Error 403: no
158 abort: HTTP Error 403: no
158 [255]
159 [255]
159
160
160 $ cd ..
161 $ cd ..
161
162
162 clone of serve with repo in root and unserved subrepo (issue2970)
163 clone of serve with repo in root and unserved subrepo (issue2970)
163
164
164 $ hg --cwd test init sub
165 $ hg --cwd test init sub
165 $ hg --cwd test/sub tag something
166 $ hg --cwd test/sub tag something
166 $ echo sub = sub > test/.hgsub
167 $ echo sub = sub > test/.hgsub
167 $ hg --cwd test add .hgsub
168 $ hg --cwd test add .hgsub
168 $ hg --cwd test commit -qm 'add subrepo'
169 $ hg --cwd test commit -qm 'add subrepo'
169 $ hg clone http://localhost:$HGPORT noslash-clone
170 $ hg clone http://localhost:$HGPORT noslash-clone
170 requesting all changes
171 requesting all changes
171 adding changesets
172 adding changesets
172 adding manifests
173 adding manifests
173 adding file changes
174 adding file changes
174 added 3 changesets with 7 changes to 7 files
175 added 3 changesets with 7 changes to 7 files
175 updating to branch default
176 updating to branch default
176 abort: HTTP Error 404: Not Found
177 abort: HTTP Error 404: Not Found
177 [255]
178 [255]
178 $ hg clone http://localhost:$HGPORT/ slash-clone
179 $ hg clone http://localhost:$HGPORT/ slash-clone
179 requesting all changes
180 requesting all changes
180 adding changesets
181 adding changesets
181 adding manifests
182 adding manifests
182 adding file changes
183 adding file changes
183 added 3 changesets with 7 changes to 7 files
184 added 3 changesets with 7 changes to 7 files
184 updating to branch default
185 updating to branch default
185 abort: HTTP Error 404: Not Found
186 abort: HTTP Error 404: Not Found
186 [255]
187 [255]
187
188
188 check error log
189 check error log
189
190
190 $ cat error.log
191 $ cat error.log
@@ -1,275 +1,275 b''
1 Proper https client requires the built-in ssl from Python 2.6.
1 Proper https client requires the built-in ssl from Python 2.6.
2
2
3 $ "$TESTDIR/hghave" ssl || exit 80
3 $ "$TESTDIR/hghave" serve ssl || exit 80
4
4
5 Certificates created with:
5 Certificates created with:
6 printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \
6 printf '.\n.\n.\n.\n.\nlocalhost\nhg@localhost\n' | \
7 openssl req -newkey rsa:512 -keyout priv.pem -nodes -x509 -days 9000 -out pub.pem
7 openssl req -newkey rsa:512 -keyout priv.pem -nodes -x509 -days 9000 -out pub.pem
8 Can be dumped with:
8 Can be dumped with:
9 openssl x509 -in pub.pem -text
9 openssl x509 -in pub.pem -text
10
10
11 $ cat << EOT > priv.pem
11 $ cat << EOT > priv.pem
12 > -----BEGIN PRIVATE KEY-----
12 > -----BEGIN PRIVATE KEY-----
13 > MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEApjCWeYGrIa/Vo7LH
13 > MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEApjCWeYGrIa/Vo7LH
14 > aRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8
14 > aRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8
15 > j/xgSwIDAQABAkBxHC6+Qlf0VJXGlb6NL16yEVVTQxqDS6hA9zqu6TZjrr0YMfzc
15 > j/xgSwIDAQABAkBxHC6+Qlf0VJXGlb6NL16yEVVTQxqDS6hA9zqu6TZjrr0YMfzc
16 > EGNIiZGt7HCBL0zO+cPDg/LeCZc6HQhf0KrhAiEAzlJq4hWWzvguWFIJWSoBeBUG
16 > EGNIiZGt7HCBL0zO+cPDg/LeCZc6HQhf0KrhAiEAzlJq4hWWzvguWFIJWSoBeBUG
17 > MF1ACazQO7PYE8M0qfECIQDONHHP0SKZzz/ZwBZcAveC5K61f/v9hONFwbeYulzR
17 > MF1ACazQO7PYE8M0qfECIQDONHHP0SKZzz/ZwBZcAveC5K61f/v9hONFwbeYulzR
18 > +wIgc9SvbtgB/5Yzpp//4ZAEnR7oh5SClCvyB+KSx52K3nECICbhQphhoXmI10wy
18 > +wIgc9SvbtgB/5Yzpp//4ZAEnR7oh5SClCvyB+KSx52K3nECICbhQphhoXmI10wy
19 > aMTellaq0bpNMHFDziqH9RsqAHhjAiEAgYGxfzkftt5IUUn/iFK89aaIpyrpuaAh
19 > aMTellaq0bpNMHFDziqH9RsqAHhjAiEAgYGxfzkftt5IUUn/iFK89aaIpyrpuaAh
20 > HY8gUVkVRVs=
20 > HY8gUVkVRVs=
21 > -----END PRIVATE KEY-----
21 > -----END PRIVATE KEY-----
22 > EOT
22 > EOT
23
23
24 $ cat << EOT > pub.pem
24 $ cat << EOT > pub.pem
25 > -----BEGIN CERTIFICATE-----
25 > -----BEGIN CERTIFICATE-----
26 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV
26 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV
27 > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw
27 > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw
28 > MTAxNDIwMzAxNFoXDTM1MDYwNTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0
28 > MTAxNDIwMzAxNFoXDTM1MDYwNTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0
29 > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL
29 > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL
30 > ADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX
30 > ADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnKEUm34rDaXQd4lxxX
31 > 6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA+amm
31 > 6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA+amm
32 > r24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQw
32 > r24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQw
33 > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAFArvQFiAZJgQczRsbYlG1xl
33 > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAFArvQFiAZJgQczRsbYlG1xl
34 > t+truk37w5B3m3Ick1ntRcQrqs+hf0CO1q6Squ144geYaQ8CDirSR92fICELI1c=
34 > t+truk37w5B3m3Ick1ntRcQrqs+hf0CO1q6Squ144geYaQ8CDirSR92fICELI1c=
35 > -----END CERTIFICATE-----
35 > -----END CERTIFICATE-----
36 > EOT
36 > EOT
37 $ cat priv.pem pub.pem >> server.pem
37 $ cat priv.pem pub.pem >> server.pem
38 $ PRIV=`pwd`/server.pem
38 $ PRIV=`pwd`/server.pem
39
39
40 $ cat << EOT > pub-other.pem
40 $ cat << EOT > pub-other.pem
41 > -----BEGIN CERTIFICATE-----
41 > -----BEGIN CERTIFICATE-----
42 > MIIBqzCCAVWgAwIBAgIJALwZS731c/ORMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV
42 > MIIBqzCCAVWgAwIBAgIJALwZS731c/ORMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNV
43 > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw
43 > BAMMCWxvY2FsaG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEw
44 > MTAxNDIwNDUxNloXDTM1MDYwNTIwNDUxNlowMTESMBAGA1UEAwwJbG9jYWxob3N0
44 > MTAxNDIwNDUxNloXDTM1MDYwNTIwNDUxNlowMTESMBAGA1UEAwwJbG9jYWxob3N0
45 > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL
45 > MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhvc3QwXDANBgkqhkiG9w0BAQEFAANL
46 > ADBIAkEAsxsapLbHrqqUKuQBxdpK4G3m2LjtyrTSdpzzzFlecxd5yhNP6AyWrufo
46 > ADBIAkEAsxsapLbHrqqUKuQBxdpK4G3m2LjtyrTSdpzzzFlecxd5yhNP6AyWrufo
47 > K4VMGo2xlu9xOo88nDSUNSKPuD09MwIDAQABo1AwTjAdBgNVHQ4EFgQUoIB1iMhN
47 > K4VMGo2xlu9xOo88nDSUNSKPuD09MwIDAQABo1AwTjAdBgNVHQ4EFgQUoIB1iMhN
48 > y868rpQ2qk9dHnU6ebswHwYDVR0jBBgwFoAUoIB1iMhNy868rpQ2qk9dHnU6ebsw
48 > y868rpQ2qk9dHnU6ebswHwYDVR0jBBgwFoAUoIB1iMhNy868rpQ2qk9dHnU6ebsw
49 > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJ544f125CsE7J2t55PdFaF6
49 > DAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJ544f125CsE7J2t55PdFaF6
50 > bBlNBb91FCywBgSjhBjf+GG3TNPwrPdc3yqeq+hzJiuInqbOBv9abmMyq8Wsoig=
50 > bBlNBb91FCywBgSjhBjf+GG3TNPwrPdc3yqeq+hzJiuInqbOBv9abmMyq8Wsoig=
51 > -----END CERTIFICATE-----
51 > -----END CERTIFICATE-----
52 > EOT
52 > EOT
53
53
54 pub.pem patched with other notBefore / notAfter:
54 pub.pem patched with other notBefore / notAfter:
55
55
56 $ cat << EOT > pub-not-yet.pem
56 $ cat << EOT > pub-not-yet.pem
57 > -----BEGIN CERTIFICATE-----
57 > -----BEGIN CERTIFICATE-----
58 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs
58 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs
59 > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTM1MDYwNTIwMzAxNFoXDTM1MDYw
59 > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTM1MDYwNTIwMzAxNFoXDTM1MDYw
60 > NTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv
60 > NTIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv
61 > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK
61 > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK
62 > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA
62 > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA
63 > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T
63 > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T
64 > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJXV41gWnkgC7jcpPpFRSUSZaxyzrXmD1CIqQf0WgVDb
64 > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJXV41gWnkgC7jcpPpFRSUSZaxyzrXmD1CIqQf0WgVDb
65 > /12E0vR2DuZitgzUYtBaofM81aTtc0a2/YsrmqePGm0=
65 > /12E0vR2DuZitgzUYtBaofM81aTtc0a2/YsrmqePGm0=
66 > -----END CERTIFICATE-----
66 > -----END CERTIFICATE-----
67 > EOT
67 > EOT
68 $ cat priv.pem pub-not-yet.pem > server-not-yet.pem
68 $ cat priv.pem pub-not-yet.pem > server-not-yet.pem
69
69
70 $ cat << EOT > pub-expired.pem
70 $ cat << EOT > pub-expired.pem
71 > -----BEGIN CERTIFICATE-----
71 > -----BEGIN CERTIFICATE-----
72 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs
72 > MIIBqzCCAVWgAwIBAgIJANAXFFyWjGnRMA0GCSqGSIb3DQEBBQUAMDExEjAQBgNVBAMMCWxvY2Fs
73 > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEwMTAxNDIwMzAxNFoXDTEwMTAx
73 > aG9zdDEbMBkGCSqGSIb3DQEJARYMaGdAbG9jYWxob3N0MB4XDTEwMTAxNDIwMzAxNFoXDTEwMTAx
74 > NDIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv
74 > NDIwMzAxNFowMTESMBAGA1UEAwwJbG9jYWxob3N0MRswGQYJKoZIhvcNAQkBFgxoZ0Bsb2NhbGhv
75 > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK
75 > c3QwXDANBgkqhkiG9w0BAQEFAANLADBIAkEApjCWeYGrIa/Vo7LHaRF8ou0tbgHKE33Use/whCnK
76 > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA
76 > EUm34rDaXQd4lxxX6aDWg06n9tiVStAKTgQAHJY8j/xgSwIDAQABo1AwTjAdBgNVHQ4EFgQUE6sA
77 > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T
77 > +ammr24dGX0kpjxOgO45hzQwHwYDVR0jBBgwFoAUE6sA+ammr24dGX0kpjxOgO45hzQwDAYDVR0T
78 > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJfk57DTRf2nUbYaMSlVAARxMNbFGOjQhAUtY400GhKt
78 > BAUwAwEB/zANBgkqhkiG9w0BAQUFAANBAJfk57DTRf2nUbYaMSlVAARxMNbFGOjQhAUtY400GhKt
79 > 2uiKCNGKXVXD3AHWe13yHc5KttzbHQStE5Nm/DlWBWQ=
79 > 2uiKCNGKXVXD3AHWe13yHc5KttzbHQStE5Nm/DlWBWQ=
80 > -----END CERTIFICATE-----
80 > -----END CERTIFICATE-----
81 > EOT
81 > EOT
82 $ cat priv.pem pub-expired.pem > server-expired.pem
82 $ cat priv.pem pub-expired.pem > server-expired.pem
83
83
84 $ hg init test
84 $ hg init test
85 $ cd test
85 $ cd test
86 $ echo foo>foo
86 $ echo foo>foo
87 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
87 $ mkdir foo.d foo.d/bAr.hg.d foo.d/baR.d.hg
88 $ echo foo>foo.d/foo
88 $ echo foo>foo.d/foo
89 $ echo bar>foo.d/bAr.hg.d/BaR
89 $ echo bar>foo.d/bAr.hg.d/BaR
90 $ echo bar>foo.d/baR.d.hg/bAR
90 $ echo bar>foo.d/baR.d.hg/bAR
91 $ hg commit -A -m 1
91 $ hg commit -A -m 1
92 adding foo
92 adding foo
93 adding foo.d/bAr.hg.d/BaR
93 adding foo.d/bAr.hg.d/BaR
94 adding foo.d/baR.d.hg/bAR
94 adding foo.d/baR.d.hg/bAR
95 adding foo.d/foo
95 adding foo.d/foo
96 $ hg serve -p $HGPORT -d --pid-file=../hg0.pid --certificate=$PRIV
96 $ hg serve -p $HGPORT -d --pid-file=../hg0.pid --certificate=$PRIV
97 $ cat ../hg0.pid >> $DAEMON_PIDS
97 $ cat ../hg0.pid >> $DAEMON_PIDS
98
98
99 cacert not found
99 cacert not found
100
100
101 $ hg in --config web.cacerts=no-such.pem https://localhost:$HGPORT/
101 $ hg in --config web.cacerts=no-such.pem https://localhost:$HGPORT/
102 abort: could not find web.cacerts: no-such.pem
102 abort: could not find web.cacerts: no-such.pem
103 [255]
103 [255]
104
104
105 Test server address cannot be reused
105 Test server address cannot be reused
106
106
107 $ hg serve -p $HGPORT --certificate=$PRIV 2>&1
107 $ hg serve -p $HGPORT --certificate=$PRIV 2>&1
108 abort: cannot start server at ':$HGPORT': Address already in use
108 abort: cannot start server at ':$HGPORT': Address already in use
109 [255]
109 [255]
110 $ cd ..
110 $ cd ..
111
111
112 clone via pull
112 clone via pull
113
113
114 $ hg clone https://localhost:$HGPORT/ copy-pull
114 $ hg clone https://localhost:$HGPORT/ copy-pull
115 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
115 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
116 requesting all changes
116 requesting all changes
117 adding changesets
117 adding changesets
118 adding manifests
118 adding manifests
119 adding file changes
119 adding file changes
120 added 1 changesets with 4 changes to 4 files
120 added 1 changesets with 4 changes to 4 files
121 updating to branch default
121 updating to branch default
122 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
122 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
123 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
123 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
124 $ hg verify -R copy-pull
124 $ hg verify -R copy-pull
125 checking changesets
125 checking changesets
126 checking manifests
126 checking manifests
127 crosschecking files in changesets and manifests
127 crosschecking files in changesets and manifests
128 checking files
128 checking files
129 4 files, 1 changesets, 4 total revisions
129 4 files, 1 changesets, 4 total revisions
130 $ cd test
130 $ cd test
131 $ echo bar > bar
131 $ echo bar > bar
132 $ hg commit -A -d '1 0' -m 2
132 $ hg commit -A -d '1 0' -m 2
133 adding bar
133 adding bar
134 $ cd ..
134 $ cd ..
135
135
136 pull without cacert
136 pull without cacert
137
137
138 $ cd copy-pull
138 $ cd copy-pull
139 $ echo '[hooks]' >> .hg/hgrc
139 $ echo '[hooks]' >> .hg/hgrc
140 $ echo "changegroup = python '$TESTDIR'/printenv.py changegroup" >> .hg/hgrc
140 $ echo "changegroup = python '$TESTDIR'/printenv.py changegroup" >> .hg/hgrc
141 $ hg pull
141 $ hg pull
142 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
142 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
143 pulling from https://localhost:$HGPORT/
143 pulling from https://localhost:$HGPORT/
144 searching for changes
144 searching for changes
145 adding changesets
145 adding changesets
146 adding manifests
146 adding manifests
147 adding file changes
147 adding file changes
148 added 1 changesets with 1 changes to 1 files
148 added 1 changesets with 1 changes to 1 files
149 changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=https://localhost:$HGPORT/
149 changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=https://localhost:$HGPORT/
150 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
150 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
151 (run 'hg update' to get a working copy)
151 (run 'hg update' to get a working copy)
152 $ cd ..
152 $ cd ..
153
153
154 cacert configured in local repo
154 cacert configured in local repo
155
155
156 $ cp copy-pull/.hg/hgrc copy-pull/.hg/hgrc.bu
156 $ cp copy-pull/.hg/hgrc copy-pull/.hg/hgrc.bu
157 $ echo "[web]" >> copy-pull/.hg/hgrc
157 $ echo "[web]" >> copy-pull/.hg/hgrc
158 $ echo "cacerts=`pwd`/pub.pem" >> copy-pull/.hg/hgrc
158 $ echo "cacerts=`pwd`/pub.pem" >> copy-pull/.hg/hgrc
159 $ hg -R copy-pull pull --traceback
159 $ hg -R copy-pull pull --traceback
160 pulling from https://localhost:$HGPORT/
160 pulling from https://localhost:$HGPORT/
161 searching for changes
161 searching for changes
162 no changes found
162 no changes found
163 $ mv copy-pull/.hg/hgrc.bu copy-pull/.hg/hgrc
163 $ mv copy-pull/.hg/hgrc.bu copy-pull/.hg/hgrc
164
164
165 cacert configured globally, also testing expansion of environment
165 cacert configured globally, also testing expansion of environment
166 variables in the filename
166 variables in the filename
167
167
168 $ echo "[web]" >> $HGRCPATH
168 $ echo "[web]" >> $HGRCPATH
169 $ echo 'cacerts=$P/pub.pem' >> $HGRCPATH
169 $ echo 'cacerts=$P/pub.pem' >> $HGRCPATH
170 $ P=`pwd` hg -R copy-pull pull
170 $ P=`pwd` hg -R copy-pull pull
171 pulling from https://localhost:$HGPORT/
171 pulling from https://localhost:$HGPORT/
172 searching for changes
172 searching for changes
173 no changes found
173 no changes found
174 $ P=`pwd` hg -R copy-pull pull --insecure
174 $ P=`pwd` hg -R copy-pull pull --insecure
175 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
175 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
176 pulling from https://localhost:$HGPORT/
176 pulling from https://localhost:$HGPORT/
177 searching for changes
177 searching for changes
178 no changes found
178 no changes found
179
179
180 cacert mismatch
180 cacert mismatch
181
181
182 $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/
182 $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/
183 abort: 127.0.0.1 certificate error: certificate is for localhost (use --insecure to connect insecurely)
183 abort: 127.0.0.1 certificate error: certificate is for localhost (use --insecure to connect insecurely)
184 [255]
184 [255]
185 $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/ --insecure
185 $ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/ --insecure
186 warning: 127.0.0.1 certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
186 warning: 127.0.0.1 certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
187 pulling from https://127.0.0.1:$HGPORT/
187 pulling from https://127.0.0.1:$HGPORT/
188 searching for changes
188 searching for changes
189 no changes found
189 no changes found
190 $ hg -R copy-pull pull --config web.cacerts=pub-other.pem
190 $ hg -R copy-pull pull --config web.cacerts=pub-other.pem
191 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
191 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
192 [255]
192 [255]
193 $ hg -R copy-pull pull --config web.cacerts=pub-other.pem --insecure
193 $ hg -R copy-pull pull --config web.cacerts=pub-other.pem --insecure
194 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
194 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
195 pulling from https://localhost:$HGPORT/
195 pulling from https://localhost:$HGPORT/
196 searching for changes
196 searching for changes
197 no changes found
197 no changes found
198
198
199 Test server cert which isn't valid yet
199 Test server cert which isn't valid yet
200
200
201 $ hg -R test serve -p $HGPORT1 -d --pid-file=hg1.pid --certificate=server-not-yet.pem
201 $ hg -R test serve -p $HGPORT1 -d --pid-file=hg1.pid --certificate=server-not-yet.pem
202 $ cat hg1.pid >> $DAEMON_PIDS
202 $ cat hg1.pid >> $DAEMON_PIDS
203 $ hg -R copy-pull pull --config web.cacerts=pub-not-yet.pem https://localhost:$HGPORT1/
203 $ hg -R copy-pull pull --config web.cacerts=pub-not-yet.pem https://localhost:$HGPORT1/
204 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
204 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
205 [255]
205 [255]
206
206
207 Test server cert which no longer is valid
207 Test server cert which no longer is valid
208
208
209 $ hg -R test serve -p $HGPORT2 -d --pid-file=hg2.pid --certificate=server-expired.pem
209 $ hg -R test serve -p $HGPORT2 -d --pid-file=hg2.pid --certificate=server-expired.pem
210 $ cat hg2.pid >> $DAEMON_PIDS
210 $ cat hg2.pid >> $DAEMON_PIDS
211 $ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/
211 $ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/
212 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
212 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
213 [255]
213 [255]
214
214
215 Fingerprints
215 Fingerprints
216
216
217 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc
217 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc
218 $ echo "localhost = 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca" >> copy-pull/.hg/hgrc
218 $ echo "localhost = 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca" >> copy-pull/.hg/hgrc
219 $ echo "127.0.0.1 = 914f1aff87249c09b6859b88b1906d30756491ca" >> copy-pull/.hg/hgrc
219 $ echo "127.0.0.1 = 914f1aff87249c09b6859b88b1906d30756491ca" >> copy-pull/.hg/hgrc
220
220
221 - works without cacerts
221 - works without cacerts
222 $ hg -R copy-pull id https://localhost:$HGPORT/ --config web.cacerts=
222 $ hg -R copy-pull id https://localhost:$HGPORT/ --config web.cacerts=
223 5fed3813f7f5
223 5fed3813f7f5
224
224
225 - fails when cert doesn't match hostname (port is ignored)
225 - fails when cert doesn't match hostname (port is ignored)
226 $ hg -R copy-pull id https://localhost:$HGPORT1/
226 $ hg -R copy-pull id https://localhost:$HGPORT1/
227 abort: invalid certificate for localhost with fingerprint 28:ff:71:bf:65:31:14:23:ad:62:92:b4:0e:31:99:18:fc:83:e3:9b
227 abort: invalid certificate for localhost with fingerprint 28:ff:71:bf:65:31:14:23:ad:62:92:b4:0e:31:99:18:fc:83:e3:9b
228 [255]
228 [255]
229
229
230 - ignores that certificate doesn't match hostname
230 - ignores that certificate doesn't match hostname
231 $ hg -R copy-pull id https://127.0.0.1:$HGPORT/
231 $ hg -R copy-pull id https://127.0.0.1:$HGPORT/
232 5fed3813f7f5
232 5fed3813f7f5
233
233
234 Prepare for connecting through proxy
234 Prepare for connecting through proxy
235
235
236 $ kill `cat hg1.pid`
236 $ kill `cat hg1.pid`
237 $ sleep 1
237 $ sleep 1
238
238
239 $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
239 $ ("$TESTDIR/tinyproxy.py" $HGPORT1 localhost >proxy.log 2>&1 </dev/null &
240 $ echo $! > proxy.pid)
240 $ echo $! > proxy.pid)
241 $ cat proxy.pid >> $DAEMON_PIDS
241 $ cat proxy.pid >> $DAEMON_PIDS
242 $ sleep 2
242 $ sleep 2
243
243
244 $ echo "[http_proxy]" >> copy-pull/.hg/hgrc
244 $ echo "[http_proxy]" >> copy-pull/.hg/hgrc
245 $ echo "always=True" >> copy-pull/.hg/hgrc
245 $ echo "always=True" >> copy-pull/.hg/hgrc
246 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc
246 $ echo "[hostfingerprints]" >> copy-pull/.hg/hgrc
247 $ echo "localhost =" >> copy-pull/.hg/hgrc
247 $ echo "localhost =" >> copy-pull/.hg/hgrc
248
248
249 Test unvalidated https through proxy
249 Test unvalidated https through proxy
250
250
251 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --insecure --traceback
251 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --insecure --traceback
252 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
252 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
253 pulling from https://localhost:$HGPORT/
253 pulling from https://localhost:$HGPORT/
254 searching for changes
254 searching for changes
255 no changes found
255 no changes found
256
256
257 Test https with cacert and fingerprint through proxy
257 Test https with cacert and fingerprint through proxy
258
258
259 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub.pem
259 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub.pem
260 pulling from https://localhost:$HGPORT/
260 pulling from https://localhost:$HGPORT/
261 searching for changes
261 searching for changes
262 no changes found
262 no changes found
263 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull https://127.0.0.1:$HGPORT/
263 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull https://127.0.0.1:$HGPORT/
264 pulling from https://127.0.0.1:$HGPORT/
264 pulling from https://127.0.0.1:$HGPORT/
265 searching for changes
265 searching for changes
266 no changes found
266 no changes found
267
267
268 Test https with cert problems through proxy
268 Test https with cert problems through proxy
269
269
270 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-other.pem
270 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-other.pem
271 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
271 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
272 [255]
272 [255]
273 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/
273 $ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/
274 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
274 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
275 [255]
275 [255]
@@ -1,20 +1,20 b''
1 Test hangup signal in the middle of transaction
1 Test hangup signal in the middle of transaction
2
2
3 $ "$TESTDIR/hghave" fifo || exit 80
3 $ "$TESTDIR/hghave" serve fifo || exit 80
4 $ hg init
4 $ hg init
5 $ mkfifo p
5 $ mkfifo p
6 $ hg serve --stdio < p &
6 $ hg serve --stdio < p &
7 $ P=$!
7 $ P=$!
8 $ (echo lock; echo addchangegroup; sleep 5) > p &
8 $ (echo lock; echo addchangegroup; sleep 5) > p &
9 $ Q=$!
9 $ Q=$!
10 $ sleep 3
10 $ sleep 3
11 0
11 0
12 0
12 0
13 adding changesets
13 adding changesets
14 $ kill -HUP $P
14 $ kill -HUP $P
15 $ wait
15 $ wait
16 transaction abort!
16 transaction abort!
17 rollback completed
17 rollback completed
18 killed!
18 killed!
19 $ echo .hg/* .hg/store/*
19 $ echo .hg/* .hg/store/*
20 .hg/00changelog.i .hg/journal.bookmarks .hg/journal.branch .hg/journal.desc .hg/journal.dirstate .hg/requires .hg/store .hg/store/00changelog.i .hg/store/00changelog.i.a
20 .hg/00changelog.i .hg/journal.bookmarks .hg/journal.branch .hg/journal.desc .hg/journal.dirstate .hg/requires .hg/store .hg/store/00changelog.i .hg/store/00changelog.i.a
@@ -1,117 +1,117 b''
1 $ "$TESTDIR/hghave" no-outer-repo || exit 80
1 $ "$TESTDIR/hghave" no-outer-repo serve || exit 80
2
2
3 no repo
3 no repo
4
4
5 $ hg id
5 $ hg id
6 abort: there is no Mercurial repository here (.hg not found)
6 abort: there is no Mercurial repository here (.hg not found)
7 [255]
7 [255]
8
8
9 create repo
9 create repo
10
10
11 $ hg init test
11 $ hg init test
12 $ cd test
12 $ cd test
13 $ echo a > a
13 $ echo a > a
14 $ hg ci -Ama
14 $ hg ci -Ama
15 adding a
15 adding a
16
16
17 basic id usage
17 basic id usage
18
18
19 $ hg id
19 $ hg id
20 cb9a9f314b8b tip
20 cb9a9f314b8b tip
21 $ hg id --debug
21 $ hg id --debug
22 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b tip
22 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b tip
23 $ hg id -q
23 $ hg id -q
24 cb9a9f314b8b
24 cb9a9f314b8b
25 $ hg id -v
25 $ hg id -v
26 cb9a9f314b8b tip
26 cb9a9f314b8b tip
27
27
28 with options
28 with options
29
29
30 $ hg id -r.
30 $ hg id -r.
31 cb9a9f314b8b tip
31 cb9a9f314b8b tip
32 $ hg id -n
32 $ hg id -n
33 0
33 0
34 $ hg id -t
34 $ hg id -t
35 tip
35 tip
36 $ hg id -b
36 $ hg id -b
37 default
37 default
38 $ hg id -i
38 $ hg id -i
39 cb9a9f314b8b
39 cb9a9f314b8b
40 $ hg id -n -t -b -i
40 $ hg id -n -t -b -i
41 cb9a9f314b8b 0 default tip
41 cb9a9f314b8b 0 default tip
42
42
43 with modifications
43 with modifications
44
44
45 $ echo b > a
45 $ echo b > a
46 $ hg id -n -t -b -i
46 $ hg id -n -t -b -i
47 cb9a9f314b8b+ 0+ default tip
47 cb9a9f314b8b+ 0+ default tip
48
48
49 other local repo
49 other local repo
50
50
51 $ cd ..
51 $ cd ..
52 $ hg -R test id
52 $ hg -R test id
53 cb9a9f314b8b+ tip
53 cb9a9f314b8b+ tip
54 $ hg id test
54 $ hg id test
55 cb9a9f314b8b+ tip
55 cb9a9f314b8b+ tip
56
56
57 with remote http repo
57 with remote http repo
58
58
59 $ cd test
59 $ cd test
60 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid
60 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid
61 $ cat hg.pid >> $DAEMON_PIDS
61 $ cat hg.pid >> $DAEMON_PIDS
62 $ hg id http://localhost:$HGPORT1/
62 $ hg id http://localhost:$HGPORT1/
63 cb9a9f314b8b
63 cb9a9f314b8b
64
64
65 remote with rev number?
65 remote with rev number?
66
66
67 $ hg id -n http://localhost:$HGPORT1/
67 $ hg id -n http://localhost:$HGPORT1/
68 abort: can't query remote revision number, branch, or tags
68 abort: can't query remote revision number, branch, or tags
69 [255]
69 [255]
70
70
71 remote with tags?
71 remote with tags?
72
72
73 $ hg id -t http://localhost:$HGPORT1/
73 $ hg id -t http://localhost:$HGPORT1/
74 abort: can't query remote revision number, branch, or tags
74 abort: can't query remote revision number, branch, or tags
75 [255]
75 [255]
76
76
77 remote with branch?
77 remote with branch?
78
78
79 $ hg id -b http://localhost:$HGPORT1/
79 $ hg id -b http://localhost:$HGPORT1/
80 abort: can't query remote revision number, branch, or tags
80 abort: can't query remote revision number, branch, or tags
81 [255]
81 [255]
82
82
83 test bookmark support
83 test bookmark support
84
84
85 $ hg bookmark Y
85 $ hg bookmark Y
86 $ hg bookmark Z
86 $ hg bookmark Z
87 $ hg bookmarks
87 $ hg bookmarks
88 Y 0:cb9a9f314b8b
88 Y 0:cb9a9f314b8b
89 * Z 0:cb9a9f314b8b
89 * Z 0:cb9a9f314b8b
90 $ hg id
90 $ hg id
91 cb9a9f314b8b+ tip Y/Z
91 cb9a9f314b8b+ tip Y/Z
92 $ hg id --bookmarks
92 $ hg id --bookmarks
93 Y Z
93 Y Z
94
94
95 test remote identify with bookmarks
95 test remote identify with bookmarks
96
96
97 $ hg id http://localhost:$HGPORT1/
97 $ hg id http://localhost:$HGPORT1/
98 cb9a9f314b8b Y/Z
98 cb9a9f314b8b Y/Z
99 $ hg id --bookmarks http://localhost:$HGPORT1/
99 $ hg id --bookmarks http://localhost:$HGPORT1/
100 Y Z
100 Y Z
101 $ hg id -r . http://localhost:$HGPORT1/
101 $ hg id -r . http://localhost:$HGPORT1/
102 cb9a9f314b8b Y/Z
102 cb9a9f314b8b Y/Z
103 $ hg id --bookmarks -r . http://localhost:$HGPORT1/
103 $ hg id --bookmarks -r . http://localhost:$HGPORT1/
104 Y Z
104 Y Z
105
105
106 Make sure we do not obscure unknown requires file entries (issue2649)
106 Make sure we do not obscure unknown requires file entries (issue2649)
107
107
108 $ echo fake >> .hg/requires
108 $ echo fake >> .hg/requires
109 $ hg id
109 $ hg id
110 abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
110 abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
111 [255]
111 [255]
112
112
113 $ cd ..
113 $ cd ..
114 $ hg id test
114 $ hg id test
115 abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
115 abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
116 [255]
116 [255]
117
117
@@ -1,480 +1,482 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ hg init test
3 $ hg init test
2 $ cd test
4 $ cd test
3 $ for i in 0 1 2 3 4 5 6 7 8; do
5 $ for i in 0 1 2 3 4 5 6 7 8; do
4 > echo $i >> foo
6 > echo $i >> foo
5 > hg commit -A -m $i
7 > hg commit -A -m $i
6 > done
8 > done
7 adding foo
9 adding foo
8 $ hg verify
10 $ hg verify
9 checking changesets
11 checking changesets
10 checking manifests
12 checking manifests
11 crosschecking files in changesets and manifests
13 crosschecking files in changesets and manifests
12 checking files
14 checking files
13 1 files, 9 changesets, 9 total revisions
15 1 files, 9 changesets, 9 total revisions
14 $ hg serve -p $HGPORT -d --pid-file=hg.pid
16 $ hg serve -p $HGPORT -d --pid-file=hg.pid
15 $ cat hg.pid >> $DAEMON_PIDS
17 $ cat hg.pid >> $DAEMON_PIDS
16 $ cd ..
18 $ cd ..
17
19
18 $ hg init new
20 $ hg init new
19
21
20 http incoming
22 http incoming
21
23
22 $ hg -R new incoming http://localhost:$HGPORT/
24 $ hg -R new incoming http://localhost:$HGPORT/
23 comparing with http://localhost:$HGPORT/
25 comparing with http://localhost:$HGPORT/
24 changeset: 0:00a43fa82f62
26 changeset: 0:00a43fa82f62
25 user: test
27 user: test
26 date: Thu Jan 01 00:00:00 1970 +0000
28 date: Thu Jan 01 00:00:00 1970 +0000
27 summary: 0
29 summary: 0
28
30
29 changeset: 1:5460a410df01
31 changeset: 1:5460a410df01
30 user: test
32 user: test
31 date: Thu Jan 01 00:00:00 1970 +0000
33 date: Thu Jan 01 00:00:00 1970 +0000
32 summary: 1
34 summary: 1
33
35
34 changeset: 2:d9f42cd1a1ec
36 changeset: 2:d9f42cd1a1ec
35 user: test
37 user: test
36 date: Thu Jan 01 00:00:00 1970 +0000
38 date: Thu Jan 01 00:00:00 1970 +0000
37 summary: 2
39 summary: 2
38
40
39 changeset: 3:376476025137
41 changeset: 3:376476025137
40 user: test
42 user: test
41 date: Thu Jan 01 00:00:00 1970 +0000
43 date: Thu Jan 01 00:00:00 1970 +0000
42 summary: 3
44 summary: 3
43
45
44 changeset: 4:70d7eb252d49
46 changeset: 4:70d7eb252d49
45 user: test
47 user: test
46 date: Thu Jan 01 00:00:00 1970 +0000
48 date: Thu Jan 01 00:00:00 1970 +0000
47 summary: 4
49 summary: 4
48
50
49 changeset: 5:ad284ee3b5ee
51 changeset: 5:ad284ee3b5ee
50 user: test
52 user: test
51 date: Thu Jan 01 00:00:00 1970 +0000
53 date: Thu Jan 01 00:00:00 1970 +0000
52 summary: 5
54 summary: 5
53
55
54 changeset: 6:e9229f2de384
56 changeset: 6:e9229f2de384
55 user: test
57 user: test
56 date: Thu Jan 01 00:00:00 1970 +0000
58 date: Thu Jan 01 00:00:00 1970 +0000
57 summary: 6
59 summary: 6
58
60
59 changeset: 7:d152815bb8db
61 changeset: 7:d152815bb8db
60 user: test
62 user: test
61 date: Thu Jan 01 00:00:00 1970 +0000
63 date: Thu Jan 01 00:00:00 1970 +0000
62 summary: 7
64 summary: 7
63
65
64 changeset: 8:e4feb4ac9035
66 changeset: 8:e4feb4ac9035
65 tag: tip
67 tag: tip
66 user: test
68 user: test
67 date: Thu Jan 01 00:00:00 1970 +0000
69 date: Thu Jan 01 00:00:00 1970 +0000
68 summary: 8
70 summary: 8
69
71
70 $ hg -R new incoming -r 4 http://localhost:$HGPORT/
72 $ hg -R new incoming -r 4 http://localhost:$HGPORT/
71 comparing with http://localhost:$HGPORT/
73 comparing with http://localhost:$HGPORT/
72 changeset: 0:00a43fa82f62
74 changeset: 0:00a43fa82f62
73 user: test
75 user: test
74 date: Thu Jan 01 00:00:00 1970 +0000
76 date: Thu Jan 01 00:00:00 1970 +0000
75 summary: 0
77 summary: 0
76
78
77 changeset: 1:5460a410df01
79 changeset: 1:5460a410df01
78 user: test
80 user: test
79 date: Thu Jan 01 00:00:00 1970 +0000
81 date: Thu Jan 01 00:00:00 1970 +0000
80 summary: 1
82 summary: 1
81
83
82 changeset: 2:d9f42cd1a1ec
84 changeset: 2:d9f42cd1a1ec
83 user: test
85 user: test
84 date: Thu Jan 01 00:00:00 1970 +0000
86 date: Thu Jan 01 00:00:00 1970 +0000
85 summary: 2
87 summary: 2
86
88
87 changeset: 3:376476025137
89 changeset: 3:376476025137
88 user: test
90 user: test
89 date: Thu Jan 01 00:00:00 1970 +0000
91 date: Thu Jan 01 00:00:00 1970 +0000
90 summary: 3
92 summary: 3
91
93
92 changeset: 4:70d7eb252d49
94 changeset: 4:70d7eb252d49
93 tag: tip
95 tag: tip
94 user: test
96 user: test
95 date: Thu Jan 01 00:00:00 1970 +0000
97 date: Thu Jan 01 00:00:00 1970 +0000
96 summary: 4
98 summary: 4
97
99
98
100
99 local incoming
101 local incoming
100
102
101 $ hg -R new incoming test
103 $ hg -R new incoming test
102 comparing with test
104 comparing with test
103 changeset: 0:00a43fa82f62
105 changeset: 0:00a43fa82f62
104 user: test
106 user: test
105 date: Thu Jan 01 00:00:00 1970 +0000
107 date: Thu Jan 01 00:00:00 1970 +0000
106 summary: 0
108 summary: 0
107
109
108 changeset: 1:5460a410df01
110 changeset: 1:5460a410df01
109 user: test
111 user: test
110 date: Thu Jan 01 00:00:00 1970 +0000
112 date: Thu Jan 01 00:00:00 1970 +0000
111 summary: 1
113 summary: 1
112
114
113 changeset: 2:d9f42cd1a1ec
115 changeset: 2:d9f42cd1a1ec
114 user: test
116 user: test
115 date: Thu Jan 01 00:00:00 1970 +0000
117 date: Thu Jan 01 00:00:00 1970 +0000
116 summary: 2
118 summary: 2
117
119
118 changeset: 3:376476025137
120 changeset: 3:376476025137
119 user: test
121 user: test
120 date: Thu Jan 01 00:00:00 1970 +0000
122 date: Thu Jan 01 00:00:00 1970 +0000
121 summary: 3
123 summary: 3
122
124
123 changeset: 4:70d7eb252d49
125 changeset: 4:70d7eb252d49
124 user: test
126 user: test
125 date: Thu Jan 01 00:00:00 1970 +0000
127 date: Thu Jan 01 00:00:00 1970 +0000
126 summary: 4
128 summary: 4
127
129
128 changeset: 5:ad284ee3b5ee
130 changeset: 5:ad284ee3b5ee
129 user: test
131 user: test
130 date: Thu Jan 01 00:00:00 1970 +0000
132 date: Thu Jan 01 00:00:00 1970 +0000
131 summary: 5
133 summary: 5
132
134
133 changeset: 6:e9229f2de384
135 changeset: 6:e9229f2de384
134 user: test
136 user: test
135 date: Thu Jan 01 00:00:00 1970 +0000
137 date: Thu Jan 01 00:00:00 1970 +0000
136 summary: 6
138 summary: 6
137
139
138 changeset: 7:d152815bb8db
140 changeset: 7:d152815bb8db
139 user: test
141 user: test
140 date: Thu Jan 01 00:00:00 1970 +0000
142 date: Thu Jan 01 00:00:00 1970 +0000
141 summary: 7
143 summary: 7
142
144
143 changeset: 8:e4feb4ac9035
145 changeset: 8:e4feb4ac9035
144 tag: tip
146 tag: tip
145 user: test
147 user: test
146 date: Thu Jan 01 00:00:00 1970 +0000
148 date: Thu Jan 01 00:00:00 1970 +0000
147 summary: 8
149 summary: 8
148
150
149 $ hg -R new incoming -r 4 test
151 $ hg -R new incoming -r 4 test
150 comparing with test
152 comparing with test
151 changeset: 0:00a43fa82f62
153 changeset: 0:00a43fa82f62
152 user: test
154 user: test
153 date: Thu Jan 01 00:00:00 1970 +0000
155 date: Thu Jan 01 00:00:00 1970 +0000
154 summary: 0
156 summary: 0
155
157
156 changeset: 1:5460a410df01
158 changeset: 1:5460a410df01
157 user: test
159 user: test
158 date: Thu Jan 01 00:00:00 1970 +0000
160 date: Thu Jan 01 00:00:00 1970 +0000
159 summary: 1
161 summary: 1
160
162
161 changeset: 2:d9f42cd1a1ec
163 changeset: 2:d9f42cd1a1ec
162 user: test
164 user: test
163 date: Thu Jan 01 00:00:00 1970 +0000
165 date: Thu Jan 01 00:00:00 1970 +0000
164 summary: 2
166 summary: 2
165
167
166 changeset: 3:376476025137
168 changeset: 3:376476025137
167 user: test
169 user: test
168 date: Thu Jan 01 00:00:00 1970 +0000
170 date: Thu Jan 01 00:00:00 1970 +0000
169 summary: 3
171 summary: 3
170
172
171 changeset: 4:70d7eb252d49
173 changeset: 4:70d7eb252d49
172 user: test
174 user: test
173 date: Thu Jan 01 00:00:00 1970 +0000
175 date: Thu Jan 01 00:00:00 1970 +0000
174 summary: 4
176 summary: 4
175
177
176
178
177 limit to 2 changesets
179 limit to 2 changesets
178
180
179 $ hg -R new incoming -l 2 test
181 $ hg -R new incoming -l 2 test
180 comparing with test
182 comparing with test
181 changeset: 0:00a43fa82f62
183 changeset: 0:00a43fa82f62
182 user: test
184 user: test
183 date: Thu Jan 01 00:00:00 1970 +0000
185 date: Thu Jan 01 00:00:00 1970 +0000
184 summary: 0
186 summary: 0
185
187
186 changeset: 1:5460a410df01
188 changeset: 1:5460a410df01
187 user: test
189 user: test
188 date: Thu Jan 01 00:00:00 1970 +0000
190 date: Thu Jan 01 00:00:00 1970 +0000
189 summary: 1
191 summary: 1
190
192
191
193
192 limit to 2 changesets, test with -p --git
194 limit to 2 changesets, test with -p --git
193
195
194 $ hg -R new incoming -l 2 -p --git test
196 $ hg -R new incoming -l 2 -p --git test
195 comparing with test
197 comparing with test
196 changeset: 0:00a43fa82f62
198 changeset: 0:00a43fa82f62
197 user: test
199 user: test
198 date: Thu Jan 01 00:00:00 1970 +0000
200 date: Thu Jan 01 00:00:00 1970 +0000
199 summary: 0
201 summary: 0
200
202
201 diff --git a/foo b/foo
203 diff --git a/foo b/foo
202 new file mode 100644
204 new file mode 100644
203 --- /dev/null
205 --- /dev/null
204 +++ b/foo
206 +++ b/foo
205 @@ -0,0 +1,1 @@
207 @@ -0,0 +1,1 @@
206 +0
208 +0
207
209
208 changeset: 1:5460a410df01
210 changeset: 1:5460a410df01
209 user: test
211 user: test
210 date: Thu Jan 01 00:00:00 1970 +0000
212 date: Thu Jan 01 00:00:00 1970 +0000
211 summary: 1
213 summary: 1
212
214
213 diff --git a/foo b/foo
215 diff --git a/foo b/foo
214 --- a/foo
216 --- a/foo
215 +++ b/foo
217 +++ b/foo
216 @@ -1,1 +1,2 @@
218 @@ -1,1 +1,2 @@
217 0
219 0
218 +1
220 +1
219
221
220
222
221 test with --bundle
223 test with --bundle
222
224
223 $ hg -R new incoming --bundle test.hg http://localhost:$HGPORT/
225 $ hg -R new incoming --bundle test.hg http://localhost:$HGPORT/
224 comparing with http://localhost:$HGPORT/
226 comparing with http://localhost:$HGPORT/
225 changeset: 0:00a43fa82f62
227 changeset: 0:00a43fa82f62
226 user: test
228 user: test
227 date: Thu Jan 01 00:00:00 1970 +0000
229 date: Thu Jan 01 00:00:00 1970 +0000
228 summary: 0
230 summary: 0
229
231
230 changeset: 1:5460a410df01
232 changeset: 1:5460a410df01
231 user: test
233 user: test
232 date: Thu Jan 01 00:00:00 1970 +0000
234 date: Thu Jan 01 00:00:00 1970 +0000
233 summary: 1
235 summary: 1
234
236
235 changeset: 2:d9f42cd1a1ec
237 changeset: 2:d9f42cd1a1ec
236 user: test
238 user: test
237 date: Thu Jan 01 00:00:00 1970 +0000
239 date: Thu Jan 01 00:00:00 1970 +0000
238 summary: 2
240 summary: 2
239
241
240 changeset: 3:376476025137
242 changeset: 3:376476025137
241 user: test
243 user: test
242 date: Thu Jan 01 00:00:00 1970 +0000
244 date: Thu Jan 01 00:00:00 1970 +0000
243 summary: 3
245 summary: 3
244
246
245 changeset: 4:70d7eb252d49
247 changeset: 4:70d7eb252d49
246 user: test
248 user: test
247 date: Thu Jan 01 00:00:00 1970 +0000
249 date: Thu Jan 01 00:00:00 1970 +0000
248 summary: 4
250 summary: 4
249
251
250 changeset: 5:ad284ee3b5ee
252 changeset: 5:ad284ee3b5ee
251 user: test
253 user: test
252 date: Thu Jan 01 00:00:00 1970 +0000
254 date: Thu Jan 01 00:00:00 1970 +0000
253 summary: 5
255 summary: 5
254
256
255 changeset: 6:e9229f2de384
257 changeset: 6:e9229f2de384
256 user: test
258 user: test
257 date: Thu Jan 01 00:00:00 1970 +0000
259 date: Thu Jan 01 00:00:00 1970 +0000
258 summary: 6
260 summary: 6
259
261
260 changeset: 7:d152815bb8db
262 changeset: 7:d152815bb8db
261 user: test
263 user: test
262 date: Thu Jan 01 00:00:00 1970 +0000
264 date: Thu Jan 01 00:00:00 1970 +0000
263 summary: 7
265 summary: 7
264
266
265 changeset: 8:e4feb4ac9035
267 changeset: 8:e4feb4ac9035
266 tag: tip
268 tag: tip
267 user: test
269 user: test
268 date: Thu Jan 01 00:00:00 1970 +0000
270 date: Thu Jan 01 00:00:00 1970 +0000
269 summary: 8
271 summary: 8
270
272
271 $ hg -R new incoming --bundle test2.hg test
273 $ hg -R new incoming --bundle test2.hg test
272 comparing with test
274 comparing with test
273 changeset: 0:00a43fa82f62
275 changeset: 0:00a43fa82f62
274 user: test
276 user: test
275 date: Thu Jan 01 00:00:00 1970 +0000
277 date: Thu Jan 01 00:00:00 1970 +0000
276 summary: 0
278 summary: 0
277
279
278 changeset: 1:5460a410df01
280 changeset: 1:5460a410df01
279 user: test
281 user: test
280 date: Thu Jan 01 00:00:00 1970 +0000
282 date: Thu Jan 01 00:00:00 1970 +0000
281 summary: 1
283 summary: 1
282
284
283 changeset: 2:d9f42cd1a1ec
285 changeset: 2:d9f42cd1a1ec
284 user: test
286 user: test
285 date: Thu Jan 01 00:00:00 1970 +0000
287 date: Thu Jan 01 00:00:00 1970 +0000
286 summary: 2
288 summary: 2
287
289
288 changeset: 3:376476025137
290 changeset: 3:376476025137
289 user: test
291 user: test
290 date: Thu Jan 01 00:00:00 1970 +0000
292 date: Thu Jan 01 00:00:00 1970 +0000
291 summary: 3
293 summary: 3
292
294
293 changeset: 4:70d7eb252d49
295 changeset: 4:70d7eb252d49
294 user: test
296 user: test
295 date: Thu Jan 01 00:00:00 1970 +0000
297 date: Thu Jan 01 00:00:00 1970 +0000
296 summary: 4
298 summary: 4
297
299
298 changeset: 5:ad284ee3b5ee
300 changeset: 5:ad284ee3b5ee
299 user: test
301 user: test
300 date: Thu Jan 01 00:00:00 1970 +0000
302 date: Thu Jan 01 00:00:00 1970 +0000
301 summary: 5
303 summary: 5
302
304
303 changeset: 6:e9229f2de384
305 changeset: 6:e9229f2de384
304 user: test
306 user: test
305 date: Thu Jan 01 00:00:00 1970 +0000
307 date: Thu Jan 01 00:00:00 1970 +0000
306 summary: 6
308 summary: 6
307
309
308 changeset: 7:d152815bb8db
310 changeset: 7:d152815bb8db
309 user: test
311 user: test
310 date: Thu Jan 01 00:00:00 1970 +0000
312 date: Thu Jan 01 00:00:00 1970 +0000
311 summary: 7
313 summary: 7
312
314
313 changeset: 8:e4feb4ac9035
315 changeset: 8:e4feb4ac9035
314 tag: tip
316 tag: tip
315 user: test
317 user: test
316 date: Thu Jan 01 00:00:00 1970 +0000
318 date: Thu Jan 01 00:00:00 1970 +0000
317 summary: 8
319 summary: 8
318
320
319
321
320
322
321 test the resulting bundles
323 test the resulting bundles
322
324
323 $ hg init temp
325 $ hg init temp
324 $ hg init temp2
326 $ hg init temp2
325 $ hg -R temp unbundle test.hg
327 $ hg -R temp unbundle test.hg
326 adding changesets
328 adding changesets
327 adding manifests
329 adding manifests
328 adding file changes
330 adding file changes
329 added 9 changesets with 9 changes to 1 files
331 added 9 changesets with 9 changes to 1 files
330 (run 'hg update' to get a working copy)
332 (run 'hg update' to get a working copy)
331 $ hg -R temp2 unbundle test2.hg
333 $ hg -R temp2 unbundle test2.hg
332 adding changesets
334 adding changesets
333 adding manifests
335 adding manifests
334 adding file changes
336 adding file changes
335 added 9 changesets with 9 changes to 1 files
337 added 9 changesets with 9 changes to 1 files
336 (run 'hg update' to get a working copy)
338 (run 'hg update' to get a working copy)
337 $ hg -R temp tip
339 $ hg -R temp tip
338 changeset: 8:e4feb4ac9035
340 changeset: 8:e4feb4ac9035
339 tag: tip
341 tag: tip
340 user: test
342 user: test
341 date: Thu Jan 01 00:00:00 1970 +0000
343 date: Thu Jan 01 00:00:00 1970 +0000
342 summary: 8
344 summary: 8
343
345
344 $ hg -R temp2 tip
346 $ hg -R temp2 tip
345 changeset: 8:e4feb4ac9035
347 changeset: 8:e4feb4ac9035
346 tag: tip
348 tag: tip
347 user: test
349 user: test
348 date: Thu Jan 01 00:00:00 1970 +0000
350 date: Thu Jan 01 00:00:00 1970 +0000
349 summary: 8
351 summary: 8
350
352
351
353
352 $ rm -r temp temp2 new
354 $ rm -r temp temp2 new
353
355
354 test outgoing
356 test outgoing
355
357
356 $ hg clone test test-dev
358 $ hg clone test test-dev
357 updating to branch default
359 updating to branch default
358 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
360 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
359 $ cd test-dev
361 $ cd test-dev
360 $ for i in 9 10 11 12 13; do
362 $ for i in 9 10 11 12 13; do
361 > echo $i >> foo
363 > echo $i >> foo
362 > hg commit -A -m $i
364 > hg commit -A -m $i
363 > done
365 > done
364 $ hg verify
366 $ hg verify
365 checking changesets
367 checking changesets
366 checking manifests
368 checking manifests
367 crosschecking files in changesets and manifests
369 crosschecking files in changesets and manifests
368 checking files
370 checking files
369 1 files, 14 changesets, 14 total revisions
371 1 files, 14 changesets, 14 total revisions
370 $ cd ..
372 $ cd ..
371 $ hg -R test-dev outgoing test
373 $ hg -R test-dev outgoing test
372 comparing with test
374 comparing with test
373 searching for changes
375 searching for changes
374 changeset: 9:d89d4abea5bc
376 changeset: 9:d89d4abea5bc
375 user: test
377 user: test
376 date: Thu Jan 01 00:00:00 1970 +0000
378 date: Thu Jan 01 00:00:00 1970 +0000
377 summary: 9
379 summary: 9
378
380
379 changeset: 10:820095aa7158
381 changeset: 10:820095aa7158
380 user: test
382 user: test
381 date: Thu Jan 01 00:00:00 1970 +0000
383 date: Thu Jan 01 00:00:00 1970 +0000
382 summary: 10
384 summary: 10
383
385
384 changeset: 11:09ede2f3a638
386 changeset: 11:09ede2f3a638
385 user: test
387 user: test
386 date: Thu Jan 01 00:00:00 1970 +0000
388 date: Thu Jan 01 00:00:00 1970 +0000
387 summary: 11
389 summary: 11
388
390
389 changeset: 12:e576b1bed305
391 changeset: 12:e576b1bed305
390 user: test
392 user: test
391 date: Thu Jan 01 00:00:00 1970 +0000
393 date: Thu Jan 01 00:00:00 1970 +0000
392 summary: 12
394 summary: 12
393
395
394 changeset: 13:96bbff09a7cc
396 changeset: 13:96bbff09a7cc
395 tag: tip
397 tag: tip
396 user: test
398 user: test
397 date: Thu Jan 01 00:00:00 1970 +0000
399 date: Thu Jan 01 00:00:00 1970 +0000
398 summary: 13
400 summary: 13
399
401
400
402
401 limit to 3 changesets
403 limit to 3 changesets
402
404
403 $ hg -R test-dev outgoing -l 3 test
405 $ hg -R test-dev outgoing -l 3 test
404 comparing with test
406 comparing with test
405 searching for changes
407 searching for changes
406 changeset: 9:d89d4abea5bc
408 changeset: 9:d89d4abea5bc
407 user: test
409 user: test
408 date: Thu Jan 01 00:00:00 1970 +0000
410 date: Thu Jan 01 00:00:00 1970 +0000
409 summary: 9
411 summary: 9
410
412
411 changeset: 10:820095aa7158
413 changeset: 10:820095aa7158
412 user: test
414 user: test
413 date: Thu Jan 01 00:00:00 1970 +0000
415 date: Thu Jan 01 00:00:00 1970 +0000
414 summary: 10
416 summary: 10
415
417
416 changeset: 11:09ede2f3a638
418 changeset: 11:09ede2f3a638
417 user: test
419 user: test
418 date: Thu Jan 01 00:00:00 1970 +0000
420 date: Thu Jan 01 00:00:00 1970 +0000
419 summary: 11
421 summary: 11
420
422
421 $ hg -R test-dev outgoing http://localhost:$HGPORT/
423 $ hg -R test-dev outgoing http://localhost:$HGPORT/
422 comparing with http://localhost:$HGPORT/
424 comparing with http://localhost:$HGPORT/
423 searching for changes
425 searching for changes
424 changeset: 9:d89d4abea5bc
426 changeset: 9:d89d4abea5bc
425 user: test
427 user: test
426 date: Thu Jan 01 00:00:00 1970 +0000
428 date: Thu Jan 01 00:00:00 1970 +0000
427 summary: 9
429 summary: 9
428
430
429 changeset: 10:820095aa7158
431 changeset: 10:820095aa7158
430 user: test
432 user: test
431 date: Thu Jan 01 00:00:00 1970 +0000
433 date: Thu Jan 01 00:00:00 1970 +0000
432 summary: 10
434 summary: 10
433
435
434 changeset: 11:09ede2f3a638
436 changeset: 11:09ede2f3a638
435 user: test
437 user: test
436 date: Thu Jan 01 00:00:00 1970 +0000
438 date: Thu Jan 01 00:00:00 1970 +0000
437 summary: 11
439 summary: 11
438
440
439 changeset: 12:e576b1bed305
441 changeset: 12:e576b1bed305
440 user: test
442 user: test
441 date: Thu Jan 01 00:00:00 1970 +0000
443 date: Thu Jan 01 00:00:00 1970 +0000
442 summary: 12
444 summary: 12
443
445
444 changeset: 13:96bbff09a7cc
446 changeset: 13:96bbff09a7cc
445 tag: tip
447 tag: tip
446 user: test
448 user: test
447 date: Thu Jan 01 00:00:00 1970 +0000
449 date: Thu Jan 01 00:00:00 1970 +0000
448 summary: 13
450 summary: 13
449
451
450 $ hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/
452 $ hg -R test-dev outgoing -r 11 http://localhost:$HGPORT/
451 comparing with http://localhost:$HGPORT/
453 comparing with http://localhost:$HGPORT/
452 searching for changes
454 searching for changes
453 changeset: 9:d89d4abea5bc
455 changeset: 9:d89d4abea5bc
454 user: test
456 user: test
455 date: Thu Jan 01 00:00:00 1970 +0000
457 date: Thu Jan 01 00:00:00 1970 +0000
456 summary: 9
458 summary: 9
457
459
458 changeset: 10:820095aa7158
460 changeset: 10:820095aa7158
459 user: test
461 user: test
460 date: Thu Jan 01 00:00:00 1970 +0000
462 date: Thu Jan 01 00:00:00 1970 +0000
461 summary: 10
463 summary: 10
462
464
463 changeset: 11:09ede2f3a638
465 changeset: 11:09ede2f3a638
464 user: test
466 user: test
465 date: Thu Jan 01 00:00:00 1970 +0000
467 date: Thu Jan 01 00:00:00 1970 +0000
466 summary: 11
468 summary: 11
467
469
468
470
469 incoming from empty remote repository
471 incoming from empty remote repository
470
472
471 $ hg init r1
473 $ hg init r1
472 $ hg init r2
474 $ hg init r2
473 $ echo a > r1/foo
475 $ echo a > r1/foo
474 $ hg -R r1 ci -Ama
476 $ hg -R r1 ci -Ama
475 adding foo
477 adding foo
476 $ hg -R r1 incoming r2 --bundle x.hg
478 $ hg -R r1 incoming r2 --bundle x.hg
477 comparing with r2
479 comparing with r2
478 searching for changes
480 searching for changes
479 no changes found
481 no changes found
480 [1]
482 [1]
@@ -1,29 +1,31 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ hg init test
3 $ hg init test
2 $ cd test
4 $ cd test
3
5
4 $ cat > .hg/hgrc <<EOF
6 $ cat > .hg/hgrc <<EOF
5 > [extensions]
7 > [extensions]
6 > interhg =
8 > interhg =
7 >
9 >
8 > [interhg]
10 > [interhg]
9 > issues = s|Issue(\d+)|<a href="http://bts.example.org/issue\1">Issue\1</a>|
11 > issues = s|Issue(\d+)|<a href="http://bts.example.org/issue\1">Issue\1</a>|
10 >
12 >
11 > # yes, 'x' is a weird delimiter...
13 > # yes, 'x' is a weird delimiter...
12 > markbugs = sxbugx<i class="\x">bug</i>x
14 > markbugs = sxbugx<i class="\x">bug</i>x
13 > EOF
15 > EOF
14
16
15 $ touch foo
17 $ touch foo
16 $ hg add foo
18 $ hg add foo
17 $ hg commit -d '1 0' -m 'Issue123: fixed the bug!'
19 $ hg commit -d '1 0' -m 'Issue123: fixed the bug!'
18
20
19 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
21 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
20 $ cat hg.pid >> $DAEMON_PIDS
22 $ cat hg.pid >> $DAEMON_PIDS
21
23
22 log
24 log
23
25
24 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/' | grep bts
26 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/' | grep bts
25 <td class="description"><a href="/rev/1b0e7ece6bd6"><a href="http://bts.example.org/issue123">Issue123</a>: fixed the <i class="x">bug</i>!</a><span class="branchhead">default</span> <span class="tag">tip</span> </td>
27 <td class="description"><a href="/rev/1b0e7ece6bd6"><a href="http://bts.example.org/issue123">Issue123</a>: fixed the <i class="x">bug</i>!</a><span class="branchhead">default</span> <span class="tag">tip</span> </td>
26
28
27 errors
29 errors
28
30
29 $ cat errors.log
31 $ cat errors.log
@@ -1,1085 +1,1085 b''
1 $ "$TESTDIR/hghave" symlink unix-permissions || exit 80
1 $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80
2
2
3 $ cat <<EOF >> $HGRCPATH
3 $ cat <<EOF >> $HGRCPATH
4 > [extensions]
4 > [extensions]
5 > keyword =
5 > keyword =
6 > mq =
6 > mq =
7 > notify =
7 > notify =
8 > record =
8 > record =
9 > transplant =
9 > transplant =
10 > [ui]
10 > [ui]
11 > interactive = true
11 > interactive = true
12 > EOF
12 > EOF
13
13
14 Run kwdemo before [keyword] files are set up
14 Run kwdemo before [keyword] files are set up
15 as it would succeed without uisetup otherwise
15 as it would succeed without uisetup otherwise
16
16
17 $ hg --quiet kwdemo
17 $ hg --quiet kwdemo
18 [extensions]
18 [extensions]
19 keyword =
19 keyword =
20 [keyword]
20 [keyword]
21 demo.txt =
21 demo.txt =
22 [keywordset]
22 [keywordset]
23 svn = False
23 svn = False
24 [keywordmaps]
24 [keywordmaps]
25 Author = {author|user}
25 Author = {author|user}
26 Date = {date|utcdate}
26 Date = {date|utcdate}
27 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
27 Header = {root}/{file},v {node|short} {date|utcdate} {author|user}
28 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
28 Id = {file|basename},v {node|short} {date|utcdate} {author|user}
29 RCSFile = {file|basename},v
29 RCSFile = {file|basename},v
30 RCSfile = {file|basename},v
30 RCSfile = {file|basename},v
31 Revision = {node|short}
31 Revision = {node|short}
32 Source = {root}/{file},v
32 Source = {root}/{file},v
33 $Author: test $
33 $Author: test $
34 $Date: ????/??/?? ??:??:?? $ (glob)
34 $Date: ????/??/?? ??:??:?? $ (glob)
35 $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
35 $Header: */demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
36 $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
36 $Id: demo.txt,v ???????????? ????/??/?? ??:??:?? test $ (glob)
37 $RCSFile: demo.txt,v $
37 $RCSFile: demo.txt,v $
38 $RCSfile: demo.txt,v $
38 $RCSfile: demo.txt,v $
39 $Revision: ???????????? $ (glob)
39 $Revision: ???????????? $ (glob)
40 $Source: */demo.txt,v $ (glob)
40 $Source: */demo.txt,v $ (glob)
41
41
42 $ hg --quiet kwdemo "Branch = {branches}"
42 $ hg --quiet kwdemo "Branch = {branches}"
43 [extensions]
43 [extensions]
44 keyword =
44 keyword =
45 [keyword]
45 [keyword]
46 demo.txt =
46 demo.txt =
47 [keywordset]
47 [keywordset]
48 svn = False
48 svn = False
49 [keywordmaps]
49 [keywordmaps]
50 Branch = {branches}
50 Branch = {branches}
51 $Branch: demobranch $
51 $Branch: demobranch $
52
52
53 $ cat <<EOF >> $HGRCPATH
53 $ cat <<EOF >> $HGRCPATH
54 > [keyword]
54 > [keyword]
55 > ** =
55 > ** =
56 > b = ignore
56 > b = ignore
57 > i = ignore
57 > i = ignore
58 > [hooks]
58 > [hooks]
59 > EOF
59 > EOF
60 $ cp $HGRCPATH $HGRCPATH.nohooks
60 $ cp $HGRCPATH $HGRCPATH.nohooks
61 > cat <<EOF >> $HGRCPATH
61 > cat <<EOF >> $HGRCPATH
62 > commit=
62 > commit=
63 > commit.test=cp a hooktest
63 > commit.test=cp a hooktest
64 > EOF
64 > EOF
65
65
66 $ hg init Test-bndl
66 $ hg init Test-bndl
67 $ cd Test-bndl
67 $ cd Test-bndl
68
68
69 kwshrink should exit silently in empty/invalid repo
69 kwshrink should exit silently in empty/invalid repo
70
70
71 $ hg kwshrink
71 $ hg kwshrink
72
72
73 Symlinks cannot be created on Windows.
73 Symlinks cannot be created on Windows.
74 A bundle to test this was made with:
74 A bundle to test this was made with:
75 hg init t
75 hg init t
76 cd t
76 cd t
77 echo a > a
77 echo a > a
78 ln -s a sym
78 ln -s a sym
79 hg add sym
79 hg add sym
80 hg ci -m addsym -u mercurial
80 hg ci -m addsym -u mercurial
81 hg bundle --base null ../test-keyword.hg
81 hg bundle --base null ../test-keyword.hg
82
82
83 $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg
83 $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg
84 pulling from *test-keyword.hg (glob)
84 pulling from *test-keyword.hg (glob)
85 requesting all changes
85 requesting all changes
86 adding changesets
86 adding changesets
87 adding manifests
87 adding manifests
88 adding file changes
88 adding file changes
89 added 1 changesets with 1 changes to 1 files
89 added 1 changesets with 1 changes to 1 files
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
91
91
92 $ echo 'expand $Id$' > a
92 $ echo 'expand $Id$' > a
93 $ echo 'do not process $Id:' >> a
93 $ echo 'do not process $Id:' >> a
94 $ echo 'xxx $' >> a
94 $ echo 'xxx $' >> a
95 $ echo 'ignore $Id$' > b
95 $ echo 'ignore $Id$' > b
96
96
97 Output files as they were created
97 Output files as they were created
98
98
99 $ cat a b
99 $ cat a b
100 expand $Id$
100 expand $Id$
101 do not process $Id:
101 do not process $Id:
102 xxx $
102 xxx $
103 ignore $Id$
103 ignore $Id$
104
104
105 no kwfiles
105 no kwfiles
106
106
107 $ hg kwfiles
107 $ hg kwfiles
108
108
109 untracked candidates
109 untracked candidates
110
110
111 $ hg -v kwfiles --unknown
111 $ hg -v kwfiles --unknown
112 k a
112 k a
113
113
114 Add files and check status
114 Add files and check status
115
115
116 $ hg addremove
116 $ hg addremove
117 adding a
117 adding a
118 adding b
118 adding b
119 $ hg status
119 $ hg status
120 A a
120 A a
121 A b
121 A b
122
122
123
123
124 Default keyword expansion including commit hook
124 Default keyword expansion including commit hook
125 Interrupted commit should not change state or run commit hook
125 Interrupted commit should not change state or run commit hook
126
126
127 $ hg --debug commit
127 $ hg --debug commit
128 abort: empty commit message
128 abort: empty commit message
129 [255]
129 [255]
130 $ hg status
130 $ hg status
131 A a
131 A a
132 A b
132 A b
133
133
134 Commit with several checks
134 Commit with several checks
135
135
136 $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
136 $ hg --debug commit -mabsym -u 'User Name <user@example.com>'
137 a
137 a
138 b
138 b
139 overwriting a expanding keywords
139 overwriting a expanding keywords
140 running hook commit.test: cp a hooktest
140 running hook commit.test: cp a hooktest
141 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
141 committed changeset 1:ef63ca68695bc9495032c6fda1350c71e6d256e9
142 $ hg status
142 $ hg status
143 ? hooktest
143 ? hooktest
144 $ hg debugrebuildstate
144 $ hg debugrebuildstate
145 $ hg --quiet identify
145 $ hg --quiet identify
146 ef63ca68695b
146 ef63ca68695b
147
147
148 cat files in working directory with keywords expanded
148 cat files in working directory with keywords expanded
149
149
150 $ cat a b
150 $ cat a b
151 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
151 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
152 do not process $Id:
152 do not process $Id:
153 xxx $
153 xxx $
154 ignore $Id$
154 ignore $Id$
155
155
156 hg cat files and symlink, no expansion
156 hg cat files and symlink, no expansion
157
157
158 $ hg cat sym a b && echo
158 $ hg cat sym a b && echo
159 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
159 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
160 do not process $Id:
160 do not process $Id:
161 xxx $
161 xxx $
162 ignore $Id$
162 ignore $Id$
163 a
163 a
164
164
165 Test hook execution
165 Test hook execution
166
166
167 $ diff a hooktest
167 $ diff a hooktest
168
168
169 $ cp $HGRCPATH.nohooks $HGRCPATH
169 $ cp $HGRCPATH.nohooks $HGRCPATH
170 $ rm hooktest
170 $ rm hooktest
171
171
172 bundle
172 bundle
173
173
174 $ hg bundle --base null ../kw.hg
174 $ hg bundle --base null ../kw.hg
175 2 changesets found
175 2 changesets found
176 $ cd ..
176 $ cd ..
177 $ hg init Test
177 $ hg init Test
178 $ cd Test
178 $ cd Test
179
179
180 Notify on pull to check whether keywords stay as is in email
180 Notify on pull to check whether keywords stay as is in email
181 ie. if patch.diff wrapper acts as it should
181 ie. if patch.diff wrapper acts as it should
182
182
183 $ cat <<EOF >> $HGRCPATH
183 $ cat <<EOF >> $HGRCPATH
184 > [hooks]
184 > [hooks]
185 > incoming.notify = python:hgext.notify.hook
185 > incoming.notify = python:hgext.notify.hook
186 > [notify]
186 > [notify]
187 > sources = pull
187 > sources = pull
188 > diffstat = False
188 > diffstat = False
189 > maxsubject = 15
189 > maxsubject = 15
190 > [reposubs]
190 > [reposubs]
191 > * = Test
191 > * = Test
192 > EOF
192 > EOF
193
193
194 Pull from bundle and trigger notify
194 Pull from bundle and trigger notify
195
195
196 $ hg pull -u ../kw.hg
196 $ hg pull -u ../kw.hg
197 pulling from ../kw.hg
197 pulling from ../kw.hg
198 requesting all changes
198 requesting all changes
199 adding changesets
199 adding changesets
200 adding manifests
200 adding manifests
201 adding file changes
201 adding file changes
202 added 2 changesets with 3 changes to 3 files
202 added 2 changesets with 3 changes to 3 files
203 Content-Type: text/plain; charset="us-ascii"
203 Content-Type: text/plain; charset="us-ascii"
204 MIME-Version: 1.0
204 MIME-Version: 1.0
205 Content-Transfer-Encoding: 7bit
205 Content-Transfer-Encoding: 7bit
206 Date: * (glob)
206 Date: * (glob)
207 Subject: changeset in...
207 Subject: changeset in...
208 From: mercurial
208 From: mercurial
209 X-Hg-Notification: changeset a2392c293916
209 X-Hg-Notification: changeset a2392c293916
210 Message-Id: <hg.a2392c293916*> (glob)
210 Message-Id: <hg.a2392c293916*> (glob)
211 To: Test
211 To: Test
212
212
213 changeset a2392c293916 in $TESTTMP/Test
213 changeset a2392c293916 in $TESTTMP/Test
214 details: $TESTTMP/Test?cmd=changeset;node=a2392c293916
214 details: $TESTTMP/Test?cmd=changeset;node=a2392c293916
215 description:
215 description:
216 addsym
216 addsym
217
217
218 diffs (6 lines):
218 diffs (6 lines):
219
219
220 diff -r 000000000000 -r a2392c293916 sym
220 diff -r 000000000000 -r a2392c293916 sym
221 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
221 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
222 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
222 +++ b/sym Sat Feb 09 20:25:47 2008 +0100
223 @@ -0,0 +1,1 @@
223 @@ -0,0 +1,1 @@
224 +a
224 +a
225 \ No newline at end of file
225 \ No newline at end of file
226 Content-Type: text/plain; charset="us-ascii"
226 Content-Type: text/plain; charset="us-ascii"
227 MIME-Version: 1.0
227 MIME-Version: 1.0
228 Content-Transfer-Encoding: 7bit
228 Content-Transfer-Encoding: 7bit
229 Date:* (glob)
229 Date:* (glob)
230 Subject: changeset in...
230 Subject: changeset in...
231 From: User Name <user@example.com>
231 From: User Name <user@example.com>
232 X-Hg-Notification: changeset ef63ca68695b
232 X-Hg-Notification: changeset ef63ca68695b
233 Message-Id: <hg.ef63ca68695b*> (glob)
233 Message-Id: <hg.ef63ca68695b*> (glob)
234 To: Test
234 To: Test
235
235
236 changeset ef63ca68695b in $TESTTMP/Test
236 changeset ef63ca68695b in $TESTTMP/Test
237 details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b
237 details: $TESTTMP/Test?cmd=changeset;node=ef63ca68695b
238 description:
238 description:
239 absym
239 absym
240
240
241 diffs (12 lines):
241 diffs (12 lines):
242
242
243 diff -r a2392c293916 -r ef63ca68695b a
243 diff -r a2392c293916 -r ef63ca68695b a
244 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
244 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
245 +++ b/a Thu Jan 01 00:00:00 1970 +0000
245 +++ b/a Thu Jan 01 00:00:00 1970 +0000
246 @@ -0,0 +1,3 @@
246 @@ -0,0 +1,3 @@
247 +expand $Id$
247 +expand $Id$
248 +do not process $Id:
248 +do not process $Id:
249 +xxx $
249 +xxx $
250 diff -r a2392c293916 -r ef63ca68695b b
250 diff -r a2392c293916 -r ef63ca68695b b
251 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
251 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
252 +++ b/b Thu Jan 01 00:00:00 1970 +0000
252 +++ b/b Thu Jan 01 00:00:00 1970 +0000
253 @@ -0,0 +1,1 @@
253 @@ -0,0 +1,1 @@
254 +ignore $Id$
254 +ignore $Id$
255 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
255 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
256
256
257 $ cp $HGRCPATH.nohooks $HGRCPATH
257 $ cp $HGRCPATH.nohooks $HGRCPATH
258
258
259 Touch files and check with status
259 Touch files and check with status
260
260
261 $ touch a b
261 $ touch a b
262 $ hg status
262 $ hg status
263
263
264 Update and expand
264 Update and expand
265
265
266 $ rm sym a b
266 $ rm sym a b
267 $ hg update -C
267 $ hg update -C
268 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
268 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
269 $ cat a b
269 $ cat a b
270 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
270 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
271 do not process $Id:
271 do not process $Id:
272 xxx $
272 xxx $
273 ignore $Id$
273 ignore $Id$
274
274
275 Check whether expansion is filewise and file mode is preserved
275 Check whether expansion is filewise and file mode is preserved
276
276
277 $ echo '$Id$' > c
277 $ echo '$Id$' > c
278 $ echo 'tests for different changenodes' >> c
278 $ echo 'tests for different changenodes' >> c
279 $ chmod 600 c
279 $ chmod 600 c
280 $ ls -l c | cut -b 1-10
280 $ ls -l c | cut -b 1-10
281 -rw-------
281 -rw-------
282
282
283 commit file c
283 commit file c
284
284
285 $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
285 $ hg commit -A -mcndiff -d '1 0' -u 'User Name <user@example.com>'
286 adding c
286 adding c
287 $ ls -l c | cut -b 1-10
287 $ ls -l c | cut -b 1-10
288 -rw-------
288 -rw-------
289
289
290 force expansion
290 force expansion
291
291
292 $ hg -v kwexpand
292 $ hg -v kwexpand
293 overwriting a expanding keywords
293 overwriting a expanding keywords
294 overwriting c expanding keywords
294 overwriting c expanding keywords
295
295
296 compare changenodes in a and c
296 compare changenodes in a and c
297
297
298 $ cat a c
298 $ cat a c
299 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
299 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
300 do not process $Id:
300 do not process $Id:
301 xxx $
301 xxx $
302 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
302 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
303 tests for different changenodes
303 tests for different changenodes
304
304
305 record
305 record
306
306
307 $ echo '$Id$' > r
307 $ echo '$Id$' > r
308 $ hg add r
308 $ hg add r
309
309
310 record chunk
310 record chunk
311
311
312 $ python -c \
312 $ python -c \
313 > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
313 > 'l=open("a").readlines();l.insert(1,"foo\n");l.append("bar\n");open("a","w").writelines(l);'
314 $ hg record -d '1 10' -m rectest a<<EOF
314 $ hg record -d '1 10' -m rectest a<<EOF
315 > y
315 > y
316 > y
316 > y
317 > n
317 > n
318 > EOF
318 > EOF
319 diff --git a/a b/a
319 diff --git a/a b/a
320 2 hunks, 2 lines changed
320 2 hunks, 2 lines changed
321 examine changes to 'a'? [Ynsfdaq?]
321 examine changes to 'a'? [Ynsfdaq?]
322 @@ -1,3 +1,4 @@
322 @@ -1,3 +1,4 @@
323 expand $Id$
323 expand $Id$
324 +foo
324 +foo
325 do not process $Id:
325 do not process $Id:
326 xxx $
326 xxx $
327 record change 1/2 to 'a'? [Ynsfdaq?]
327 record change 1/2 to 'a'? [Ynsfdaq?]
328 @@ -2,2 +3,3 @@
328 @@ -2,2 +3,3 @@
329 do not process $Id:
329 do not process $Id:
330 xxx $
330 xxx $
331 +bar
331 +bar
332 record change 2/2 to 'a'? [Ynsfdaq?]
332 record change 2/2 to 'a'? [Ynsfdaq?]
333
333
334 $ hg identify
334 $ hg identify
335 d17e03c92c97+ tip
335 d17e03c92c97+ tip
336 $ hg status
336 $ hg status
337 M a
337 M a
338 A r
338 A r
339
339
340 Cat modified file a
340 Cat modified file a
341
341
342 $ cat a
342 $ cat a
343 expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
343 expand $Id: a,v d17e03c92c97 1970/01/01 00:00:01 test $
344 foo
344 foo
345 do not process $Id:
345 do not process $Id:
346 xxx $
346 xxx $
347 bar
347 bar
348
348
349 Diff remaining chunk
349 Diff remaining chunk
350
350
351 $ hg diff a
351 $ hg diff a
352 diff -r d17e03c92c97 a
352 diff -r d17e03c92c97 a
353 --- a/a Wed Dec 31 23:59:51 1969 -0000
353 --- a/a Wed Dec 31 23:59:51 1969 -0000
354 +++ b/a * (glob)
354 +++ b/a * (glob)
355 @@ -2,3 +2,4 @@
355 @@ -2,3 +2,4 @@
356 foo
356 foo
357 do not process $Id:
357 do not process $Id:
358 xxx $
358 xxx $
359 +bar
359 +bar
360
360
361 $ hg rollback
361 $ hg rollback
362 repository tip rolled back to revision 2 (undo commit)
362 repository tip rolled back to revision 2 (undo commit)
363 working directory now based on revision 2
363 working directory now based on revision 2
364
364
365 Record all chunks in file a
365 Record all chunks in file a
366
366
367 $ echo foo > msg
367 $ echo foo > msg
368
368
369 - do not use "hg record -m" here!
369 - do not use "hg record -m" here!
370
370
371 $ hg record -l msg -d '1 11' a<<EOF
371 $ hg record -l msg -d '1 11' a<<EOF
372 > y
372 > y
373 > y
373 > y
374 > y
374 > y
375 > EOF
375 > EOF
376 diff --git a/a b/a
376 diff --git a/a b/a
377 2 hunks, 2 lines changed
377 2 hunks, 2 lines changed
378 examine changes to 'a'? [Ynsfdaq?]
378 examine changes to 'a'? [Ynsfdaq?]
379 @@ -1,3 +1,4 @@
379 @@ -1,3 +1,4 @@
380 expand $Id$
380 expand $Id$
381 +foo
381 +foo
382 do not process $Id:
382 do not process $Id:
383 xxx $
383 xxx $
384 record change 1/2 to 'a'? [Ynsfdaq?]
384 record change 1/2 to 'a'? [Ynsfdaq?]
385 @@ -2,2 +3,3 @@
385 @@ -2,2 +3,3 @@
386 do not process $Id:
386 do not process $Id:
387 xxx $
387 xxx $
388 +bar
388 +bar
389 record change 2/2 to 'a'? [Ynsfdaq?]
389 record change 2/2 to 'a'? [Ynsfdaq?]
390
390
391 File a should be clean
391 File a should be clean
392
392
393 $ hg status -A a
393 $ hg status -A a
394 C a
394 C a
395
395
396 rollback and revert expansion
396 rollback and revert expansion
397
397
398 $ cat a
398 $ cat a
399 expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
399 expand $Id: a,v 59f969a3b52c 1970/01/01 00:00:01 test $
400 foo
400 foo
401 do not process $Id:
401 do not process $Id:
402 xxx $
402 xxx $
403 bar
403 bar
404 $ hg --verbose rollback
404 $ hg --verbose rollback
405 repository tip rolled back to revision 2 (undo commit)
405 repository tip rolled back to revision 2 (undo commit)
406 working directory now based on revision 2
406 working directory now based on revision 2
407 overwriting a expanding keywords
407 overwriting a expanding keywords
408 $ hg status a
408 $ hg status a
409 M a
409 M a
410 $ cat a
410 $ cat a
411 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
411 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
412 foo
412 foo
413 do not process $Id:
413 do not process $Id:
414 xxx $
414 xxx $
415 bar
415 bar
416 $ echo '$Id$' > y
416 $ echo '$Id$' > y
417 $ echo '$Id$' > z
417 $ echo '$Id$' > z
418 $ hg add y
418 $ hg add y
419 $ hg commit -Am "rollback only" z
419 $ hg commit -Am "rollback only" z
420 $ cat z
420 $ cat z
421 $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
421 $Id: z,v 45a5d3adce53 1970/01/01 00:00:00 test $
422 $ hg --verbose rollback
422 $ hg --verbose rollback
423 repository tip rolled back to revision 2 (undo commit)
423 repository tip rolled back to revision 2 (undo commit)
424 working directory now based on revision 2
424 working directory now based on revision 2
425 overwriting z shrinking keywords
425 overwriting z shrinking keywords
426
426
427 Only z should be overwritten
427 Only z should be overwritten
428
428
429 $ hg status a y z
429 $ hg status a y z
430 M a
430 M a
431 A y
431 A y
432 A z
432 A z
433 $ cat z
433 $ cat z
434 $Id$
434 $Id$
435 $ hg forget y z
435 $ hg forget y z
436 $ rm y z
436 $ rm y z
437
437
438 record added file alone
438 record added file alone
439
439
440 $ hg -v record -l msg -d '1 12' r<<EOF
440 $ hg -v record -l msg -d '1 12' r<<EOF
441 > y
441 > y
442 > EOF
442 > EOF
443 diff --git a/r b/r
443 diff --git a/r b/r
444 new file mode 100644
444 new file mode 100644
445 examine changes to 'r'? [Ynsfdaq?]
445 examine changes to 'r'? [Ynsfdaq?]
446 r
446 r
447 committed changeset 3:899491280810
447 committed changeset 3:899491280810
448 overwriting r expanding keywords
448 overwriting r expanding keywords
449 - status call required for dirstate.normallookup() check
449 - status call required for dirstate.normallookup() check
450 $ hg status r
450 $ hg status r
451 $ hg --verbose rollback
451 $ hg --verbose rollback
452 repository tip rolled back to revision 2 (undo commit)
452 repository tip rolled back to revision 2 (undo commit)
453 working directory now based on revision 2
453 working directory now based on revision 2
454 overwriting r shrinking keywords
454 overwriting r shrinking keywords
455 $ hg forget r
455 $ hg forget r
456 $ rm msg r
456 $ rm msg r
457 $ hg update -C
457 $ hg update -C
458 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
458 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
459
459
460 record added keyword ignored file
460 record added keyword ignored file
461
461
462 $ echo '$Id$' > i
462 $ echo '$Id$' > i
463 $ hg add i
463 $ hg add i
464 $ hg --verbose record -d '1 13' -m recignored<<EOF
464 $ hg --verbose record -d '1 13' -m recignored<<EOF
465 > y
465 > y
466 > EOF
466 > EOF
467 diff --git a/i b/i
467 diff --git a/i b/i
468 new file mode 100644
468 new file mode 100644
469 examine changes to 'i'? [Ynsfdaq?]
469 examine changes to 'i'? [Ynsfdaq?]
470 i
470 i
471 committed changeset 3:5f40fe93bbdc
471 committed changeset 3:5f40fe93bbdc
472 $ cat i
472 $ cat i
473 $Id$
473 $Id$
474 $ hg -q rollback
474 $ hg -q rollback
475 $ hg forget i
475 $ hg forget i
476 $ rm i
476 $ rm i
477
477
478 Test patch queue repo
478 Test patch queue repo
479
479
480 $ hg init --mq
480 $ hg init --mq
481 $ hg qimport -r tip -n mqtest.diff
481 $ hg qimport -r tip -n mqtest.diff
482 $ hg commit --mq -m mqtest
482 $ hg commit --mq -m mqtest
483
483
484 Keywords should not be expanded in patch
484 Keywords should not be expanded in patch
485
485
486 $ cat .hg/patches/mqtest.diff
486 $ cat .hg/patches/mqtest.diff
487 # HG changeset patch
487 # HG changeset patch
488 # User User Name <user@example.com>
488 # User User Name <user@example.com>
489 # Date 1 0
489 # Date 1 0
490 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
490 # Node ID 40a904bbbe4cd4ab0a1f28411e35db26341a40ad
491 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
491 # Parent ef63ca68695bc9495032c6fda1350c71e6d256e9
492 cndiff
492 cndiff
493
493
494 diff -r ef63ca68695b -r 40a904bbbe4c c
494 diff -r ef63ca68695b -r 40a904bbbe4c c
495 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
495 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
496 +++ b/c Thu Jan 01 00:00:01 1970 +0000
496 +++ b/c Thu Jan 01 00:00:01 1970 +0000
497 @@ -0,0 +1,2 @@
497 @@ -0,0 +1,2 @@
498 +$Id$
498 +$Id$
499 +tests for different changenodes
499 +tests for different changenodes
500
500
501 $ hg qpop
501 $ hg qpop
502 popping mqtest.diff
502 popping mqtest.diff
503 patch queue now empty
503 patch queue now empty
504
504
505 qgoto, implying qpush, should expand
505 qgoto, implying qpush, should expand
506
506
507 $ hg qgoto mqtest.diff
507 $ hg qgoto mqtest.diff
508 applying mqtest.diff
508 applying mqtest.diff
509 now at: mqtest.diff
509 now at: mqtest.diff
510 $ cat c
510 $ cat c
511 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
511 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
512 tests for different changenodes
512 tests for different changenodes
513 $ hg cat c
513 $ hg cat c
514 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
514 $Id: c,v 40a904bbbe4c 1970/01/01 00:00:01 user $
515 tests for different changenodes
515 tests for different changenodes
516
516
517 Keywords should not be expanded in filelog
517 Keywords should not be expanded in filelog
518
518
519 $ hg --config 'extensions.keyword=!' cat c
519 $ hg --config 'extensions.keyword=!' cat c
520 $Id$
520 $Id$
521 tests for different changenodes
521 tests for different changenodes
522
522
523 qpop and move on
523 qpop and move on
524
524
525 $ hg qpop
525 $ hg qpop
526 popping mqtest.diff
526 popping mqtest.diff
527 patch queue now empty
527 patch queue now empty
528
528
529 Copy and show added kwfiles
529 Copy and show added kwfiles
530
530
531 $ hg cp a c
531 $ hg cp a c
532 $ hg kwfiles
532 $ hg kwfiles
533 a
533 a
534 c
534 c
535
535
536 Commit and show expansion in original and copy
536 Commit and show expansion in original and copy
537
537
538 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
538 $ hg --debug commit -ma2c -d '1 0' -u 'User Name <user@example.com>'
539 c
539 c
540 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
540 c: copy a:0045e12f6c5791aac80ca6cbfd97709a88307292
541 overwriting c expanding keywords
541 overwriting c expanding keywords
542 committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
542 committed changeset 2:25736cf2f5cbe41f6be4e6784ef6ecf9f3bbcc7d
543 $ cat a c
543 $ cat a c
544 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
544 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
545 do not process $Id:
545 do not process $Id:
546 xxx $
546 xxx $
547 expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $
547 expand $Id: c,v 25736cf2f5cb 1970/01/01 00:00:01 user $
548 do not process $Id:
548 do not process $Id:
549 xxx $
549 xxx $
550
550
551 Touch copied c and check its status
551 Touch copied c and check its status
552
552
553 $ touch c
553 $ touch c
554 $ hg status
554 $ hg status
555
555
556 Copy kwfile to keyword ignored file unexpanding keywords
556 Copy kwfile to keyword ignored file unexpanding keywords
557
557
558 $ hg --verbose copy a i
558 $ hg --verbose copy a i
559 copying a to i
559 copying a to i
560 overwriting i shrinking keywords
560 overwriting i shrinking keywords
561 $ head -n 1 i
561 $ head -n 1 i
562 expand $Id$
562 expand $Id$
563 $ hg forget i
563 $ hg forget i
564 $ rm i
564 $ rm i
565
565
566 Copy ignored file to ignored file: no overwriting
566 Copy ignored file to ignored file: no overwriting
567
567
568 $ hg --verbose copy b i
568 $ hg --verbose copy b i
569 copying b to i
569 copying b to i
570 $ hg forget i
570 $ hg forget i
571 $ rm i
571 $ rm i
572
572
573 cp symlink file; hg cp -A symlink file (part1)
573 cp symlink file; hg cp -A symlink file (part1)
574 - copied symlink points to kwfile: overwrite
574 - copied symlink points to kwfile: overwrite
575
575
576 $ cp sym i
576 $ cp sym i
577 $ ls -l i
577 $ ls -l i
578 -rw-r--r--* (glob)
578 -rw-r--r--* (glob)
579 $ head -1 i
579 $ head -1 i
580 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
580 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
581 $ hg copy --after --verbose sym i
581 $ hg copy --after --verbose sym i
582 copying sym to i
582 copying sym to i
583 overwriting i shrinking keywords
583 overwriting i shrinking keywords
584 $ head -1 i
584 $ head -1 i
585 expand $Id$
585 expand $Id$
586 $ hg forget i
586 $ hg forget i
587 $ rm i
587 $ rm i
588
588
589 Test different options of hg kwfiles
589 Test different options of hg kwfiles
590
590
591 $ hg kwfiles
591 $ hg kwfiles
592 a
592 a
593 c
593 c
594 $ hg -v kwfiles --ignore
594 $ hg -v kwfiles --ignore
595 I b
595 I b
596 I sym
596 I sym
597 $ hg kwfiles --all
597 $ hg kwfiles --all
598 K a
598 K a
599 K c
599 K c
600 I b
600 I b
601 I sym
601 I sym
602
602
603 Diff specific revision
603 Diff specific revision
604
604
605 $ hg diff --rev 1
605 $ hg diff --rev 1
606 diff -r ef63ca68695b c
606 diff -r ef63ca68695b c
607 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
607 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
608 +++ b/c * (glob)
608 +++ b/c * (glob)
609 @@ -0,0 +1,3 @@
609 @@ -0,0 +1,3 @@
610 +expand $Id$
610 +expand $Id$
611 +do not process $Id:
611 +do not process $Id:
612 +xxx $
612 +xxx $
613
613
614 Status after rollback:
614 Status after rollback:
615
615
616 $ hg rollback
616 $ hg rollback
617 repository tip rolled back to revision 1 (undo commit)
617 repository tip rolled back to revision 1 (undo commit)
618 working directory now based on revision 1
618 working directory now based on revision 1
619 $ hg status
619 $ hg status
620 A c
620 A c
621 $ hg update --clean
621 $ hg update --clean
622 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
622 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
623
623
624 cp symlink file; hg cp -A symlink file (part2)
624 cp symlink file; hg cp -A symlink file (part2)
625 - copied symlink points to kw ignored file: do not overwrite
625 - copied symlink points to kw ignored file: do not overwrite
626
626
627 $ cat a > i
627 $ cat a > i
628 $ ln -s i symignored
628 $ ln -s i symignored
629 $ hg commit -Am 'fake expansion in ignored and symlink' i symignored
629 $ hg commit -Am 'fake expansion in ignored and symlink' i symignored
630 $ cp symignored x
630 $ cp symignored x
631 $ hg copy --after --verbose symignored x
631 $ hg copy --after --verbose symignored x
632 copying symignored to x
632 copying symignored to x
633 $ head -n 1 x
633 $ head -n 1 x
634 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
634 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
635 $ hg forget x
635 $ hg forget x
636 $ rm x
636 $ rm x
637
637
638 $ hg rollback
638 $ hg rollback
639 repository tip rolled back to revision 1 (undo commit)
639 repository tip rolled back to revision 1 (undo commit)
640 working directory now based on revision 1
640 working directory now based on revision 1
641 $ hg update --clean
641 $ hg update --clean
642 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
642 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
643 $ rm i symignored
643 $ rm i symignored
644
644
645 Custom keywordmaps as argument to kwdemo
645 Custom keywordmaps as argument to kwdemo
646
646
647 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
647 $ hg --quiet kwdemo "Xinfo = {author}: {desc}"
648 [extensions]
648 [extensions]
649 keyword =
649 keyword =
650 [keyword]
650 [keyword]
651 ** =
651 ** =
652 b = ignore
652 b = ignore
653 demo.txt =
653 demo.txt =
654 i = ignore
654 i = ignore
655 [keywordset]
655 [keywordset]
656 svn = False
656 svn = False
657 [keywordmaps]
657 [keywordmaps]
658 Xinfo = {author}: {desc}
658 Xinfo = {author}: {desc}
659 $Xinfo: test: hg keyword configuration and expansion example $
659 $Xinfo: test: hg keyword configuration and expansion example $
660
660
661 Configure custom keywordmaps
661 Configure custom keywordmaps
662
662
663 $ cat <<EOF >>$HGRCPATH
663 $ cat <<EOF >>$HGRCPATH
664 > [keywordmaps]
664 > [keywordmaps]
665 > Id = {file} {node|short} {date|rfc822date} {author|user}
665 > Id = {file} {node|short} {date|rfc822date} {author|user}
666 > Xinfo = {author}: {desc}
666 > Xinfo = {author}: {desc}
667 > EOF
667 > EOF
668
668
669 Cat and hg cat files before custom expansion
669 Cat and hg cat files before custom expansion
670
670
671 $ cat a b
671 $ cat a b
672 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
672 expand $Id: a,v ef63ca68695b 1970/01/01 00:00:00 user $
673 do not process $Id:
673 do not process $Id:
674 xxx $
674 xxx $
675 ignore $Id$
675 ignore $Id$
676 $ hg cat sym a b && echo
676 $ hg cat sym a b && echo
677 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
677 expand $Id: a ef63ca68695b Thu, 01 Jan 1970 00:00:00 +0000 user $
678 do not process $Id:
678 do not process $Id:
679 xxx $
679 xxx $
680 ignore $Id$
680 ignore $Id$
681 a
681 a
682
682
683 Write custom keyword and prepare multiline commit message
683 Write custom keyword and prepare multiline commit message
684
684
685 $ echo '$Xinfo$' >> a
685 $ echo '$Xinfo$' >> a
686 $ cat <<EOF >> log
686 $ cat <<EOF >> log
687 > firstline
687 > firstline
688 > secondline
688 > secondline
689 > EOF
689 > EOF
690
690
691 Interrupted commit should not change state
691 Interrupted commit should not change state
692
692
693 $ hg commit
693 $ hg commit
694 abort: empty commit message
694 abort: empty commit message
695 [255]
695 [255]
696 $ hg status
696 $ hg status
697 M a
697 M a
698 ? c
698 ? c
699 ? log
699 ? log
700
700
701 Commit with multiline message and custom expansion
701 Commit with multiline message and custom expansion
702
702
703 $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
703 $ hg --debug commit -l log -d '2 0' -u 'User Name <user@example.com>'
704 a
704 a
705 overwriting a expanding keywords
705 overwriting a expanding keywords
706 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
706 committed changeset 2:bb948857c743469b22bbf51f7ec8112279ca5d83
707 $ rm log
707 $ rm log
708
708
709 Stat, verify and show custom expansion (firstline)
709 Stat, verify and show custom expansion (firstline)
710
710
711 $ hg status
711 $ hg status
712 ? c
712 ? c
713 $ hg verify
713 $ hg verify
714 checking changesets
714 checking changesets
715 checking manifests
715 checking manifests
716 crosschecking files in changesets and manifests
716 crosschecking files in changesets and manifests
717 checking files
717 checking files
718 3 files, 3 changesets, 4 total revisions
718 3 files, 3 changesets, 4 total revisions
719 $ cat a b
719 $ cat a b
720 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
720 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
721 do not process $Id:
721 do not process $Id:
722 xxx $
722 xxx $
723 $Xinfo: User Name <user@example.com>: firstline $
723 $Xinfo: User Name <user@example.com>: firstline $
724 ignore $Id$
724 ignore $Id$
725 $ hg cat sym a b && echo
725 $ hg cat sym a b && echo
726 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
726 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
727 do not process $Id:
727 do not process $Id:
728 xxx $
728 xxx $
729 $Xinfo: User Name <user@example.com>: firstline $
729 $Xinfo: User Name <user@example.com>: firstline $
730 ignore $Id$
730 ignore $Id$
731 a
731 a
732
732
733 annotate
733 annotate
734
734
735 $ hg annotate a
735 $ hg annotate a
736 1: expand $Id$
736 1: expand $Id$
737 1: do not process $Id:
737 1: do not process $Id:
738 1: xxx $
738 1: xxx $
739 2: $Xinfo$
739 2: $Xinfo$
740
740
741 remove with status checks
741 remove with status checks
742
742
743 $ hg debugrebuildstate
743 $ hg debugrebuildstate
744 $ hg remove a
744 $ hg remove a
745 $ hg --debug commit -m rma
745 $ hg --debug commit -m rma
746 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
746 committed changeset 3:d14c712653769de926994cf7fbb06c8fbd68f012
747 $ hg status
747 $ hg status
748 ? c
748 ? c
749
749
750 Rollback, revert, and check expansion
750 Rollback, revert, and check expansion
751
751
752 $ hg rollback
752 $ hg rollback
753 repository tip rolled back to revision 2 (undo commit)
753 repository tip rolled back to revision 2 (undo commit)
754 working directory now based on revision 2
754 working directory now based on revision 2
755 $ hg status
755 $ hg status
756 R a
756 R a
757 ? c
757 ? c
758 $ hg revert --no-backup --rev tip a
758 $ hg revert --no-backup --rev tip a
759 $ cat a
759 $ cat a
760 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
760 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
761 do not process $Id:
761 do not process $Id:
762 xxx $
762 xxx $
763 $Xinfo: User Name <user@example.com>: firstline $
763 $Xinfo: User Name <user@example.com>: firstline $
764
764
765 Clone to test global and local configurations
765 Clone to test global and local configurations
766
766
767 $ cd ..
767 $ cd ..
768
768
769 Expansion in destinaton with global configuration
769 Expansion in destinaton with global configuration
770
770
771 $ hg --quiet clone Test globalconf
771 $ hg --quiet clone Test globalconf
772 $ cat globalconf/a
772 $ cat globalconf/a
773 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
773 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
774 do not process $Id:
774 do not process $Id:
775 xxx $
775 xxx $
776 $Xinfo: User Name <user@example.com>: firstline $
776 $Xinfo: User Name <user@example.com>: firstline $
777
777
778 No expansion in destination with local configuration in origin only
778 No expansion in destination with local configuration in origin only
779
779
780 $ hg --quiet --config 'keyword.**=ignore' clone Test localconf
780 $ hg --quiet --config 'keyword.**=ignore' clone Test localconf
781 $ cat localconf/a
781 $ cat localconf/a
782 expand $Id$
782 expand $Id$
783 do not process $Id:
783 do not process $Id:
784 xxx $
784 xxx $
785 $Xinfo$
785 $Xinfo$
786
786
787 Clone to test incoming
787 Clone to test incoming
788
788
789 $ hg clone -r1 Test Test-a
789 $ hg clone -r1 Test Test-a
790 adding changesets
790 adding changesets
791 adding manifests
791 adding manifests
792 adding file changes
792 adding file changes
793 added 2 changesets with 3 changes to 3 files
793 added 2 changesets with 3 changes to 3 files
794 updating to branch default
794 updating to branch default
795 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
795 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
796 $ cd Test-a
796 $ cd Test-a
797 $ cat <<EOF >> .hg/hgrc
797 $ cat <<EOF >> .hg/hgrc
798 > [paths]
798 > [paths]
799 > default = ../Test
799 > default = ../Test
800 > EOF
800 > EOF
801 $ hg incoming
801 $ hg incoming
802 comparing with $TESTTMP/Test
802 comparing with $TESTTMP/Test
803 searching for changes
803 searching for changes
804 changeset: 2:bb948857c743
804 changeset: 2:bb948857c743
805 tag: tip
805 tag: tip
806 user: User Name <user@example.com>
806 user: User Name <user@example.com>
807 date: Thu Jan 01 00:00:02 1970 +0000
807 date: Thu Jan 01 00:00:02 1970 +0000
808 summary: firstline
808 summary: firstline
809
809
810 Imported patch should not be rejected
810 Imported patch should not be rejected
811
811
812 $ python -c \
812 $ python -c \
813 > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);'
813 > 'import re; s=re.sub("(Id.*)","\\1 rejecttest",open("a").read()); open("a","wb").write(s);'
814 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
814 $ hg --debug commit -m'rejects?' -d '3 0' -u 'User Name <user@example.com>'
815 a
815 a
816 overwriting a expanding keywords
816 overwriting a expanding keywords
817 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
817 committed changeset 2:85e279d709ffc28c9fdd1b868570985fc3d87082
818 $ hg export -o ../rejecttest.diff tip
818 $ hg export -o ../rejecttest.diff tip
819 $ cd ../Test
819 $ cd ../Test
820 $ hg import ../rejecttest.diff
820 $ hg import ../rejecttest.diff
821 applying ../rejecttest.diff
821 applying ../rejecttest.diff
822 $ cat a b
822 $ cat a b
823 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
823 expand $Id: a 4e0994474d25 Thu, 01 Jan 1970 00:00:03 +0000 user $ rejecttest
824 do not process $Id: rejecttest
824 do not process $Id: rejecttest
825 xxx $
825 xxx $
826 $Xinfo: User Name <user@example.com>: rejects? $
826 $Xinfo: User Name <user@example.com>: rejects? $
827 ignore $Id$
827 ignore $Id$
828
828
829 $ hg rollback
829 $ hg rollback
830 repository tip rolled back to revision 2 (undo import)
830 repository tip rolled back to revision 2 (undo import)
831 working directory now based on revision 2
831 working directory now based on revision 2
832 $ hg update --clean
832 $ hg update --clean
833 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
833 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
834
834
835 kwexpand/kwshrink on selected files
835 kwexpand/kwshrink on selected files
836
836
837 $ mkdir x
837 $ mkdir x
838 $ hg copy a x/a
838 $ hg copy a x/a
839 $ hg --verbose kwshrink a
839 $ hg --verbose kwshrink a
840 overwriting a shrinking keywords
840 overwriting a shrinking keywords
841 - sleep required for dirstate.normal() check
841 - sleep required for dirstate.normal() check
842 $ sleep 1
842 $ sleep 1
843 $ hg status a
843 $ hg status a
844 $ hg --verbose kwexpand a
844 $ hg --verbose kwexpand a
845 overwriting a expanding keywords
845 overwriting a expanding keywords
846 $ hg status a
846 $ hg status a
847
847
848 kwexpand x/a should abort
848 kwexpand x/a should abort
849
849
850 $ hg --verbose kwexpand x/a
850 $ hg --verbose kwexpand x/a
851 abort: outstanding uncommitted changes
851 abort: outstanding uncommitted changes
852 [255]
852 [255]
853 $ cd x
853 $ cd x
854 $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
854 $ hg --debug commit -m xa -d '3 0' -u 'User Name <user@example.com>'
855 x/a
855 x/a
856 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
856 x/a: copy a:779c764182ce5d43e2b1eb66ce06d7b47bfe342e
857 overwriting x/a expanding keywords
857 overwriting x/a expanding keywords
858 committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
858 committed changeset 3:b4560182a3f9a358179fd2d835c15e9da379c1e4
859 $ cat a
859 $ cat a
860 expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
860 expand $Id: x/a b4560182a3f9 Thu, 01 Jan 1970 00:00:03 +0000 user $
861 do not process $Id:
861 do not process $Id:
862 xxx $
862 xxx $
863 $Xinfo: User Name <user@example.com>: xa $
863 $Xinfo: User Name <user@example.com>: xa $
864
864
865 kwshrink a inside directory x
865 kwshrink a inside directory x
866
866
867 $ hg --verbose kwshrink a
867 $ hg --verbose kwshrink a
868 overwriting x/a shrinking keywords
868 overwriting x/a shrinking keywords
869 $ cat a
869 $ cat a
870 expand $Id$
870 expand $Id$
871 do not process $Id:
871 do not process $Id:
872 xxx $
872 xxx $
873 $Xinfo$
873 $Xinfo$
874 $ cd ..
874 $ cd ..
875
875
876 kwexpand nonexistent
876 kwexpand nonexistent
877
877
878 $ hg kwexpand nonexistent
878 $ hg kwexpand nonexistent
879 nonexistent:* (glob)
879 nonexistent:* (glob)
880
880
881
881
882 hg serve
882 hg serve
883 - expand with hgweb file
883 - expand with hgweb file
884 - no expansion with hgweb annotate/changeset/filediff
884 - no expansion with hgweb annotate/changeset/filediff
885 - check errors
885 - check errors
886
886
887 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
887 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
888 $ cat hg.pid >> $DAEMON_PIDS
888 $ cat hg.pid >> $DAEMON_PIDS
889 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/file/tip/a/?style=raw'
889 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/file/tip/a/?style=raw'
890 200 Script output follows
890 200 Script output follows
891
891
892 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
892 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
893 do not process $Id:
893 do not process $Id:
894 xxx $
894 xxx $
895 $Xinfo: User Name <user@example.com>: firstline $
895 $Xinfo: User Name <user@example.com>: firstline $
896 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/annotate/tip/a/?style=raw'
896 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/annotate/tip/a/?style=raw'
897 200 Script output follows
897 200 Script output follows
898
898
899
899
900 user@1: expand $Id$
900 user@1: expand $Id$
901 user@1: do not process $Id:
901 user@1: do not process $Id:
902 user@1: xxx $
902 user@1: xxx $
903 user@2: $Xinfo$
903 user@2: $Xinfo$
904
904
905
905
906
906
907
907
908 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/rev/tip/?style=raw'
908 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/rev/tip/?style=raw'
909 200 Script output follows
909 200 Script output follows
910
910
911
911
912 # HG changeset patch
912 # HG changeset patch
913 # User User Name <user@example.com>
913 # User User Name <user@example.com>
914 # Date 3 0
914 # Date 3 0
915 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
915 # Node ID b4560182a3f9a358179fd2d835c15e9da379c1e4
916 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
916 # Parent bb948857c743469b22bbf51f7ec8112279ca5d83
917 xa
917 xa
918
918
919 diff -r bb948857c743 -r b4560182a3f9 x/a
919 diff -r bb948857c743 -r b4560182a3f9 x/a
920 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
920 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
921 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
921 +++ b/x/a Thu Jan 01 00:00:03 1970 +0000
922 @@ -0,0 +1,4 @@
922 @@ -0,0 +1,4 @@
923 +expand $Id$
923 +expand $Id$
924 +do not process $Id:
924 +do not process $Id:
925 +xxx $
925 +xxx $
926 +$Xinfo$
926 +$Xinfo$
927
927
928 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
928 $ $TESTDIR/get-with-headers.py localhost:$HGPORT '/diff/bb948857c743/a?style=raw'
929 200 Script output follows
929 200 Script output follows
930
930
931
931
932 diff -r ef63ca68695b -r bb948857c743 a
932 diff -r ef63ca68695b -r bb948857c743 a
933 --- a/a Thu Jan 01 00:00:00 1970 +0000
933 --- a/a Thu Jan 01 00:00:00 1970 +0000
934 +++ b/a Thu Jan 01 00:00:02 1970 +0000
934 +++ b/a Thu Jan 01 00:00:02 1970 +0000
935 @@ -1,3 +1,4 @@
935 @@ -1,3 +1,4 @@
936 expand $Id$
936 expand $Id$
937 do not process $Id:
937 do not process $Id:
938 xxx $
938 xxx $
939 +$Xinfo$
939 +$Xinfo$
940
940
941
941
942
942
943
943
944 $ cat errors.log
944 $ cat errors.log
945
945
946 Prepare merge and resolve tests
946 Prepare merge and resolve tests
947
947
948 $ echo '$Id$' > m
948 $ echo '$Id$' > m
949 $ hg add m
949 $ hg add m
950 $ hg commit -m 4kw
950 $ hg commit -m 4kw
951 $ echo foo >> m
951 $ echo foo >> m
952 $ hg commit -m 5foo
952 $ hg commit -m 5foo
953
953
954 simplemerge
954 simplemerge
955
955
956 $ hg update 4
956 $ hg update 4
957 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
957 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
958 $ echo foo >> m
958 $ echo foo >> m
959 $ hg commit -m 6foo
959 $ hg commit -m 6foo
960 created new head
960 created new head
961 $ hg merge
961 $ hg merge
962 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
962 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
963 (branch merge, don't forget to commit)
963 (branch merge, don't forget to commit)
964 $ hg commit -m simplemerge
964 $ hg commit -m simplemerge
965 $ cat m
965 $ cat m
966 $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $
966 $Id: m 27d48ee14f67 Thu, 01 Jan 1970 00:00:00 +0000 test $
967 foo
967 foo
968
968
969 conflict: keyword should stay outside conflict zone
969 conflict: keyword should stay outside conflict zone
970
970
971 $ hg update 4
971 $ hg update 4
972 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
972 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
973 $ echo bar >> m
973 $ echo bar >> m
974 $ hg commit -m 8bar
974 $ hg commit -m 8bar
975 created new head
975 created new head
976 $ hg merge
976 $ hg merge
977 merging m
977 merging m
978 warning: conflicts during merge.
978 warning: conflicts during merge.
979 merging m failed!
979 merging m failed!
980 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
980 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
981 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
981 use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
982 [1]
982 [1]
983 $ cat m
983 $ cat m
984 $Id$
984 $Id$
985 <<<<<<< local
985 <<<<<<< local
986 bar
986 bar
987 =======
987 =======
988 foo
988 foo
989 >>>>>>> other
989 >>>>>>> other
990
990
991 resolve to local
991 resolve to local
992
992
993 $ HGMERGE=internal:local hg resolve -a
993 $ HGMERGE=internal:local hg resolve -a
994 $ hg commit -m localresolve
994 $ hg commit -m localresolve
995 $ cat m
995 $ cat m
996 $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $
996 $Id: m 800511b3a22d Thu, 01 Jan 1970 00:00:00 +0000 test $
997 bar
997 bar
998
998
999 Test restricted mode with transplant -b
999 Test restricted mode with transplant -b
1000
1000
1001 $ hg update 6
1001 $ hg update 6
1002 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1002 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1003 $ hg branch foo
1003 $ hg branch foo
1004 marked working directory as branch foo
1004 marked working directory as branch foo
1005 $ mv a a.bak
1005 $ mv a a.bak
1006 $ echo foobranch > a
1006 $ echo foobranch > a
1007 $ cat a.bak >> a
1007 $ cat a.bak >> a
1008 $ rm a.bak
1008 $ rm a.bak
1009 $ hg commit -m 9foobranch
1009 $ hg commit -m 9foobranch
1010 $ hg update default
1010 $ hg update default
1011 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1011 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
1012 $ hg -y transplant -b foo tip
1012 $ hg -y transplant -b foo tip
1013 applying 4aa30d025d50
1013 applying 4aa30d025d50
1014 4aa30d025d50 transplanted to e00abbf63521
1014 4aa30d025d50 transplanted to e00abbf63521
1015
1015
1016 Expansion in changeset but not in file
1016 Expansion in changeset but not in file
1017
1017
1018 $ hg tip -p
1018 $ hg tip -p
1019 changeset: 11:e00abbf63521
1019 changeset: 11:e00abbf63521
1020 tag: tip
1020 tag: tip
1021 parent: 9:800511b3a22d
1021 parent: 9:800511b3a22d
1022 user: test
1022 user: test
1023 date: Thu Jan 01 00:00:00 1970 +0000
1023 date: Thu Jan 01 00:00:00 1970 +0000
1024 summary: 9foobranch
1024 summary: 9foobranch
1025
1025
1026 diff -r 800511b3a22d -r e00abbf63521 a
1026 diff -r 800511b3a22d -r e00abbf63521 a
1027 --- a/a Thu Jan 01 00:00:00 1970 +0000
1027 --- a/a Thu Jan 01 00:00:00 1970 +0000
1028 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1028 +++ b/a Thu Jan 01 00:00:00 1970 +0000
1029 @@ -1,3 +1,4 @@
1029 @@ -1,3 +1,4 @@
1030 +foobranch
1030 +foobranch
1031 expand $Id$
1031 expand $Id$
1032 do not process $Id:
1032 do not process $Id:
1033 xxx $
1033 xxx $
1034
1034
1035 $ head -n 2 a
1035 $ head -n 2 a
1036 foobranch
1036 foobranch
1037 expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $
1037 expand $Id: a e00abbf63521 Thu, 01 Jan 1970 00:00:00 +0000 test $
1038
1038
1039 Turn off expansion
1039 Turn off expansion
1040
1040
1041 $ hg -q rollback
1041 $ hg -q rollback
1042 $ hg -q update -C
1042 $ hg -q update -C
1043
1043
1044 kwshrink with unknown file u
1044 kwshrink with unknown file u
1045
1045
1046 $ cp a u
1046 $ cp a u
1047 $ hg --verbose kwshrink
1047 $ hg --verbose kwshrink
1048 overwriting a shrinking keywords
1048 overwriting a shrinking keywords
1049 overwriting m shrinking keywords
1049 overwriting m shrinking keywords
1050 overwriting x/a shrinking keywords
1050 overwriting x/a shrinking keywords
1051
1051
1052 Keywords shrunk in working directory, but not yet disabled
1052 Keywords shrunk in working directory, but not yet disabled
1053 - cat shows unexpanded keywords
1053 - cat shows unexpanded keywords
1054 - hg cat shows expanded keywords
1054 - hg cat shows expanded keywords
1055
1055
1056 $ cat a b
1056 $ cat a b
1057 expand $Id$
1057 expand $Id$
1058 do not process $Id:
1058 do not process $Id:
1059 xxx $
1059 xxx $
1060 $Xinfo$
1060 $Xinfo$
1061 ignore $Id$
1061 ignore $Id$
1062 $ hg cat sym a b && echo
1062 $ hg cat sym a b && echo
1063 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
1063 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
1064 do not process $Id:
1064 do not process $Id:
1065 xxx $
1065 xxx $
1066 $Xinfo: User Name <user@example.com>: firstline $
1066 $Xinfo: User Name <user@example.com>: firstline $
1067 ignore $Id$
1067 ignore $Id$
1068 a
1068 a
1069
1069
1070 Now disable keyword expansion
1070 Now disable keyword expansion
1071
1071
1072 $ rm "$HGRCPATH"
1072 $ rm "$HGRCPATH"
1073 $ cat a b
1073 $ cat a b
1074 expand $Id$
1074 expand $Id$
1075 do not process $Id:
1075 do not process $Id:
1076 xxx $
1076 xxx $
1077 $Xinfo$
1077 $Xinfo$
1078 ignore $Id$
1078 ignore $Id$
1079 $ hg cat sym a b && echo
1079 $ hg cat sym a b && echo
1080 expand $Id$
1080 expand $Id$
1081 do not process $Id:
1081 do not process $Id:
1082 xxx $
1082 xxx $
1083 $Xinfo$
1083 $Xinfo$
1084 ignore $Id$
1084 ignore $Id$
1085 a
1085 a
@@ -1,37 +1,38 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 = Test the known() protocol function =
3 = Test the known() protocol function =
3
4
4 Create a test repository:
5 Create a test repository:
5
6
6 $ hg init repo
7 $ hg init repo
7 $ cd repo
8 $ cd repo
8 $ touch a ; hg add a ; hg ci -ma
9 $ touch a ; hg add a ; hg ci -ma
9 $ touch b ; hg add b ; hg ci -mb
10 $ touch b ; hg add b ; hg ci -mb
10 $ touch c ; hg add c ; hg ci -mc
11 $ touch c ; hg add c ; hg ci -mc
11 $ hg log --template '{node}\n'
12 $ hg log --template '{node}\n'
12 991a3460af53952d10ec8a295d3d2cc2e5fa9690
13 991a3460af53952d10ec8a295d3d2cc2e5fa9690
13 0e067c57feba1a5694ca4844f05588bb1bf82342
14 0e067c57feba1a5694ca4844f05588bb1bf82342
14 3903775176ed42b1458a6281db4a0ccf4d9f287a
15 3903775176ed42b1458a6281db4a0ccf4d9f287a
15 $ cd ..
16 $ cd ..
16
17
17 Test locally:
18 Test locally:
18
19
19 $ hg debugknown repo 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a
20 $ hg debugknown repo 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a
20 111
21 111
21 $ hg debugknown repo 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a
22 $ hg debugknown repo 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a
22 010
23 010
23 $ hg debugknown repo
24 $ hg debugknown repo
24
25
25
26
26 Test via HTTP:
27 Test via HTTP:
27
28
28 $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log
29 $ hg serve -R repo -p $HGPORT -d --pid-file=hg.pid -E error.log -A access.log
29 $ cat hg.pid >> $DAEMON_PIDS
30 $ cat hg.pid >> $DAEMON_PIDS
30 $ hg debugknown http://localhost:$HGPORT/ 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a
31 $ hg debugknown http://localhost:$HGPORT/ 991a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 3903775176ed42b1458a6281db4a0ccf4d9f287a
31 111
32 111
32 $ hg debugknown http://localhost:$HGPORT/ 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a
33 $ hg debugknown http://localhost:$HGPORT/ 000a3460af53952d10ec8a295d3d2cc2e5fa9690 0e067c57feba1a5694ca4844f05588bb1bf82342 0003775176ed42b1458a6281db4a0ccf4d9f287a
33 010
34 010
34 $ hg debugknown http://localhost:$HGPORT/
35 $ hg debugknown http://localhost:$HGPORT/
35
36
36 $ cat error.log
37 $ cat error.log
37
38
@@ -1,844 +1,844 b''
1 $ "$TESTDIR/hghave" symlink unix-permissions || exit 80
1 $ "$TESTDIR/hghave" symlink unix-permissions serve || exit 80
2
2
3 $ cat >> $HGRCPATH <<EOF
3 $ cat >> $HGRCPATH <<EOF
4 > [extensions]
4 > [extensions]
5 > largefiles=
5 > largefiles=
6 > purge=
6 > purge=
7 > rebase=
7 > rebase=
8 > transplant=
8 > transplant=
9 > [largefiles]
9 > [largefiles]
10 > minsize=2
10 > minsize=2
11 > patterns=glob:**.dat
11 > patterns=glob:**.dat
12 > EOF
12 > EOF
13
13
14 Create the repo with a couple of revisions of both large and normal
14 Create the repo with a couple of revisions of both large and normal
15 files, testing that status correctly shows largefiles.
15 files, testing that status correctly shows largefiles.
16
16
17 $ hg init a
17 $ hg init a
18 $ cd a
18 $ cd a
19 $ mkdir sub
19 $ mkdir sub
20 $ echo normal1 > normal1
20 $ echo normal1 > normal1
21 $ echo normal2 > sub/normal2
21 $ echo normal2 > sub/normal2
22 $ echo large1 > large1
22 $ echo large1 > large1
23 $ echo large2 > sub/large2
23 $ echo large2 > sub/large2
24 $ hg add normal1 sub/normal2
24 $ hg add normal1 sub/normal2
25 $ hg add --large large1 sub/large2
25 $ hg add --large large1 sub/large2
26 $ hg commit -m "add files"
26 $ hg commit -m "add files"
27 $ echo normal11 > normal1
27 $ echo normal11 > normal1
28 $ echo normal22 > sub/normal2
28 $ echo normal22 > sub/normal2
29 $ echo large11 > large1
29 $ echo large11 > large1
30 $ echo large22 > sub/large2
30 $ echo large22 > sub/large2
31 $ hg st
31 $ hg st
32 M large1
32 M large1
33 M normal1
33 M normal1
34 M sub/large2
34 M sub/large2
35 M sub/normal2
35 M sub/normal2
36 $ hg commit -m "edit files"
36 $ hg commit -m "edit files"
37
37
38 Commit preserved largefile contents.
38 Commit preserved largefile contents.
39
39
40 $ cat normal1
40 $ cat normal1
41 normal11
41 normal11
42 $ cat large1
42 $ cat large1
43 large11
43 large11
44 $ cat sub/normal2
44 $ cat sub/normal2
45 normal22
45 normal22
46 $ cat sub/large2
46 $ cat sub/large2
47 large22
47 large22
48
48
49 Remove both largefiles and normal files.
49 Remove both largefiles and normal files.
50
50
51 $ hg remove normal1 large1
51 $ hg remove normal1 large1
52 $ hg commit -m "remove files"
52 $ hg commit -m "remove files"
53 $ ls
53 $ ls
54 sub
54 sub
55
55
56 Copy both largefiles and normal files.
56 Copy both largefiles and normal files.
57
57
58 $ hg cp sub/normal2 normal1
58 $ hg cp sub/normal2 normal1
59 $ hg cp sub/large2 large1
59 $ hg cp sub/large2 large1
60 $ hg commit -m "copy files"
60 $ hg commit -m "copy files"
61 $ cat normal1
61 $ cat normal1
62 normal22
62 normal22
63 $ cat large1
63 $ cat large1
64 large22
64 large22
65
65
66 Test moving largefiles and verify that normal files are also unaffected.
66 Test moving largefiles and verify that normal files are also unaffected.
67
67
68 $ hg mv normal1 normal3
68 $ hg mv normal1 normal3
69 $ hg mv large1 large3
69 $ hg mv large1 large3
70 $ hg mv sub/normal2 sub/normal4
70 $ hg mv sub/normal2 sub/normal4
71 $ hg mv sub/large2 sub/large4
71 $ hg mv sub/large2 sub/large4
72 $ hg commit -m "move files"
72 $ hg commit -m "move files"
73 $ cat normal3
73 $ cat normal3
74 normal22
74 normal22
75 $ cat large3
75 $ cat large3
76 large22
76 large22
77 $ cat sub/normal4
77 $ cat sub/normal4
78 normal22
78 normal22
79 $ cat sub/large4
79 $ cat sub/large4
80 large22
80 large22
81
81
82 Test archiving the various revisions. These hit corner cases known with
82 Test archiving the various revisions. These hit corner cases known with
83 archiving.
83 archiving.
84
84
85 $ hg archive -r 0 ../archive0
85 $ hg archive -r 0 ../archive0
86 $ hg archive -r 1 ../archive1
86 $ hg archive -r 1 ../archive1
87 $ hg archive -r 2 ../archive2
87 $ hg archive -r 2 ../archive2
88 $ hg archive -r 3 ../archive3
88 $ hg archive -r 3 ../archive3
89 $ hg archive -r 4 ../archive4
89 $ hg archive -r 4 ../archive4
90 $ cd ../archive0
90 $ cd ../archive0
91 $ cat normal1
91 $ cat normal1
92 normal1
92 normal1
93 $ cat large1
93 $ cat large1
94 large1
94 large1
95 $ cat sub/normal2
95 $ cat sub/normal2
96 normal2
96 normal2
97 $ cat sub/large2
97 $ cat sub/large2
98 large2
98 large2
99 $ cd ../archive1
99 $ cd ../archive1
100 $ cat normal1
100 $ cat normal1
101 normal11
101 normal11
102 $ cat large1
102 $ cat large1
103 large11
103 large11
104 $ cat sub/normal2
104 $ cat sub/normal2
105 normal22
105 normal22
106 $ cat sub/large2
106 $ cat sub/large2
107 large22
107 large22
108 $ cd ../archive2
108 $ cd ../archive2
109 $ ls
109 $ ls
110 sub
110 sub
111 $ cat sub/normal2
111 $ cat sub/normal2
112 normal22
112 normal22
113 $ cat sub/large2
113 $ cat sub/large2
114 large22
114 large22
115 $ cd ../archive3
115 $ cd ../archive3
116 $ cat normal1
116 $ cat normal1
117 normal22
117 normal22
118 $ cat large1
118 $ cat large1
119 large22
119 large22
120 $ cat sub/normal2
120 $ cat sub/normal2
121 normal22
121 normal22
122 $ cat sub/large2
122 $ cat sub/large2
123 large22
123 large22
124 $ cd ../archive4
124 $ cd ../archive4
125 $ cat normal3
125 $ cat normal3
126 normal22
126 normal22
127 $ cat large3
127 $ cat large3
128 large22
128 large22
129 $ cat sub/normal4
129 $ cat sub/normal4
130 normal22
130 normal22
131 $ cat sub/large4
131 $ cat sub/large4
132 large22
132 large22
133
133
134 Commit corner case: specify files to commit.
134 Commit corner case: specify files to commit.
135
135
136 $ cd ../a
136 $ cd ../a
137 $ echo normal3 > normal3
137 $ echo normal3 > normal3
138 $ echo large3 > large3
138 $ echo large3 > large3
139 $ echo normal4 > sub/normal4
139 $ echo normal4 > sub/normal4
140 $ echo large4 > sub/large4
140 $ echo large4 > sub/large4
141 $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
141 $ hg commit normal3 large3 sub/normal4 sub/large4 -m "edit files again"
142 $ cat normal3
142 $ cat normal3
143 normal3
143 normal3
144 $ cat large3
144 $ cat large3
145 large3
145 large3
146 $ cat sub/normal4
146 $ cat sub/normal4
147 normal4
147 normal4
148 $ cat sub/large4
148 $ cat sub/large4
149 large4
149 large4
150
150
151 One more commit corner case: commit from a subdirectory.
151 One more commit corner case: commit from a subdirectory.
152
152
153 $ cd ../a
153 $ cd ../a
154 $ echo normal33 > normal3
154 $ echo normal33 > normal3
155 $ echo large33 > large3
155 $ echo large33 > large3
156 $ echo normal44 > sub/normal4
156 $ echo normal44 > sub/normal4
157 $ echo large44 > sub/large4
157 $ echo large44 > sub/large4
158 $ cd sub
158 $ cd sub
159 $ hg commit -m "edit files yet again"
159 $ hg commit -m "edit files yet again"
160 $ cat ../normal3
160 $ cat ../normal3
161 normal33
161 normal33
162 $ cat ../large3
162 $ cat ../large3
163 large33
163 large33
164 $ cat normal4
164 $ cat normal4
165 normal44
165 normal44
166 $ cat large4
166 $ cat large4
167 large44
167 large44
168
168
169 Committing standins is not allowed.
169 Committing standins is not allowed.
170
170
171 $ cd ..
171 $ cd ..
172 $ echo large3 > large3
172 $ echo large3 > large3
173 $ hg commit .hglf/large3 -m "try to commit standin"
173 $ hg commit .hglf/large3 -m "try to commit standin"
174 abort: file ".hglf/large3" is a largefile standin
174 abort: file ".hglf/large3" is a largefile standin
175 (commit the largefile itself instead)
175 (commit the largefile itself instead)
176 [255]
176 [255]
177
177
178 Corner cases for adding largefiles.
178 Corner cases for adding largefiles.
179
179
180 $ echo large5 > large5
180 $ echo large5 > large5
181 $ hg add --large large5
181 $ hg add --large large5
182 $ hg add --large large5
182 $ hg add --large large5
183 large5 already a largefile
183 large5 already a largefile
184 $ mkdir sub2
184 $ mkdir sub2
185 $ echo large6 > sub2/large6
185 $ echo large6 > sub2/large6
186 $ echo large7 > sub2/large7
186 $ echo large7 > sub2/large7
187 $ hg add --large sub2
187 $ hg add --large sub2
188 adding sub2/large6 as a largefile
188 adding sub2/large6 as a largefile
189 adding sub2/large7 as a largefile
189 adding sub2/large7 as a largefile
190 $ hg st
190 $ hg st
191 M large3
191 M large3
192 A large5
192 A large5
193 A sub2/large6
193 A sub2/large6
194 A sub2/large7
194 A sub2/large7
195
195
196 Config settings (pattern **.dat, minsize 2 MB) are respected.
196 Config settings (pattern **.dat, minsize 2 MB) are respected.
197
197
198 $ echo testdata > test.dat
198 $ echo testdata > test.dat
199 $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
199 $ dd bs=1k count=2k if=/dev/zero of=reallylarge > /dev/null 2> /dev/null
200 $ hg add
200 $ hg add
201 adding reallylarge as a largefile
201 adding reallylarge as a largefile
202 adding test.dat as a largefile
202 adding test.dat as a largefile
203
203
204 Test that minsize and --lfsize handle float values;
204 Test that minsize and --lfsize handle float values;
205 also tests that --lfsize overrides largefiles.minsize.
205 also tests that --lfsize overrides largefiles.minsize.
206 (0.250 MB = 256 kB = 262144 B)
206 (0.250 MB = 256 kB = 262144 B)
207
207
208 $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
208 $ dd if=/dev/zero of=ratherlarge bs=1024 count=256 > /dev/null 2> /dev/null
209 $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
209 $ dd if=/dev/zero of=medium bs=1024 count=128 > /dev/null 2> /dev/null
210 $ hg --config largefiles.minsize=.25 add
210 $ hg --config largefiles.minsize=.25 add
211 adding ratherlarge as a largefile
211 adding ratherlarge as a largefile
212 adding medium
212 adding medium
213 $ hg forget medium
213 $ hg forget medium
214 $ hg --config largefiles.minsize=.25 add --lfsize=.125
214 $ hg --config largefiles.minsize=.25 add --lfsize=.125
215 adding medium as a largefile
215 adding medium as a largefile
216 $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
216 $ dd if=/dev/zero of=notlarge bs=1024 count=127 > /dev/null 2> /dev/null
217 $ hg --config largefiles.minsize=.25 add --lfsize=.125
217 $ hg --config largefiles.minsize=.25 add --lfsize=.125
218 adding notlarge
218 adding notlarge
219 $ hg forget notlarge
219 $ hg forget notlarge
220
220
221 Test forget on largefiles.
221 Test forget on largefiles.
222
222
223 $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
223 $ hg forget large3 large5 test.dat reallylarge ratherlarge medium
224 $ hg st
224 $ hg st
225 A sub2/large6
225 A sub2/large6
226 A sub2/large7
226 A sub2/large7
227 R large3
227 R large3
228 ? large5
228 ? large5
229 ? medium
229 ? medium
230 ? notlarge
230 ? notlarge
231 ? ratherlarge
231 ? ratherlarge
232 ? reallylarge
232 ? reallylarge
233 ? test.dat
233 ? test.dat
234 $ hg commit -m "add/edit more largefiles"
234 $ hg commit -m "add/edit more largefiles"
235 $ hg st
235 $ hg st
236 ? large3
236 ? large3
237 ? large5
237 ? large5
238 ? medium
238 ? medium
239 ? notlarge
239 ? notlarge
240 ? ratherlarge
240 ? ratherlarge
241 ? reallylarge
241 ? reallylarge
242 ? test.dat
242 ? test.dat
243
243
244 Purge with largefiles: verify that largefiles are still in the working
244 Purge with largefiles: verify that largefiles are still in the working
245 dir after a purge.
245 dir after a purge.
246
246
247 $ hg purge --all
247 $ hg purge --all
248 $ cat sub/large4
248 $ cat sub/large4
249 large44
249 large44
250 $ cat sub2/large6
250 $ cat sub2/large6
251 large6
251 large6
252 $ cat sub2/large7
252 $ cat sub2/large7
253 large7
253 large7
254
254
255 Clone a largefiles repo.
255 Clone a largefiles repo.
256
256
257 $ cd ..
257 $ cd ..
258 $ hg clone a b
258 $ hg clone a b
259 updating to branch default
259 updating to branch default
260 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
260 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
261 getting changed largefiles
261 getting changed largefiles
262 3 largefiles updated, 0 removed
262 3 largefiles updated, 0 removed
263 $ cd b
263 $ cd b
264 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
264 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
265 7:daea875e9014 add/edit more largefiles
265 7:daea875e9014 add/edit more largefiles
266 6:4355d653f84f edit files yet again
266 6:4355d653f84f edit files yet again
267 5:9d5af5072dbd edit files again
267 5:9d5af5072dbd edit files again
268 4:74c02385b94c move files
268 4:74c02385b94c move files
269 3:9e8fbc4bce62 copy files
269 3:9e8fbc4bce62 copy files
270 2:51a0ae4d5864 remove files
270 2:51a0ae4d5864 remove files
271 1:ce8896473775 edit files
271 1:ce8896473775 edit files
272 0:30d30fe6a5be add files
272 0:30d30fe6a5be add files
273 $ cat normal3
273 $ cat normal3
274 normal33
274 normal33
275 $ cat sub/normal4
275 $ cat sub/normal4
276 normal44
276 normal44
277 $ cat sub/large4
277 $ cat sub/large4
278 large44
278 large44
279 $ cat sub2/large6
279 $ cat sub2/large6
280 large6
280 large6
281 $ cat sub2/large7
281 $ cat sub2/large7
282 large7
282 large7
283 $ cd ..
283 $ cd ..
284 $ hg clone a -r 3 c
284 $ hg clone a -r 3 c
285 adding changesets
285 adding changesets
286 adding manifests
286 adding manifests
287 adding file changes
287 adding file changes
288 added 4 changesets with 10 changes to 4 files
288 added 4 changesets with 10 changes to 4 files
289 updating to branch default
289 updating to branch default
290 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
290 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
291 getting changed largefiles
291 getting changed largefiles
292 2 largefiles updated, 0 removed
292 2 largefiles updated, 0 removed
293 $ cd c
293 $ cd c
294 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
294 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
295 3:9e8fbc4bce62 copy files
295 3:9e8fbc4bce62 copy files
296 2:51a0ae4d5864 remove files
296 2:51a0ae4d5864 remove files
297 1:ce8896473775 edit files
297 1:ce8896473775 edit files
298 0:30d30fe6a5be add files
298 0:30d30fe6a5be add files
299 $ cat normal1
299 $ cat normal1
300 normal22
300 normal22
301 $ cat large1
301 $ cat large1
302 large22
302 large22
303 $ cat sub/normal2
303 $ cat sub/normal2
304 normal22
304 normal22
305 $ cat sub/large2
305 $ cat sub/large2
306 large22
306 large22
307
307
308 Old revisions of a clone have correct largefiles content (this also
308 Old revisions of a clone have correct largefiles content (this also
309 tests update).
309 tests update).
310
310
311 $ hg update -r 1
311 $ hg update -r 1
312 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
312 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
313 getting changed largefiles
313 getting changed largefiles
314 1 largefiles updated, 0 removed
314 1 largefiles updated, 0 removed
315 $ cat large1
315 $ cat large1
316 large11
316 large11
317 $ cat sub/large2
317 $ cat sub/large2
318 large22
318 large22
319
319
320 Rebasing between two repositories does not revert largefiles to old
320 Rebasing between two repositories does not revert largefiles to old
321 revisions (this was a very bad bug that took a lot of work to fix).
321 revisions (this was a very bad bug that took a lot of work to fix).
322
322
323 $ cd ..
323 $ cd ..
324 $ hg clone a d
324 $ hg clone a d
325 updating to branch default
325 updating to branch default
326 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
326 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
327 getting changed largefiles
327 getting changed largefiles
328 3 largefiles updated, 0 removed
328 3 largefiles updated, 0 removed
329 $ cd b
329 $ cd b
330 $ echo large4-modified > sub/large4
330 $ echo large4-modified > sub/large4
331 $ echo normal3-modified > normal3
331 $ echo normal3-modified > normal3
332 $ hg commit -m "modify normal file and largefile in repo b"
332 $ hg commit -m "modify normal file and largefile in repo b"
333 $ cd ../d
333 $ cd ../d
334 $ echo large6-modified > sub2/large6
334 $ echo large6-modified > sub2/large6
335 $ echo normal4-modified > sub/normal4
335 $ echo normal4-modified > sub/normal4
336 $ hg commit -m "modify normal file largefile in repo d"
336 $ hg commit -m "modify normal file largefile in repo d"
337 $ cd ..
337 $ cd ..
338 $ hg clone d e
338 $ hg clone d e
339 updating to branch default
339 updating to branch default
340 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
340 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
341 getting changed largefiles
341 getting changed largefiles
342 3 largefiles updated, 0 removed
342 3 largefiles updated, 0 removed
343 $ cd d
343 $ cd d
344 $ hg pull --rebase ../b
344 $ hg pull --rebase ../b
345 pulling from ../b
345 pulling from ../b
346 searching for changes
346 searching for changes
347 adding changesets
347 adding changesets
348 adding manifests
348 adding manifests
349 adding file changes
349 adding file changes
350 added 1 changesets with 2 changes to 2 files (+1 heads)
350 added 1 changesets with 2 changes to 2 files (+1 heads)
351 getting changed largefiles
351 getting changed largefiles
352 1 largefiles updated, 0 removed
352 1 largefiles updated, 0 removed
353 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg
353 saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-backup.hg
354 nothing to rebase
354 nothing to rebase
355 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
355 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
356 9:598410d3eb9a modify normal file largefile in repo d
356 9:598410d3eb9a modify normal file largefile in repo d
357 8:a381d2c8c80e modify normal file and largefile in repo b
357 8:a381d2c8c80e modify normal file and largefile in repo b
358 7:daea875e9014 add/edit more largefiles
358 7:daea875e9014 add/edit more largefiles
359 6:4355d653f84f edit files yet again
359 6:4355d653f84f edit files yet again
360 5:9d5af5072dbd edit files again
360 5:9d5af5072dbd edit files again
361 4:74c02385b94c move files
361 4:74c02385b94c move files
362 3:9e8fbc4bce62 copy files
362 3:9e8fbc4bce62 copy files
363 2:51a0ae4d5864 remove files
363 2:51a0ae4d5864 remove files
364 1:ce8896473775 edit files
364 1:ce8896473775 edit files
365 0:30d30fe6a5be add files
365 0:30d30fe6a5be add files
366 $ cat normal3
366 $ cat normal3
367 normal3-modified
367 normal3-modified
368 $ cat sub/normal4
368 $ cat sub/normal4
369 normal4-modified
369 normal4-modified
370 $ cat sub/large4
370 $ cat sub/large4
371 large4-modified
371 large4-modified
372 $ cat sub2/large6
372 $ cat sub2/large6
373 large6-modified
373 large6-modified
374 $ cat sub2/large7
374 $ cat sub2/large7
375 large7
375 large7
376 $ cd ../e
376 $ cd ../e
377 $ hg pull ../b
377 $ hg pull ../b
378 pulling from ../b
378 pulling from ../b
379 searching for changes
379 searching for changes
380 adding changesets
380 adding changesets
381 adding manifests
381 adding manifests
382 adding file changes
382 adding file changes
383 added 1 changesets with 2 changes to 2 files (+1 heads)
383 added 1 changesets with 2 changes to 2 files (+1 heads)
384 (run 'hg heads' to see heads, 'hg merge' to merge)
384 (run 'hg heads' to see heads, 'hg merge' to merge)
385 $ hg rebase
385 $ hg rebase
386 getting changed largefiles
386 getting changed largefiles
387 1 largefiles updated, 0 removed
387 1 largefiles updated, 0 removed
388 saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg
388 saved backup bundle to $TESTTMP/e/.hg/strip-backup/f574fb32bb45-backup.hg
389 $ hg log
389 $ hg log
390 changeset: 9:598410d3eb9a
390 changeset: 9:598410d3eb9a
391 tag: tip
391 tag: tip
392 user: test
392 user: test
393 date: Thu Jan 01 00:00:00 1970 +0000
393 date: Thu Jan 01 00:00:00 1970 +0000
394 summary: modify normal file largefile in repo d
394 summary: modify normal file largefile in repo d
395
395
396 changeset: 8:a381d2c8c80e
396 changeset: 8:a381d2c8c80e
397 user: test
397 user: test
398 date: Thu Jan 01 00:00:00 1970 +0000
398 date: Thu Jan 01 00:00:00 1970 +0000
399 summary: modify normal file and largefile in repo b
399 summary: modify normal file and largefile in repo b
400
400
401 changeset: 7:daea875e9014
401 changeset: 7:daea875e9014
402 user: test
402 user: test
403 date: Thu Jan 01 00:00:00 1970 +0000
403 date: Thu Jan 01 00:00:00 1970 +0000
404 summary: add/edit more largefiles
404 summary: add/edit more largefiles
405
405
406 changeset: 6:4355d653f84f
406 changeset: 6:4355d653f84f
407 user: test
407 user: test
408 date: Thu Jan 01 00:00:00 1970 +0000
408 date: Thu Jan 01 00:00:00 1970 +0000
409 summary: edit files yet again
409 summary: edit files yet again
410
410
411 changeset: 5:9d5af5072dbd
411 changeset: 5:9d5af5072dbd
412 user: test
412 user: test
413 date: Thu Jan 01 00:00:00 1970 +0000
413 date: Thu Jan 01 00:00:00 1970 +0000
414 summary: edit files again
414 summary: edit files again
415
415
416 changeset: 4:74c02385b94c
416 changeset: 4:74c02385b94c
417 user: test
417 user: test
418 date: Thu Jan 01 00:00:00 1970 +0000
418 date: Thu Jan 01 00:00:00 1970 +0000
419 summary: move files
419 summary: move files
420
420
421 changeset: 3:9e8fbc4bce62
421 changeset: 3:9e8fbc4bce62
422 user: test
422 user: test
423 date: Thu Jan 01 00:00:00 1970 +0000
423 date: Thu Jan 01 00:00:00 1970 +0000
424 summary: copy files
424 summary: copy files
425
425
426 changeset: 2:51a0ae4d5864
426 changeset: 2:51a0ae4d5864
427 user: test
427 user: test
428 date: Thu Jan 01 00:00:00 1970 +0000
428 date: Thu Jan 01 00:00:00 1970 +0000
429 summary: remove files
429 summary: remove files
430
430
431 changeset: 1:ce8896473775
431 changeset: 1:ce8896473775
432 user: test
432 user: test
433 date: Thu Jan 01 00:00:00 1970 +0000
433 date: Thu Jan 01 00:00:00 1970 +0000
434 summary: edit files
434 summary: edit files
435
435
436 changeset: 0:30d30fe6a5be
436 changeset: 0:30d30fe6a5be
437 user: test
437 user: test
438 date: Thu Jan 01 00:00:00 1970 +0000
438 date: Thu Jan 01 00:00:00 1970 +0000
439 summary: add files
439 summary: add files
440
440
441 $ cat normal3
441 $ cat normal3
442 normal3-modified
442 normal3-modified
443 $ cat sub/normal4
443 $ cat sub/normal4
444 normal4-modified
444 normal4-modified
445 $ cat sub/large4
445 $ cat sub/large4
446 large4-modified
446 large4-modified
447 $ cat sub2/large6
447 $ cat sub2/large6
448 large6-modified
448 large6-modified
449 $ cat sub2/large7
449 $ cat sub2/large7
450 large7
450 large7
451
451
452 Rollback on largefiles.
452 Rollback on largefiles.
453
453
454 $ echo large4-modified-again > sub/large4
454 $ echo large4-modified-again > sub/large4
455 $ hg commit -m "Modify large4 again"
455 $ hg commit -m "Modify large4 again"
456 $ hg rollback
456 $ hg rollback
457 repository tip rolled back to revision 9 (undo commit)
457 repository tip rolled back to revision 9 (undo commit)
458 working directory now based on revision 9
458 working directory now based on revision 9
459 $ hg st
459 $ hg st
460 M sub/large4
460 M sub/large4
461 $ hg log
461 $ hg log
462 changeset: 9:598410d3eb9a
462 changeset: 9:598410d3eb9a
463 tag: tip
463 tag: tip
464 user: test
464 user: test
465 date: Thu Jan 01 00:00:00 1970 +0000
465 date: Thu Jan 01 00:00:00 1970 +0000
466 summary: modify normal file largefile in repo d
466 summary: modify normal file largefile in repo d
467
467
468 changeset: 8:a381d2c8c80e
468 changeset: 8:a381d2c8c80e
469 user: test
469 user: test
470 date: Thu Jan 01 00:00:00 1970 +0000
470 date: Thu Jan 01 00:00:00 1970 +0000
471 summary: modify normal file and largefile in repo b
471 summary: modify normal file and largefile in repo b
472
472
473 changeset: 7:daea875e9014
473 changeset: 7:daea875e9014
474 user: test
474 user: test
475 date: Thu Jan 01 00:00:00 1970 +0000
475 date: Thu Jan 01 00:00:00 1970 +0000
476 summary: add/edit more largefiles
476 summary: add/edit more largefiles
477
477
478 changeset: 6:4355d653f84f
478 changeset: 6:4355d653f84f
479 user: test
479 user: test
480 date: Thu Jan 01 00:00:00 1970 +0000
480 date: Thu Jan 01 00:00:00 1970 +0000
481 summary: edit files yet again
481 summary: edit files yet again
482
482
483 changeset: 5:9d5af5072dbd
483 changeset: 5:9d5af5072dbd
484 user: test
484 user: test
485 date: Thu Jan 01 00:00:00 1970 +0000
485 date: Thu Jan 01 00:00:00 1970 +0000
486 summary: edit files again
486 summary: edit files again
487
487
488 changeset: 4:74c02385b94c
488 changeset: 4:74c02385b94c
489 user: test
489 user: test
490 date: Thu Jan 01 00:00:00 1970 +0000
490 date: Thu Jan 01 00:00:00 1970 +0000
491 summary: move files
491 summary: move files
492
492
493 changeset: 3:9e8fbc4bce62
493 changeset: 3:9e8fbc4bce62
494 user: test
494 user: test
495 date: Thu Jan 01 00:00:00 1970 +0000
495 date: Thu Jan 01 00:00:00 1970 +0000
496 summary: copy files
496 summary: copy files
497
497
498 changeset: 2:51a0ae4d5864
498 changeset: 2:51a0ae4d5864
499 user: test
499 user: test
500 date: Thu Jan 01 00:00:00 1970 +0000
500 date: Thu Jan 01 00:00:00 1970 +0000
501 summary: remove files
501 summary: remove files
502
502
503 changeset: 1:ce8896473775
503 changeset: 1:ce8896473775
504 user: test
504 user: test
505 date: Thu Jan 01 00:00:00 1970 +0000
505 date: Thu Jan 01 00:00:00 1970 +0000
506 summary: edit files
506 summary: edit files
507
507
508 changeset: 0:30d30fe6a5be
508 changeset: 0:30d30fe6a5be
509 user: test
509 user: test
510 date: Thu Jan 01 00:00:00 1970 +0000
510 date: Thu Jan 01 00:00:00 1970 +0000
511 summary: add files
511 summary: add files
512
512
513 $ cat sub/large4
513 $ cat sub/large4
514 large4-modified-again
514 large4-modified-again
515
515
516 "update --check" refuses to update with uncommitted changes.
516 "update --check" refuses to update with uncommitted changes.
517 $ hg update --check 8
517 $ hg update --check 8
518 abort: uncommitted local changes
518 abort: uncommitted local changes
519 [255]
519 [255]
520
520
521 "update --clean" leaves correct largefiles in working copy.
521 "update --clean" leaves correct largefiles in working copy.
522
522
523 $ hg update --clean
523 $ hg update --clean
524 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
524 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
525 getting changed largefiles
525 getting changed largefiles
526 1 largefiles updated, 0 removed
526 1 largefiles updated, 0 removed
527 $ cat normal3
527 $ cat normal3
528 normal3-modified
528 normal3-modified
529 $ cat sub/normal4
529 $ cat sub/normal4
530 normal4-modified
530 normal4-modified
531 $ cat sub/large4
531 $ cat sub/large4
532 large4-modified
532 large4-modified
533 $ cat sub2/large6
533 $ cat sub2/large6
534 large6-modified
534 large6-modified
535 $ cat sub2/large7
535 $ cat sub2/large7
536 large7
536 large7
537
537
538 Now "update check" is happy.
538 Now "update check" is happy.
539 $ hg update --check 8
539 $ hg update --check 8
540 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
540 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
541 getting changed largefiles
541 getting changed largefiles
542 1 largefiles updated, 0 removed
542 1 largefiles updated, 0 removed
543 $ hg update --check
543 $ hg update --check
544 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
544 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
545 getting changed largefiles
545 getting changed largefiles
546 1 largefiles updated, 0 removed
546 1 largefiles updated, 0 removed
547
547
548 "revert" works on largefiles (and normal files too).
548 "revert" works on largefiles (and normal files too).
549 $ echo hack3 >> normal3
549 $ echo hack3 >> normal3
550 $ echo hack4 >> sub/normal4
550 $ echo hack4 >> sub/normal4
551 $ echo hack4 >> sub/large4
551 $ echo hack4 >> sub/large4
552 $ hg rm sub2/large6
552 $ hg rm sub2/large6
553 $ echo new >> sub2/large8
553 $ echo new >> sub2/large8
554 $ hg add --large sub2/large8
554 $ hg add --large sub2/large8
555 # XXX we don't really want to report that we're reverting the standin;
555 # XXX we don't really want to report that we're reverting the standin;
556 # that's just an implementation detail. But I don't see an obvious fix. ;-(
556 # that's just an implementation detail. But I don't see an obvious fix. ;-(
557 $ hg revert sub
557 $ hg revert sub
558 reverting .hglf/sub/large4
558 reverting .hglf/sub/large4
559 reverting sub/normal4
559 reverting sub/normal4
560 $ hg status
560 $ hg status
561 M normal3
561 M normal3
562 A sub2/large8
562 A sub2/large8
563 R sub2/large6
563 R sub2/large6
564 ? sub/large4.orig
564 ? sub/large4.orig
565 ? sub/normal4.orig
565 ? sub/normal4.orig
566 $ cat sub/normal4
566 $ cat sub/normal4
567 normal4-modified
567 normal4-modified
568 $ cat sub/large4
568 $ cat sub/large4
569 large4-modified
569 large4-modified
570 $ hg revert -a --no-backup
570 $ hg revert -a --no-backup
571 undeleting .hglf/sub2/large6
571 undeleting .hglf/sub2/large6
572 forgetting .hglf/sub2/large8
572 forgetting .hglf/sub2/large8
573 reverting normal3
573 reverting normal3
574 $ hg status
574 $ hg status
575 ? sub/large4.orig
575 ? sub/large4.orig
576 ? sub/normal4.orig
576 ? sub/normal4.orig
577 ? sub2/large8
577 ? sub2/large8
578 $ cat normal3
578 $ cat normal3
579 normal3-modified
579 normal3-modified
580 $ cat sub2/large6
580 $ cat sub2/large6
581 large6-modified
581 large6-modified
582 $ rm sub/*.orig sub2/large8
582 $ rm sub/*.orig sub2/large8
583
583
584 revert some files to an older revision
584 revert some files to an older revision
585 $ hg revert --no-backup -r 8 sub2
585 $ hg revert --no-backup -r 8 sub2
586 reverting .hglf/sub2/large6
586 reverting .hglf/sub2/large6
587 $ cat sub2/large6
587 $ cat sub2/large6
588 large6
588 large6
589 $ hg revert --no-backup sub2
589 $ hg revert --no-backup sub2
590 reverting .hglf/sub2/large6
590 reverting .hglf/sub2/large6
591 $ hg status
591 $ hg status
592
592
593 "verify --large" actually verifies largefiles
593 "verify --large" actually verifies largefiles
594
594
595 $ hg verify --large
595 $ hg verify --large
596 checking changesets
596 checking changesets
597 checking manifests
597 checking manifests
598 crosschecking files in changesets and manifests
598 crosschecking files in changesets and manifests
599 checking files
599 checking files
600 10 files, 10 changesets, 28 total revisions
600 10 files, 10 changesets, 28 total revisions
601 searching 1 changesets for largefiles
601 searching 1 changesets for largefiles
602 verified existence of 3 revisions of 3 largefiles
602 verified existence of 3 revisions of 3 largefiles
603
603
604 Merging does not revert to old versions of largefiles (this has also
604 Merging does not revert to old versions of largefiles (this has also
605 been very problematic).
605 been very problematic).
606
606
607 $ cd ..
607 $ cd ..
608 $ hg clone -r 7 e f
608 $ hg clone -r 7 e f
609 adding changesets
609 adding changesets
610 adding manifests
610 adding manifests
611 adding file changes
611 adding file changes
612 added 8 changesets with 24 changes to 10 files
612 added 8 changesets with 24 changes to 10 files
613 updating to branch default
613 updating to branch default
614 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
614 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
615 getting changed largefiles
615 getting changed largefiles
616 3 largefiles updated, 0 removed
616 3 largefiles updated, 0 removed
617 $ cd f
617 $ cd f
618 $ echo "large4-merge-test" > sub/large4
618 $ echo "large4-merge-test" > sub/large4
619 $ hg commit -m "Modify large4 to test merge"
619 $ hg commit -m "Modify large4 to test merge"
620 $ hg pull ../e
620 $ hg pull ../e
621 pulling from ../e
621 pulling from ../e
622 searching for changes
622 searching for changes
623 adding changesets
623 adding changesets
624 adding manifests
624 adding manifests
625 adding file changes
625 adding file changes
626 added 2 changesets with 4 changes to 4 files (+1 heads)
626 added 2 changesets with 4 changes to 4 files (+1 heads)
627 (run 'hg heads' to see heads, 'hg merge' to merge)
627 (run 'hg heads' to see heads, 'hg merge' to merge)
628 $ hg merge
628 $ hg merge
629 merging sub/large4
629 merging sub/large4
630 largefile sub/large4 has a merge conflict
630 largefile sub/large4 has a merge conflict
631 keep (l)ocal or take (o)ther? l
631 keep (l)ocal or take (o)ther? l
632 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
632 3 files updated, 1 files merged, 0 files removed, 0 files unresolved
633 (branch merge, don't forget to commit)
633 (branch merge, don't forget to commit)
634 getting changed largefiles
634 getting changed largefiles
635 1 largefiles updated, 0 removed
635 1 largefiles updated, 0 removed
636 $ hg commit -m "Merge repos e and f"
636 $ hg commit -m "Merge repos e and f"
637 $ cat normal3
637 $ cat normal3
638 normal3-modified
638 normal3-modified
639 $ cat sub/normal4
639 $ cat sub/normal4
640 normal4-modified
640 normal4-modified
641 $ cat sub/large4
641 $ cat sub/large4
642 large4-merge-test
642 large4-merge-test
643 $ cat sub2/large6
643 $ cat sub2/large6
644 large6-modified
644 large6-modified
645 $ cat sub2/large7
645 $ cat sub2/large7
646 large7
646 large7
647
647
648 Test that a normal file and a largefile with the same name and path cannot
648 Test that a normal file and a largefile with the same name and path cannot
649 coexist.
649 coexist.
650
650
651 $ rm sub2/large7
651 $ rm sub2/large7
652 $ echo "largeasnormal" > sub2/large7
652 $ echo "largeasnormal" > sub2/large7
653 $ hg add sub2/large7
653 $ hg add sub2/large7
654 sub2/large7 already a largefile
654 sub2/large7 already a largefile
655
655
656 Test that transplanting a largefile change works correctly.
656 Test that transplanting a largefile change works correctly.
657
657
658 $ cd ..
658 $ cd ..
659 $ hg clone -r 8 d g
659 $ hg clone -r 8 d g
660 adding changesets
660 adding changesets
661 adding manifests
661 adding manifests
662 adding file changes
662 adding file changes
663 added 9 changesets with 26 changes to 10 files
663 added 9 changesets with 26 changes to 10 files
664 updating to branch default
664 updating to branch default
665 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
665 5 files updated, 0 files merged, 0 files removed, 0 files unresolved
666 getting changed largefiles
666 getting changed largefiles
667 3 largefiles updated, 0 removed
667 3 largefiles updated, 0 removed
668 $ cd g
668 $ cd g
669 $ hg transplant -s ../d 598410d3eb9a
669 $ hg transplant -s ../d 598410d3eb9a
670 searching for changes
670 searching for changes
671 searching for changes
671 searching for changes
672 adding changesets
672 adding changesets
673 adding manifests
673 adding manifests
674 adding file changes
674 adding file changes
675 added 1 changesets with 2 changes to 2 files
675 added 1 changesets with 2 changes to 2 files
676 getting changed largefiles
676 getting changed largefiles
677 1 largefiles updated, 0 removed
677 1 largefiles updated, 0 removed
678 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
678 $ hg log --template '{rev}:{node|short} {desc|firstline}\n'
679 9:598410d3eb9a modify normal file largefile in repo d
679 9:598410d3eb9a modify normal file largefile in repo d
680 8:a381d2c8c80e modify normal file and largefile in repo b
680 8:a381d2c8c80e modify normal file and largefile in repo b
681 7:daea875e9014 add/edit more largefiles
681 7:daea875e9014 add/edit more largefiles
682 6:4355d653f84f edit files yet again
682 6:4355d653f84f edit files yet again
683 5:9d5af5072dbd edit files again
683 5:9d5af5072dbd edit files again
684 4:74c02385b94c move files
684 4:74c02385b94c move files
685 3:9e8fbc4bce62 copy files
685 3:9e8fbc4bce62 copy files
686 2:51a0ae4d5864 remove files
686 2:51a0ae4d5864 remove files
687 1:ce8896473775 edit files
687 1:ce8896473775 edit files
688 0:30d30fe6a5be add files
688 0:30d30fe6a5be add files
689 $ cat normal3
689 $ cat normal3
690 normal3-modified
690 normal3-modified
691 $ cat sub/normal4
691 $ cat sub/normal4
692 normal4-modified
692 normal4-modified
693 $ cat sub/large4
693 $ cat sub/large4
694 large4-modified
694 large4-modified
695 $ cat sub2/large6
695 $ cat sub2/large6
696 large6-modified
696 large6-modified
697 $ cat sub2/large7
697 $ cat sub2/large7
698 large7
698 large7
699 $ cd ..
699 $ cd ..
700
700
701 vanilla clients not locked out from largefiles servers on vanilla repos
701 vanilla clients not locked out from largefiles servers on vanilla repos
702 $ mkdir r1
702 $ mkdir r1
703 $ cd r1
703 $ cd r1
704 $ hg init
704 $ hg init
705 $ echo c1 > f1
705 $ echo c1 > f1
706 $ hg add f1
706 $ hg add f1
707 $ hg com -m "m1"
707 $ hg com -m "m1"
708 $ cd ..
708 $ cd ..
709 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
709 $ hg serve -R r1 -d -p $HGPORT --pid-file hg.pid
710 $ cat hg.pid >> $DAEMON_PIDS
710 $ cat hg.pid >> $DAEMON_PIDS
711 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
711 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT r2
712 requesting all changes
712 requesting all changes
713 adding changesets
713 adding changesets
714 adding manifests
714 adding manifests
715 adding file changes
715 adding file changes
716 added 1 changesets with 1 changes to 1 files
716 added 1 changesets with 1 changes to 1 files
717 updating to branch default
717 updating to branch default
718 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
718 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
719
719
720 largefiles clients still work with vanilla servers
720 largefiles clients still work with vanilla servers
721 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
721 $ hg --config extensions.largefiles=! serve -R r1 -d -p $HGPORT1 --pid-file hg.pid
722 $ cat hg.pid >> $DAEMON_PIDS
722 $ cat hg.pid >> $DAEMON_PIDS
723 $ hg clone http://localhost:$HGPORT1 r3
723 $ hg clone http://localhost:$HGPORT1 r3
724 requesting all changes
724 requesting all changes
725 adding changesets
725 adding changesets
726 adding manifests
726 adding manifests
727 adding file changes
727 adding file changes
728 added 1 changesets with 1 changes to 1 files
728 added 1 changesets with 1 changes to 1 files
729 updating to branch default
729 updating to branch default
730 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
730 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
731
731
732 vanilla clients locked out from largefiles http repos
732 vanilla clients locked out from largefiles http repos
733 $ mkdir r4
733 $ mkdir r4
734 $ cd r4
734 $ cd r4
735 $ hg init
735 $ hg init
736 $ echo c1 > f1
736 $ echo c1 > f1
737 $ hg add --large f1
737 $ hg add --large f1
738 $ hg com -m "m1"
738 $ hg com -m "m1"
739 $ cd ..
739 $ cd ..
740 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
740 $ hg serve -R r4 -d -p $HGPORT2 --pid-file hg.pid
741 $ cat hg.pid >> $DAEMON_PIDS
741 $ cat hg.pid >> $DAEMON_PIDS
742 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
742 $ hg --config extensions.largefiles=! clone http://localhost:$HGPORT2 r5
743 abort: remote error:
743 abort: remote error:
744
744
745 This repository uses the largefiles extension.
745 This repository uses the largefiles extension.
746
746
747 Please enable it in your Mercurial config file.
747 Please enable it in your Mercurial config file.
748 [255]
748 [255]
749
749
750 used all HGPORTs, kill all daemons
750 used all HGPORTs, kill all daemons
751 $ "$TESTDIR/killdaemons.py"
751 $ "$TESTDIR/killdaemons.py"
752
752
753 vanilla clients locked out from largefiles ssh repos
753 vanilla clients locked out from largefiles ssh repos
754 $ hg --config extensions.largefiles=! clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/r4 r5
754 $ hg --config extensions.largefiles=! clone -e "python $TESTDIR/dummyssh" ssh://user@dummy/r4 r5
755 abort: remote error:
755 abort: remote error:
756
756
757 This repository uses the largefiles extension.
757 This repository uses the largefiles extension.
758
758
759 Please enable it in your Mercurial config file.
759 Please enable it in your Mercurial config file.
760 [255]
760 [255]
761
761
762 largefiles clients refuse to push largefiles repos to vanilla servers
762 largefiles clients refuse to push largefiles repos to vanilla servers
763 $ mkdir r6
763 $ mkdir r6
764 $ cd r6
764 $ cd r6
765 $ hg init
765 $ hg init
766 $ echo c1 > f1
766 $ echo c1 > f1
767 $ hg add f1
767 $ hg add f1
768 $ hg com -m "m1"
768 $ hg com -m "m1"
769 $ cat >> .hg/hgrc <<!
769 $ cat >> .hg/hgrc <<!
770 > [web]
770 > [web]
771 > push_ssl = false
771 > push_ssl = false
772 > allow_push = *
772 > allow_push = *
773 > !
773 > !
774 $ cd ..
774 $ cd ..
775 $ hg clone r6 r7
775 $ hg clone r6 r7
776 updating to branch default
776 updating to branch default
777 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
777 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
778 $ cd r7
778 $ cd r7
779 $ echo c2 > f2
779 $ echo c2 > f2
780 $ hg add --large f2
780 $ hg add --large f2
781 $ hg com -m "m2"
781 $ hg com -m "m2"
782 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
782 $ hg --config extensions.largefiles=! -R ../r6 serve -d -p $HGPORT --pid-file ../hg.pid
783 $ cat ../hg.pid >> $DAEMON_PIDS
783 $ cat ../hg.pid >> $DAEMON_PIDS
784 $ hg push http://localhost:$HGPORT
784 $ hg push http://localhost:$HGPORT
785 pushing to http://localhost:$HGPORT/
785 pushing to http://localhost:$HGPORT/
786 searching for changes
786 searching for changes
787 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
787 abort: http://localhost:$HGPORT/ does not appear to be a largefile store
788 [255]
788 [255]
789 $ cd ..
789 $ cd ..
790
790
791 $ cd ..
791 $ cd ..
792
792
793 Clone a local repository owned by another user
793 Clone a local repository owned by another user
794 We have to simulate that here by setting $HOME and removing write permissions
794 We have to simulate that here by setting $HOME and removing write permissions
795 $ ORIGHOME="$HOME"
795 $ ORIGHOME="$HOME"
796 $ mkdir alice
796 $ mkdir alice
797 $ HOME="`pwd`/alice"
797 $ HOME="`pwd`/alice"
798 $ cd alice
798 $ cd alice
799 $ hg init pubrepo
799 $ hg init pubrepo
800 $ cd pubrepo
800 $ cd pubrepo
801 $ dd if=/dev/urandom bs=1k count=11k > a-large-file 2> /dev/null
801 $ dd if=/dev/urandom bs=1k count=11k > a-large-file 2> /dev/null
802 $ hg add --large a-large-file
802 $ hg add --large a-large-file
803 $ hg commit -m "Add a large file"
803 $ hg commit -m "Add a large file"
804 $ cd ..
804 $ cd ..
805 $ chmod -R a-w pubrepo
805 $ chmod -R a-w pubrepo
806 $ cd ..
806 $ cd ..
807 $ mkdir bob
807 $ mkdir bob
808 $ HOME="`pwd`/bob"
808 $ HOME="`pwd`/bob"
809 $ cd bob
809 $ cd bob
810 $ hg clone --pull ../alice/pubrepo pubrepo
810 $ hg clone --pull ../alice/pubrepo pubrepo
811 requesting all changes
811 requesting all changes
812 adding changesets
812 adding changesets
813 adding manifests
813 adding manifests
814 adding file changes
814 adding file changes
815 added 1 changesets with 1 changes to 1 files
815 added 1 changesets with 1 changes to 1 files
816 updating to branch default
816 updating to branch default
817 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
817 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
818 getting changed largefiles
818 getting changed largefiles
819 1 largefiles updated, 0 removed
819 1 largefiles updated, 0 removed
820 $ cd ..
820 $ cd ..
821 $ HOME="$ORIGHOME"
821 $ HOME="$ORIGHOME"
822
822
823 Symlink to a large largefile should behave the same as a symlink to a normal file
823 Symlink to a large largefile should behave the same as a symlink to a normal file
824 $ hg init largesymlink
824 $ hg init largesymlink
825 $ cd largesymlink
825 $ cd largesymlink
826 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
826 $ dd if=/dev/zero bs=1k count=10k of=largefile 2>/dev/null
827 $ hg add --large largefile
827 $ hg add --large largefile
828 $ hg commit -m "commit a large file"
828 $ hg commit -m "commit a large file"
829 $ ln -s largefile largelink
829 $ ln -s largefile largelink
830 $ hg add largelink
830 $ hg add largelink
831 $ hg commit -m "commit a large symlink"
831 $ hg commit -m "commit a large symlink"
832 $ rm -f largelink
832 $ rm -f largelink
833 $ hg up >/dev/null
833 $ hg up >/dev/null
834 $ test -f largelink
834 $ test -f largelink
835 [1]
835 [1]
836 $ test -L largelink
836 $ test -L largelink
837 [1]
837 [1]
838 $ rm -f largelink # make next part of the test independent of the previous
838 $ rm -f largelink # make next part of the test independent of the previous
839 $ hg up -C >/dev/null
839 $ hg up -C >/dev/null
840 $ test -f largelink
840 $ test -f largelink
841 $ test -L largelink
841 $ test -L largelink
842 $ cd ..
842 $ cd ..
843
843
844
844
@@ -1,149 +1,150 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "mq=" >> $HGRCPATH
4 $ echo "mq=" >> $HGRCPATH
4 $ mkdir webdir
5 $ mkdir webdir
5 $ cd webdir
6 $ cd webdir
6 $ hg init a
7 $ hg init a
7 $ hg --cwd a qinit -c
8 $ hg --cwd a qinit -c
8 $ echo a > a/a
9 $ echo a > a/a
9 $ hg --cwd a ci -A -m a
10 $ hg --cwd a ci -A -m a
10 adding a
11 adding a
11 $ echo b > a/b
12 $ echo b > a/b
12 $ hg --cwd a addremove
13 $ hg --cwd a addremove
13 adding b
14 adding b
14 $ hg --cwd a qnew -f b.patch
15 $ hg --cwd a qnew -f b.patch
15 $ hg --cwd a qcommit -m b.patch
16 $ hg --cwd a qcommit -m b.patch
16 $ hg --cwd a log --template "{desc}\n"
17 $ hg --cwd a log --template "{desc}\n"
17 [mq]: b.patch
18 [mq]: b.patch
18 a
19 a
19 $ hg --cwd a/.hg/patches log --template "{desc}\n"
20 $ hg --cwd a/.hg/patches log --template "{desc}\n"
20 b.patch
21 b.patch
21 $ root=`pwd`
22 $ root=`pwd`
22 $ cd ..
23 $ cd ..
23
24
24 test with recursive collection
25 test with recursive collection
25
26
26 $ cat > collections.conf <<EOF
27 $ cat > collections.conf <<EOF
27 > [paths]
28 > [paths]
28 > /=$root/**
29 > /=$root/**
29 > EOF
30 > EOF
30 $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \
31 $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \
31 > -A access-paths.log -E error-paths-1.log
32 > -A access-paths.log -E error-paths-1.log
32 $ cat hg.pid >> $DAEMON_PIDS
33 $ cat hg.pid >> $DAEMON_PIDS
33 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw'
34 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw'
34 200 Script output follows
35 200 Script output follows
35
36
36
37
37 /a/
38 /a/
38 /a/.hg/patches/
39 /a/.hg/patches/
39
40
40 $ hg qclone http://localhost:$HGPORT/a b
41 $ hg qclone http://localhost:$HGPORT/a b
41 requesting all changes
42 requesting all changes
42 adding changesets
43 adding changesets
43 adding manifests
44 adding manifests
44 adding file changes
45 adding file changes
45 added 2 changesets with 2 changes to 2 files
46 added 2 changesets with 2 changes to 2 files
46 requesting all changes
47 requesting all changes
47 adding changesets
48 adding changesets
48 adding manifests
49 adding manifests
49 adding file changes
50 adding file changes
50 added 1 changesets with 3 changes to 3 files
51 added 1 changesets with 3 changes to 3 files
51 updating to branch default
52 updating to branch default
52 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
53 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
54 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
54 $ hg --cwd b log --template "{desc}\n"
55 $ hg --cwd b log --template "{desc}\n"
55 a
56 a
56 $ hg --cwd b qpush -a
57 $ hg --cwd b qpush -a
57 applying b.patch
58 applying b.patch
58 now at: b.patch
59 now at: b.patch
59 $ hg --cwd b log --template "{desc}\n"
60 $ hg --cwd b log --template "{desc}\n"
60 imported patch b.patch
61 imported patch b.patch
61 a
62 a
62
63
63 test with normal collection
64 test with normal collection
64
65
65 $ cat > collections1.conf <<EOF
66 $ cat > collections1.conf <<EOF
66 > [paths]
67 > [paths]
67 > /=$root/*
68 > /=$root/*
68 > EOF
69 > EOF
69 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf collections1.conf \
70 $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf collections1.conf \
70 > -A access-paths.log -E error-paths-1.log
71 > -A access-paths.log -E error-paths-1.log
71 $ cat hg.pid >> $DAEMON_PIDS
72 $ cat hg.pid >> $DAEMON_PIDS
72 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
73 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw'
73 200 Script output follows
74 200 Script output follows
74
75
75
76
76 /a/
77 /a/
77 /a/.hg/patches/
78 /a/.hg/patches/
78
79
79 $ hg qclone http://localhost:$HGPORT1/a c
80 $ hg qclone http://localhost:$HGPORT1/a c
80 requesting all changes
81 requesting all changes
81 adding changesets
82 adding changesets
82 adding manifests
83 adding manifests
83 adding file changes
84 adding file changes
84 added 2 changesets with 2 changes to 2 files
85 added 2 changesets with 2 changes to 2 files
85 requesting all changes
86 requesting all changes
86 adding changesets
87 adding changesets
87 adding manifests
88 adding manifests
88 adding file changes
89 adding file changes
89 added 1 changesets with 3 changes to 3 files
90 added 1 changesets with 3 changes to 3 files
90 updating to branch default
91 updating to branch default
91 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
92 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
92 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
93 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
93 $ hg --cwd c log --template "{desc}\n"
94 $ hg --cwd c log --template "{desc}\n"
94 a
95 a
95 $ hg --cwd c qpush -a
96 $ hg --cwd c qpush -a
96 applying b.patch
97 applying b.patch
97 now at: b.patch
98 now at: b.patch
98 $ hg --cwd c log --template "{desc}\n"
99 $ hg --cwd c log --template "{desc}\n"
99 imported patch b.patch
100 imported patch b.patch
100 a
101 a
101
102
102 test with old-style collection
103 test with old-style collection
103
104
104 $ cat > collections2.conf <<EOF
105 $ cat > collections2.conf <<EOF
105 > [collections]
106 > [collections]
106 > $root=$root
107 > $root=$root
107 > EOF
108 > EOF
108 $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \
109 $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \
109 > -A access-paths.log -E error-paths-1.log
110 > -A access-paths.log -E error-paths-1.log
110 $ cat hg.pid >> $DAEMON_PIDS
111 $ cat hg.pid >> $DAEMON_PIDS
111 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw'
112 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw'
112 200 Script output follows
113 200 Script output follows
113
114
114
115
115 /a/
116 /a/
116 /a/.hg/patches/
117 /a/.hg/patches/
117
118
118 $ hg qclone http://localhost:$HGPORT2/a d
119 $ hg qclone http://localhost:$HGPORT2/a d
119 requesting all changes
120 requesting all changes
120 adding changesets
121 adding changesets
121 adding manifests
122 adding manifests
122 adding file changes
123 adding file changes
123 added 2 changesets with 2 changes to 2 files
124 added 2 changesets with 2 changes to 2 files
124 requesting all changes
125 requesting all changes
125 adding changesets
126 adding changesets
126 adding manifests
127 adding manifests
127 adding file changes
128 adding file changes
128 added 1 changesets with 3 changes to 3 files
129 added 1 changesets with 3 changes to 3 files
129 updating to branch default
130 updating to branch default
130 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
131 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
131 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
132 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
132 $ hg --cwd d log --template "{desc}\n"
133 $ hg --cwd d log --template "{desc}\n"
133 a
134 a
134 $ hg --cwd d qpush -a
135 $ hg --cwd d qpush -a
135 applying b.patch
136 applying b.patch
136 now at: b.patch
137 now at: b.patch
137 $ hg --cwd d log --template "{desc}\n"
138 $ hg --cwd d log --template "{desc}\n"
138 imported patch b.patch
139 imported patch b.patch
139 a
140 a
140
141
141 test --mq works and uses correct repository config
142 test --mq works and uses correct repository config
142
143
143 $ hg --cwd d outgoing --mq
144 $ hg --cwd d outgoing --mq
144 comparing with http://localhost:$HGPORT2/a/.hg/patches
145 comparing with http://localhost:$HGPORT2/a/.hg/patches
145 searching for changes
146 searching for changes
146 no changes found
147 no changes found
147 [1]
148 [1]
148 $ hg --cwd d log --mq --template '{rev} {desc|firstline}\n'
149 $ hg --cwd d log --mq --template '{rev} {desc|firstline}\n'
149 0 b.patch
150 0 b.patch
@@ -1,227 +1,228 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ cat > writelines.py <<EOF
3 $ cat > writelines.py <<EOF
3 > import sys
4 > import sys
4 > path = sys.argv[1]
5 > path = sys.argv[1]
5 > args = sys.argv[2:]
6 > args = sys.argv[2:]
6 > assert (len(args) % 2) == 0
7 > assert (len(args) % 2) == 0
7 >
8 >
8 > f = file(path, 'wb')
9 > f = file(path, 'wb')
9 > for i in xrange(len(args)/2):
10 > for i in xrange(len(args)/2):
10 > count, s = args[2*i:2*i+2]
11 > count, s = args[2*i:2*i+2]
11 > count = int(count)
12 > count = int(count)
12 > s = s.decode('string_escape')
13 > s = s.decode('string_escape')
13 > f.write(s*count)
14 > f.write(s*count)
14 > f.close()
15 > f.close()
15 >
16 >
16 > EOF
17 > EOF
17 $ echo "[extensions]" >> $HGRCPATH
18 $ echo "[extensions]" >> $HGRCPATH
18 $ echo "mq=" >> $HGRCPATH
19 $ echo "mq=" >> $HGRCPATH
19 $ echo "[diff]" >> $HGRCPATH
20 $ echo "[diff]" >> $HGRCPATH
20 $ echo "git=1" >> $HGRCPATH
21 $ echo "git=1" >> $HGRCPATH
21 $ hg init repo
22 $ hg init repo
22 $ cd repo
23 $ cd repo
23
24
24 qimport non-existing-file
25 qimport non-existing-file
25
26
26 $ hg qimport non-existing-file
27 $ hg qimport non-existing-file
27 abort: unable to read file non-existing-file
28 abort: unable to read file non-existing-file
28 [255]
29 [255]
29
30
30 import email
31 import email
31
32
32 $ hg qimport --push -n email - <<EOF
33 $ hg qimport --push -n email - <<EOF
33 > From: Username in email <test@example.net>
34 > From: Username in email <test@example.net>
34 > Subject: [PATCH] Message in email
35 > Subject: [PATCH] Message in email
35 > Date: Fri, 02 Jan 1970 00:00:00 +0000
36 > Date: Fri, 02 Jan 1970 00:00:00 +0000
36 >
37 >
37 > Text before patch.
38 > Text before patch.
38 >
39 >
39 > # HG changeset patch
40 > # HG changeset patch
40 > # User Username in patch <test@example.net>
41 > # User Username in patch <test@example.net>
41 > # Date 0 0
42 > # Date 0 0
42 > # Node ID 1a706973a7d84cb549823634a821d9bdf21c6220
43 > # Node ID 1a706973a7d84cb549823634a821d9bdf21c6220
43 > # Parent 0000000000000000000000000000000000000000
44 > # Parent 0000000000000000000000000000000000000000
44 > First line of commit message.
45 > First line of commit message.
45 >
46 >
46 > More text in commit message.
47 > More text in commit message.
47 > --- confuse the diff detection
48 > --- confuse the diff detection
48 >
49 >
49 > diff --git a/x b/x
50 > diff --git a/x b/x
50 > new file mode 100644
51 > new file mode 100644
51 > --- /dev/null
52 > --- /dev/null
52 > +++ b/x
53 > +++ b/x
53 > @@ -0,0 +1,1 @@
54 > @@ -0,0 +1,1 @@
54 > +new file
55 > +new file
55 > Text after patch.
56 > Text after patch.
56 >
57 >
57 > EOF
58 > EOF
58 adding email to series file
59 adding email to series file
59 applying email
60 applying email
60 now at: email
61 now at: email
61
62
62 hg tip -v
63 hg tip -v
63
64
64 $ hg tip -v
65 $ hg tip -v
65 changeset: 0:1a706973a7d8
66 changeset: 0:1a706973a7d8
66 tag: email
67 tag: email
67 tag: qbase
68 tag: qbase
68 tag: qtip
69 tag: qtip
69 tag: tip
70 tag: tip
70 user: Username in patch <test@example.net>
71 user: Username in patch <test@example.net>
71 date: Thu Jan 01 00:00:00 1970 +0000
72 date: Thu Jan 01 00:00:00 1970 +0000
72 files: x
73 files: x
73 description:
74 description:
74 First line of commit message.
75 First line of commit message.
75
76
76 More text in commit message.
77 More text in commit message.
77
78
78
79
79 $ hg qpop
80 $ hg qpop
80 popping email
81 popping email
81 patch queue now empty
82 patch queue now empty
82 $ hg qdelete email
83 $ hg qdelete email
83
84
84 import URL
85 import URL
85
86
86 $ echo foo >> foo
87 $ echo foo >> foo
87 $ hg add foo
88 $ hg add foo
88 $ hg diff > url.diff
89 $ hg diff > url.diff
89 $ hg revert --no-backup foo
90 $ hg revert --no-backup foo
90 $ rm foo
91 $ rm foo
91
92
92 Under unix: file:///foobar/blah
93 Under unix: file:///foobar/blah
93 Under windows: file:///c:/foobar/blah
94 Under windows: file:///c:/foobar/blah
94
95
95 $ patchurl=`pwd | tr '\\\\' /`/url.diff
96 $ patchurl=`pwd | tr '\\\\' /`/url.diff
96 $ expr "$patchurl" : "\/" > /dev/null || patchurl="/$patchurl"
97 $ expr "$patchurl" : "\/" > /dev/null || patchurl="/$patchurl"
97 $ hg qimport file://"$patchurl"
98 $ hg qimport file://"$patchurl"
98 adding url.diff to series file
99 adding url.diff to series file
99 $ rm url.diff
100 $ rm url.diff
100 $ hg qun
101 $ hg qun
101 url.diff
102 url.diff
102
103
103 import patch that already exists
104 import patch that already exists
104
105
105 $ echo foo2 >> foo
106 $ echo foo2 >> foo
106 $ hg add foo
107 $ hg add foo
107 $ hg diff > ../url.diff
108 $ hg diff > ../url.diff
108 $ hg revert --no-backup foo
109 $ hg revert --no-backup foo
109 $ rm foo
110 $ rm foo
110 $ hg qimport ../url.diff
111 $ hg qimport ../url.diff
111 abort: patch "url.diff" already exists
112 abort: patch "url.diff" already exists
112 [255]
113 [255]
113 $ hg qpush
114 $ hg qpush
114 applying url.diff
115 applying url.diff
115 now at: url.diff
116 now at: url.diff
116 $ cat foo
117 $ cat foo
117 foo
118 foo
118 $ hg qpop
119 $ hg qpop
119 popping url.diff
120 popping url.diff
120 patch queue now empty
121 patch queue now empty
121
122
122 qimport -f
123 qimport -f
123
124
124 $ hg qimport -f ../url.diff
125 $ hg qimport -f ../url.diff
125 adding url.diff to series file
126 adding url.diff to series file
126 $ hg qpush
127 $ hg qpush
127 applying url.diff
128 applying url.diff
128 now at: url.diff
129 now at: url.diff
129 $ cat foo
130 $ cat foo
130 foo2
131 foo2
131 $ hg qpop
132 $ hg qpop
132 popping url.diff
133 popping url.diff
133 patch queue now empty
134 patch queue now empty
134
135
135 build diff with CRLF
136 build diff with CRLF
136
137
137 $ python ../writelines.py b 5 'a\n' 5 'a\r\n'
138 $ python ../writelines.py b 5 'a\n' 5 'a\r\n'
138 $ hg ci -Am addb
139 $ hg ci -Am addb
139 adding b
140 adding b
140 $ python ../writelines.py b 2 'a\n' 10 'b\n' 2 'a\r\n'
141 $ python ../writelines.py b 2 'a\n' 10 'b\n' 2 'a\r\n'
141 $ hg diff > b.diff
142 $ hg diff > b.diff
142 $ hg up -C
143 $ hg up -C
143 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
144 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
144
145
145 qimport CRLF diff
146 qimport CRLF diff
146
147
147 $ hg qimport b.diff
148 $ hg qimport b.diff
148 adding b.diff to series file
149 adding b.diff to series file
149 $ hg qpush
150 $ hg qpush
150 applying b.diff
151 applying b.diff
151 now at: b.diff
152 now at: b.diff
152
153
153 try to import --push
154 try to import --push
154
155
155 $ echo another >> b
156 $ echo another >> b
156 $ hg diff > another.diff
157 $ hg diff > another.diff
157 $ hg up -C
158 $ hg up -C
158 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
159 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
159 $ hg qimport --push another.diff
160 $ hg qimport --push another.diff
160 adding another.diff to series file
161 adding another.diff to series file
161 applying another.diff
162 applying another.diff
162 now at: another.diff
163 now at: another.diff
163 $ hg qfin -a
164 $ hg qfin -a
164 patch b.diff finalized without changeset message
165 patch b.diff finalized without changeset message
165 patch another.diff finalized without changeset message
166 patch another.diff finalized without changeset message
166 $ hg qimport -rtip -P
167 $ hg qimport -rtip -P
167 $ hg qpop -a
168 $ hg qpop -a
168 popping 2.diff
169 popping 2.diff
169 patch queue now empty
170 patch queue now empty
170 $ hg qdel -k 2.diff
171 $ hg qdel -k 2.diff
171
172
172 qimport -e
173 qimport -e
173
174
174 $ hg qimport -e 2.diff
175 $ hg qimport -e 2.diff
175 adding 2.diff to series file
176 adding 2.diff to series file
176 $ hg qdel -k 2.diff
177 $ hg qdel -k 2.diff
177
178
178 qimport -e --name newname oldexisitingpatch
179 qimport -e --name newname oldexisitingpatch
179
180
180 $ hg qimport -e --name this-name-is-better 2.diff
181 $ hg qimport -e --name this-name-is-better 2.diff
181 renaming 2.diff to this-name-is-better
182 renaming 2.diff to this-name-is-better
182 adding this-name-is-better to series file
183 adding this-name-is-better to series file
183 $ hg qser
184 $ hg qser
184 this-name-is-better
185 this-name-is-better
185 url.diff
186 url.diff
186
187
187 qimport -e --name without --force
188 qimport -e --name without --force
188
189
189 $ cp .hg/patches/this-name-is-better .hg/patches/3.diff
190 $ cp .hg/patches/this-name-is-better .hg/patches/3.diff
190 $ hg qimport -e --name this-name-is-better 3.diff
191 $ hg qimport -e --name this-name-is-better 3.diff
191 abort: patch "this-name-is-better" already exists
192 abort: patch "this-name-is-better" already exists
192 [255]
193 [255]
193 $ hg qser
194 $ hg qser
194 this-name-is-better
195 this-name-is-better
195 url.diff
196 url.diff
196
197
197 qimport -e --name with --force
198 qimport -e --name with --force
198
199
199 $ hg qimport --force -e --name this-name-is-better 3.diff
200 $ hg qimport --force -e --name this-name-is-better 3.diff
200 renaming 3.diff to this-name-is-better
201 renaming 3.diff to this-name-is-better
201 adding this-name-is-better to series file
202 adding this-name-is-better to series file
202 $ hg qser
203 $ hg qser
203 this-name-is-better
204 this-name-is-better
204 url.diff
205 url.diff
205
206
206 qimport with bad name, should abort before reading file
207 qimport with bad name, should abort before reading file
207
208
208 $ hg qimport non-existant-file --name .hg
209 $ hg qimport non-existant-file --name .hg
209 abort: patch name cannot begin with ".hg"
210 abort: patch name cannot begin with ".hg"
210 [255]
211 [255]
211
212
212 qimport http:// patch with leading slashes in url
213 qimport http:// patch with leading slashes in url
213
214
214 set up hgweb
215 set up hgweb
215
216
216 $ cd ..
217 $ cd ..
217 $ hg init served
218 $ hg init served
218 $ cd served
219 $ cd served
219 $ echo a > a
220 $ echo a > a
220 $ hg ci -Am patch
221 $ hg ci -Am patch
221 adding a
222 adding a
222 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
223 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
223 $ cat hg.pid >> $DAEMON_PIDS
224 $ cat hg.pid >> $DAEMON_PIDS
224
225
225 $ cd ../repo
226 $ cd ../repo
226 $ hg qimport http://localhost:$HGPORT/raw-rev/0///
227 $ hg qimport http://localhost:$HGPORT/raw-rev/0///
227 adding 0 to series file
228 adding 0 to series file
@@ -1,45 +1,46 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg init test
3 $ hg init test
3 $ cd test
4 $ cd test
4 $ echo a > a
5 $ echo a > a
5 $ hg ci -Ama
6 $ hg ci -Ama
6 adding a
7 adding a
7 $ cd ..
8 $ cd ..
8 $ hg clone test test2
9 $ hg clone test test2
9 updating to branch default
10 updating to branch default
10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 $ cd test2
12 $ cd test2
12 $ echo a >> a
13 $ echo a >> a
13 $ hg ci -mb
14 $ hg ci -mb
14
15
15 expect error, cloning not allowed
16 expect error, cloning not allowed
16
17
17 $ echo '[web]' > .hg/hgrc
18 $ echo '[web]' > .hg/hgrc
18 $ echo 'allowpull = false' >> .hg/hgrc
19 $ echo 'allowpull = false' >> .hg/hgrc
19 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
20 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
20 $ cat hg.pid >> $DAEMON_PIDS
21 $ cat hg.pid >> $DAEMON_PIDS
21 $ hg clone http://localhost:$HGPORT/ test3
22 $ hg clone http://localhost:$HGPORT/ test3
22 requesting all changes
23 requesting all changes
23 abort: authorization failed
24 abort: authorization failed
24 [255]
25 [255]
25 $ "$TESTDIR/killdaemons.py"
26 $ "$TESTDIR/killdaemons.py"
26
27
27 serve errors
28 serve errors
28
29
29 $ cat errors.log
30 $ cat errors.log
30 $ req() {
31 $ req() {
31 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
32 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
32 > cat hg.pid >> $DAEMON_PIDS
33 > cat hg.pid >> $DAEMON_PIDS
33 > hg --cwd ../test pull http://localhost:$HGPORT/
34 > hg --cwd ../test pull http://localhost:$HGPORT/
34 > kill `cat hg.pid`
35 > kill `cat hg.pid`
35 > echo % serve errors
36 > echo % serve errors
36 > cat errors.log
37 > cat errors.log
37 > }
38 > }
38
39
39 expect error, pulling not allowed
40 expect error, pulling not allowed
40
41
41 $ req
42 $ req
42 pulling from http://localhost:$HGPORT/
43 pulling from http://localhost:$HGPORT/
43 searching for changes
44 searching for changes
44 abort: authorization failed
45 abort: authorization failed
45 % serve errors
46 % serve errors
@@ -1,88 +1,90 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ hg init test
3 $ hg init test
2 $ cd test
4 $ cd test
3
5
4 $ echo foo>foo
6 $ echo foo>foo
5 $ hg addremove
7 $ hg addremove
6 adding foo
8 adding foo
7 $ hg commit -m 1
9 $ hg commit -m 1
8
10
9 $ hg verify
11 $ hg verify
10 checking changesets
12 checking changesets
11 checking manifests
13 checking manifests
12 crosschecking files in changesets and manifests
14 crosschecking files in changesets and manifests
13 checking files
15 checking files
14 1 files, 1 changesets, 1 total revisions
16 1 files, 1 changesets, 1 total revisions
15
17
16 $ hg serve -p $HGPORT -d --pid-file=hg.pid
18 $ hg serve -p $HGPORT -d --pid-file=hg.pid
17 $ cat hg.pid >> $DAEMON_PIDS
19 $ cat hg.pid >> $DAEMON_PIDS
18 $ cd ..
20 $ cd ..
19
21
20 $ hg clone --pull http://foo:bar@localhost:$HGPORT/ copy
22 $ hg clone --pull http://foo:bar@localhost:$HGPORT/ copy
21 requesting all changes
23 requesting all changes
22 adding changesets
24 adding changesets
23 adding manifests
25 adding manifests
24 adding file changes
26 adding file changes
25 added 1 changesets with 1 changes to 1 files
27 added 1 changesets with 1 changes to 1 files
26 updating to branch default
28 updating to branch default
27 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28
30
29 $ cd copy
31 $ cd copy
30 $ hg verify
32 $ hg verify
31 checking changesets
33 checking changesets
32 checking manifests
34 checking manifests
33 crosschecking files in changesets and manifests
35 crosschecking files in changesets and manifests
34 checking files
36 checking files
35 1 files, 1 changesets, 1 total revisions
37 1 files, 1 changesets, 1 total revisions
36
38
37 $ hg co
39 $ hg co
38 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
40 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
39 $ cat foo
41 $ cat foo
40 foo
42 foo
41
43
42 $ hg manifest --debug
44 $ hg manifest --debug
43 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo
45 2ed2a3912a0b24502043eae84ee4b279c18b90dd 644 foo
44
46
45 $ hg pull
47 $ hg pull
46 pulling from http://foo:***@localhost:$HGPORT/
48 pulling from http://foo:***@localhost:$HGPORT/
47 searching for changes
49 searching for changes
48 no changes found
50 no changes found
49
51
50 $ hg rollback --dry-run --verbose
52 $ hg rollback --dry-run --verbose
51 repository tip rolled back to revision -1 (undo pull: http://foo:***@localhost:$HGPORT/)
53 repository tip rolled back to revision -1 (undo pull: http://foo:***@localhost:$HGPORT/)
52
54
53 Issue622: hg init && hg pull -u URL doesn't checkout default branch
55 Issue622: hg init && hg pull -u URL doesn't checkout default branch
54
56
55 $ cd ..
57 $ cd ..
56 $ hg init empty
58 $ hg init empty
57 $ cd empty
59 $ cd empty
58 $ hg pull -u ../test
60 $ hg pull -u ../test
59 pulling from ../test
61 pulling from ../test
60 requesting all changes
62 requesting all changes
61 adding changesets
63 adding changesets
62 adding manifests
64 adding manifests
63 adding file changes
65 adding file changes
64 added 1 changesets with 1 changes to 1 files
66 added 1 changesets with 1 changes to 1 files
65 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
67 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
66
68
67 Test 'file:' uri handling:
69 Test 'file:' uri handling:
68
70
69 $ hg pull -q file://../test-doesnt-exist
71 $ hg pull -q file://../test-doesnt-exist
70 abort: file:// URLs can only refer to localhost
72 abort: file:// URLs can only refer to localhost
71 [255]
73 [255]
72
74
73 $ hg pull -q file://../test
75 $ hg pull -q file://../test
74 abort: file:// URLs can only refer to localhost
76 abort: file:// URLs can only refer to localhost
75 [255]
77 [255]
76
78
77 $ hg pull -q file:../test
79 $ hg pull -q file:../test
78
80
79 It's tricky to make file:// URLs working on every platform with
81 It's tricky to make file:// URLs working on every platform with
80 regular shell commands.
82 regular shell commands.
81
83
82 $ URL=`python -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
84 $ URL=`python -c "import os; print 'file://foobar' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
83 $ hg pull -q "$URL"
85 $ hg pull -q "$URL"
84 abort: file:// URLs can only refer to localhost
86 abort: file:// URLs can only refer to localhost
85 [255]
87 [255]
86
88
87 $ URL=`python -c "import os; print 'file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
89 $ URL=`python -c "import os; print 'file://localhost' + ('/' + os.getcwd().replace(os.sep, '/')).replace('//', '/') + '/../test'"`
88 $ hg pull -q "$URL"
90 $ hg pull -q "$URL"
@@ -1,118 +1,119 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg init test
3 $ hg init test
3 $ cd test
4 $ cd test
4 $ echo a > a
5 $ echo a > a
5 $ hg ci -Ama
6 $ hg ci -Ama
6 adding a
7 adding a
7 $ cd ..
8 $ cd ..
8 $ hg clone test test2
9 $ hg clone test test2
9 updating to branch default
10 updating to branch default
10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 $ cd test2
12 $ cd test2
12 $ echo a >> a
13 $ echo a >> a
13 $ hg ci -mb
14 $ hg ci -mb
14 $ req() {
15 $ req() {
15 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
16 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
16 > cat hg.pid >> $DAEMON_PIDS
17 > cat hg.pid >> $DAEMON_PIDS
17 > hg --cwd ../test2 push http://localhost:$HGPORT/
18 > hg --cwd ../test2 push http://localhost:$HGPORT/
18 > "$TESTDIR/killdaemons.py"
19 > "$TESTDIR/killdaemons.py"
19 > echo % serve errors
20 > echo % serve errors
20 > cat errors.log
21 > cat errors.log
21 > }
22 > }
22 $ cd ../test
23 $ cd ../test
23
24
24 expect ssl error
25 expect ssl error
25
26
26 $ req
27 $ req
27 pushing to http://localhost:$HGPORT/
28 pushing to http://localhost:$HGPORT/
28 searching for changes
29 searching for changes
29 remote: ssl required
30 remote: ssl required
30 % serve errors
31 % serve errors
31
32
32 expect authorization error
33 expect authorization error
33
34
34 $ echo '[web]' > .hg/hgrc
35 $ echo '[web]' > .hg/hgrc
35 $ echo 'push_ssl = false' >> .hg/hgrc
36 $ echo 'push_ssl = false' >> .hg/hgrc
36 $ req
37 $ req
37 pushing to http://localhost:$HGPORT/
38 pushing to http://localhost:$HGPORT/
38 searching for changes
39 searching for changes
39 abort: authorization failed
40 abort: authorization failed
40 % serve errors
41 % serve errors
41
42
42 expect authorization error: must have authorized user
43 expect authorization error: must have authorized user
43
44
44 $ echo 'allow_push = unperson' >> .hg/hgrc
45 $ echo 'allow_push = unperson' >> .hg/hgrc
45 $ req
46 $ req
46 pushing to http://localhost:$HGPORT/
47 pushing to http://localhost:$HGPORT/
47 searching for changes
48 searching for changes
48 abort: authorization failed
49 abort: authorization failed
49 % serve errors
50 % serve errors
50
51
51 expect success
52 expect success
52
53
53 $ echo 'allow_push = *' >> .hg/hgrc
54 $ echo 'allow_push = *' >> .hg/hgrc
54 $ echo '[hooks]' >> .hg/hgrc
55 $ echo '[hooks]' >> .hg/hgrc
55 $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup 0' >> .hg/hgrc
56 $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup 0' >> .hg/hgrc
56 $ req
57 $ req
57 pushing to http://localhost:$HGPORT/
58 pushing to http://localhost:$HGPORT/
58 searching for changes
59 searching for changes
59 remote: adding changesets
60 remote: adding changesets
60 remote: adding manifests
61 remote: adding manifests
61 remote: adding file changes
62 remote: adding file changes
62 remote: added 1 changesets with 1 changes to 1 files
63 remote: added 1 changesets with 1 changes to 1 files
63 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
64 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
64 % serve errors
65 % serve errors
65 $ hg rollback
66 $ hg rollback
66 repository tip rolled back to revision 0 (undo serve)
67 repository tip rolled back to revision 0 (undo serve)
67
68
68 expect success, server lacks the httpheader capability
69 expect success, server lacks the httpheader capability
69
70
70 $ CAP=httpheader
71 $ CAP=httpheader
71 $ . "$TESTDIR/notcapable"
72 $ . "$TESTDIR/notcapable"
72 $ req
73 $ req
73 pushing to http://localhost:$HGPORT/
74 pushing to http://localhost:$HGPORT/
74 searching for changes
75 searching for changes
75 remote: adding changesets
76 remote: adding changesets
76 remote: adding manifests
77 remote: adding manifests
77 remote: adding file changes
78 remote: adding file changes
78 remote: added 1 changesets with 1 changes to 1 files
79 remote: added 1 changesets with 1 changes to 1 files
79 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
80 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
80 % serve errors
81 % serve errors
81 $ hg rollback
82 $ hg rollback
82 repository tip rolled back to revision 0 (undo serve)
83 repository tip rolled back to revision 0 (undo serve)
83
84
84 expect success, server lacks the unbundlehash capability
85 expect success, server lacks the unbundlehash capability
85
86
86 $ CAP=unbundlehash
87 $ CAP=unbundlehash
87 $ . "$TESTDIR/notcapable"
88 $ . "$TESTDIR/notcapable"
88 $ req
89 $ req
89 pushing to http://localhost:$HGPORT/
90 pushing to http://localhost:$HGPORT/
90 searching for changes
91 searching for changes
91 remote: adding changesets
92 remote: adding changesets
92 remote: adding manifests
93 remote: adding manifests
93 remote: adding file changes
94 remote: adding file changes
94 remote: added 1 changesets with 1 changes to 1 files
95 remote: added 1 changesets with 1 changes to 1 files
95 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
96 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
96 % serve errors
97 % serve errors
97 $ hg rollback
98 $ hg rollback
98 repository tip rolled back to revision 0 (undo serve)
99 repository tip rolled back to revision 0 (undo serve)
99
100
100 expect authorization error: all users denied
101 expect authorization error: all users denied
101
102
102 $ echo '[web]' > .hg/hgrc
103 $ echo '[web]' > .hg/hgrc
103 $ echo 'push_ssl = false' >> .hg/hgrc
104 $ echo 'push_ssl = false' >> .hg/hgrc
104 $ echo 'deny_push = *' >> .hg/hgrc
105 $ echo 'deny_push = *' >> .hg/hgrc
105 $ req
106 $ req
106 pushing to http://localhost:$HGPORT/
107 pushing to http://localhost:$HGPORT/
107 searching for changes
108 searching for changes
108 abort: authorization failed
109 abort: authorization failed
109 % serve errors
110 % serve errors
110
111
111 expect authorization error: some users denied, users must be authenticated
112 expect authorization error: some users denied, users must be authenticated
112
113
113 $ echo 'deny_push = unperson' >> .hg/hgrc
114 $ echo 'deny_push = unperson' >> .hg/hgrc
114 $ req
115 $ req
115 pushing to http://localhost:$HGPORT/
116 pushing to http://localhost:$HGPORT/
116 searching for changes
117 searching for changes
117 abort: authorization failed
118 abort: authorization failed
118 % serve errors
119 % serve errors
@@ -1,183 +1,185 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 setup repo
3 setup repo
2 $ hg init t
4 $ hg init t
3 $ cd t
5 $ cd t
4 $ echo a > a
6 $ echo a > a
5 $ hg commit -Am'add a'
7 $ hg commit -Am'add a'
6 adding a
8 adding a
7 $ hg verify
9 $ hg verify
8 checking changesets
10 checking changesets
9 checking manifests
11 checking manifests
10 crosschecking files in changesets and manifests
12 crosschecking files in changesets and manifests
11 checking files
13 checking files
12 1 files, 1 changesets, 1 total revisions
14 1 files, 1 changesets, 1 total revisions
13 $ hg parents
15 $ hg parents
14 changeset: 0:1f0dee641bb7
16 changeset: 0:1f0dee641bb7
15 tag: tip
17 tag: tip
16 user: test
18 user: test
17 date: Thu Jan 01 00:00:00 1970 +0000
19 date: Thu Jan 01 00:00:00 1970 +0000
18 summary: add a
20 summary: add a
19
21
20
22
21 rollback to null revision
23 rollback to null revision
22 $ hg status
24 $ hg status
23 $ hg rollback
25 $ hg rollback
24 repository tip rolled back to revision -1 (undo commit)
26 repository tip rolled back to revision -1 (undo commit)
25 working directory now based on revision -1
27 working directory now based on revision -1
26 $ hg verify
28 $ hg verify
27 checking changesets
29 checking changesets
28 checking manifests
30 checking manifests
29 crosschecking files in changesets and manifests
31 crosschecking files in changesets and manifests
30 checking files
32 checking files
31 0 files, 0 changesets, 0 total revisions
33 0 files, 0 changesets, 0 total revisions
32 $ hg parents
34 $ hg parents
33 $ hg status
35 $ hg status
34 A a
36 A a
35
37
36 Two changesets this time so we rollback to a real changeset
38 Two changesets this time so we rollback to a real changeset
37 $ hg commit -m'add a again'
39 $ hg commit -m'add a again'
38 $ echo a >> a
40 $ echo a >> a
39 $ hg commit -m'modify a'
41 $ hg commit -m'modify a'
40
42
41 Test issue 902 (current branch is preserved)
43 Test issue 902 (current branch is preserved)
42 $ hg branch test
44 $ hg branch test
43 marked working directory as branch test
45 marked working directory as branch test
44 $ hg rollback
46 $ hg rollback
45 repository tip rolled back to revision 0 (undo commit)
47 repository tip rolled back to revision 0 (undo commit)
46 working directory now based on revision 0
48 working directory now based on revision 0
47 $ hg branch
49 $ hg branch
48 default
50 default
49
51
50 Test issue 1635 (commit message saved)
52 Test issue 1635 (commit message saved)
51 $ cat .hg/last-message.txt ; echo
53 $ cat .hg/last-message.txt ; echo
52 modify a
54 modify a
53
55
54 Test rollback of hg before issue 902 was fixed
56 Test rollback of hg before issue 902 was fixed
55
57
56 $ hg commit -m "test3"
58 $ hg commit -m "test3"
57 $ hg branch test
59 $ hg branch test
58 marked working directory as branch test
60 marked working directory as branch test
59 $ rm .hg/undo.branch
61 $ rm .hg/undo.branch
60 $ hg rollback
62 $ hg rollback
61 repository tip rolled back to revision 0 (undo commit)
63 repository tip rolled back to revision 0 (undo commit)
62 named branch could not be reset: current branch is still 'test'
64 named branch could not be reset: current branch is still 'test'
63 working directory now based on revision 0
65 working directory now based on revision 0
64 $ hg branch
66 $ hg branch
65 test
67 test
66
68
67 working dir unaffected by rollback: do not restore dirstate et. al.
69 working dir unaffected by rollback: do not restore dirstate et. al.
68 $ hg log --template '{rev} {branch} {desc|firstline}\n'
70 $ hg log --template '{rev} {branch} {desc|firstline}\n'
69 0 default add a again
71 0 default add a again
70 $ hg status
72 $ hg status
71 M a
73 M a
72 $ hg bookmark foo
74 $ hg bookmark foo
73 $ hg commit -m'modify a again'
75 $ hg commit -m'modify a again'
74 $ echo b > b
76 $ echo b > b
75 $ hg commit -Am'add b'
77 $ hg commit -Am'add b'
76 adding b
78 adding b
77 $ hg log --template '{rev} {branch} {desc|firstline}\n'
79 $ hg log --template '{rev} {branch} {desc|firstline}\n'
78 2 test add b
80 2 test add b
79 1 test modify a again
81 1 test modify a again
80 0 default add a again
82 0 default add a again
81 $ hg update default
83 $ hg update default
82 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
84 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
83 $ hg bookmark bar
85 $ hg bookmark bar
84 $ cat .hg/undo.branch ; echo
86 $ cat .hg/undo.branch ; echo
85 test
87 test
86 $ hg rollback -f
88 $ hg rollback -f
87 repository tip rolled back to revision 1 (undo commit)
89 repository tip rolled back to revision 1 (undo commit)
88 $ hg id -n
90 $ hg id -n
89 0
91 0
90 $ hg branch
92 $ hg branch
91 default
93 default
92 $ cat .hg/bookmarks.current ; echo
94 $ cat .hg/bookmarks.current ; echo
93 bar
95 bar
94 $ hg bookmark --delete foo
96 $ hg bookmark --delete foo
95
97
96 rollback by pretxncommit saves commit message (issue 1635)
98 rollback by pretxncommit saves commit message (issue 1635)
97
99
98 $ echo a >> a
100 $ echo a >> a
99 $ hg --config hooks.pretxncommit=false commit -m"precious commit message"
101 $ hg --config hooks.pretxncommit=false commit -m"precious commit message"
100 transaction abort!
102 transaction abort!
101 rollback completed
103 rollback completed
102 abort: pretxncommit hook exited with status * (glob)
104 abort: pretxncommit hook exited with status * (glob)
103 [255]
105 [255]
104 $ cat .hg/last-message.txt ; echo
106 $ cat .hg/last-message.txt ; echo
105 precious commit message
107 precious commit message
106
108
107 same thing, but run $EDITOR
109 same thing, but run $EDITOR
108
110
109 $ cat > editor << '__EOF__'
111 $ cat > editor << '__EOF__'
110 > #!/bin/sh
112 > #!/bin/sh
111 > echo "another precious commit message" > "$1"
113 > echo "another precious commit message" > "$1"
112 > __EOF__
114 > __EOF__
113 $ chmod +x editor
115 $ chmod +x editor
114 $ HGEDITOR="'`pwd`'"/editor hg --config hooks.pretxncommit=false commit 2>&1
116 $ HGEDITOR="'`pwd`'"/editor hg --config hooks.pretxncommit=false commit 2>&1
115 transaction abort!
117 transaction abort!
116 rollback completed
118 rollback completed
117 note: commit message saved in .hg/last-message.txt
119 note: commit message saved in .hg/last-message.txt
118 abort: pretxncommit hook exited with status * (glob)
120 abort: pretxncommit hook exited with status * (glob)
119 [255]
121 [255]
120 $ cat .hg/last-message.txt
122 $ cat .hg/last-message.txt
121 another precious commit message
123 another precious commit message
122
124
123 test rollback on served repository
125 test rollback on served repository
124
126
125 $ hg commit -m "precious commit message"
127 $ hg commit -m "precious commit message"
126 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
128 $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
127 $ cat hg.pid >> $DAEMON_PIDS
129 $ cat hg.pid >> $DAEMON_PIDS
128 $ cd ..
130 $ cd ..
129 $ hg clone http://localhost:$HGPORT u
131 $ hg clone http://localhost:$HGPORT u
130 requesting all changes
132 requesting all changes
131 adding changesets
133 adding changesets
132 adding manifests
134 adding manifests
133 adding file changes
135 adding file changes
134 added 3 changesets with 2 changes to 1 files (+1 heads)
136 added 3 changesets with 2 changes to 1 files (+1 heads)
135 updating to branch default
137 updating to branch default
136 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
138 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
137 $ cd u
139 $ cd u
138 $ hg id default
140 $ hg id default
139 068774709090
141 068774709090
140
142
141 now rollback and observe that 'hg serve' reloads the repository and
143 now rollback and observe that 'hg serve' reloads the repository and
142 presents the correct tip changeset:
144 presents the correct tip changeset:
143
145
144 $ hg -R ../t rollback
146 $ hg -R ../t rollback
145 repository tip rolled back to revision 1 (undo commit)
147 repository tip rolled back to revision 1 (undo commit)
146 working directory now based on revision 0
148 working directory now based on revision 0
147 $ hg id default
149 $ hg id default
148 791dd2169706
150 791dd2169706
149
151
150 update to older changeset and then refuse rollback, because
152 update to older changeset and then refuse rollback, because
151 that would lose data (issue2998)
153 that would lose data (issue2998)
152 $ cd ../t
154 $ cd ../t
153 $ hg -q update
155 $ hg -q update
154 $ rm `hg status -un`
156 $ rm `hg status -un`
155 $ template='{rev}:{node|short} [{branch}] {desc|firstline}\n'
157 $ template='{rev}:{node|short} [{branch}] {desc|firstline}\n'
156 $ echo 'valuable new file' > b
158 $ echo 'valuable new file' > b
157 $ echo 'valuable modification' >> a
159 $ echo 'valuable modification' >> a
158 $ hg commit -A -m'a valuable change'
160 $ hg commit -A -m'a valuable change'
159 adding b
161 adding b
160 $ hg update 0
162 $ hg update 0
161 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
163 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
162 $ hg rollback
164 $ hg rollback
163 abort: rollback of last commit while not checked out may lose data
165 abort: rollback of last commit while not checked out may lose data
164 (use -f to force)
166 (use -f to force)
165 [255]
167 [255]
166 $ hg tip -q
168 $ hg tip -q
167 2:4d9cd3795eea
169 2:4d9cd3795eea
168 $ hg rollback -f
170 $ hg rollback -f
169 repository tip rolled back to revision 1 (undo commit)
171 repository tip rolled back to revision 1 (undo commit)
170 $ hg status
172 $ hg status
171 $ hg log --removed b # yep, it's gone
173 $ hg log --removed b # yep, it's gone
172
174
173 same again, but emulate an old client that doesn't write undo.desc
175 same again, but emulate an old client that doesn't write undo.desc
174 $ hg -q update
176 $ hg -q update
175 $ echo 'valuable modification redux' >> a
177 $ echo 'valuable modification redux' >> a
176 $ hg commit -m'a valuable change redux'
178 $ hg commit -m'a valuable change redux'
177 $ rm .hg/undo.desc
179 $ rm .hg/undo.desc
178 $ hg update 0
180 $ hg update 0
179 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
181 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
180 $ hg rollback
182 $ hg rollback
181 rolling back unknown transaction
183 rolling back unknown transaction
182 $ cat a
184 $ cat a
183 a
185 a
@@ -1,47 +1,48 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ cat <<EOF >> $HGRCPATH
3 $ cat <<EOF >> $HGRCPATH
3 > [extensions]
4 > [extensions]
4 > schemes=
5 > schemes=
5 >
6 >
6 > [schemes]
7 > [schemes]
7 > l = http://localhost:$HGPORT/
8 > l = http://localhost:$HGPORT/
8 > parts = http://{1}:$HGPORT/
9 > parts = http://{1}:$HGPORT/
9 > z = file:\$PWD/
10 > z = file:\$PWD/
10 > EOF
11 > EOF
11 $ hg init test
12 $ hg init test
12 $ cd test
13 $ cd test
13 $ echo a > a
14 $ echo a > a
14 $ hg ci -Am initial
15 $ hg ci -Am initial
15 adding a
16 adding a
16 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
17 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
17 $ cat hg.pid >> $DAEMON_PIDS
18 $ cat hg.pid >> $DAEMON_PIDS
18 $ hg incoming l://
19 $ hg incoming l://
19 comparing with l://
20 comparing with l://
20 searching for changes
21 searching for changes
21 no changes found
22 no changes found
22 [1]
23 [1]
23
24
24 check that {1} syntax works
25 check that {1} syntax works
25
26
26 $ hg incoming --debug parts://localhost
27 $ hg incoming --debug parts://localhost
27 using http://localhost:$HGPORT/
28 using http://localhost:$HGPORT/
28 sending capabilities command
29 sending capabilities command
29 comparing with parts://localhost/
30 comparing with parts://localhost/
30 query 1; heads
31 query 1; heads
31 sending batch command
32 sending batch command
32 searching for changes
33 searching for changes
33 all remote heads known locally
34 all remote heads known locally
34 no changes found
35 no changes found
35 [1]
36 [1]
36
37
37 check that paths are expanded
38 check that paths are expanded
38
39
39 $ PWD=`pwd` hg incoming z://
40 $ PWD=`pwd` hg incoming z://
40 comparing with z://
41 comparing with z://
41 searching for changes
42 searching for changes
42 no changes found
43 no changes found
43 [1]
44 [1]
44
45
45 errors
46 errors
46
47
47 $ cat errors.log
48 $ cat errors.log
@@ -1,82 +1,83 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hgserve()
3 $ hgserve()
3 > {
4 > {
4 > hg serve -a localhost -d --pid-file=hg.pid -E errors.log -v $@ \
5 > hg serve -a localhost -d --pid-file=hg.pid -E errors.log -v $@ \
5 > | sed -e "s/:$HGPORT1\\([^0-9]\\)/:HGPORT1\1/g" \
6 > | sed -e "s/:$HGPORT1\\([^0-9]\\)/:HGPORT1\1/g" \
6 > -e "s/:$HGPORT2\\([^0-9]\\)/:HGPORT2\1/g" \
7 > -e "s/:$HGPORT2\\([^0-9]\\)/:HGPORT2\1/g" \
7 > -e 's/http:\/\/[^/]*\//http:\/\/localhost\//'
8 > -e 's/http:\/\/[^/]*\//http:\/\/localhost\//'
8 > cat hg.pid >> "$DAEMON_PIDS"
9 > cat hg.pid >> "$DAEMON_PIDS"
9 > echo % errors
10 > echo % errors
10 > cat errors.log
11 > cat errors.log
11 > sleep 1
12 > sleep 1
12 > if [ "$KILLQUIETLY" = "Y" ]; then
13 > if [ "$KILLQUIETLY" = "Y" ]; then
13 > kill `cat hg.pid` 2>/dev/null
14 > kill `cat hg.pid` 2>/dev/null
14 > else
15 > else
15 > kill `cat hg.pid`
16 > kill `cat hg.pid`
16 > fi
17 > fi
17 > sleep 1
18 > sleep 1
18 > }
19 > }
19
20
20 $ hg init test
21 $ hg init test
21 $ cd test
22 $ cd test
22 $ echo '[web]' > .hg/hgrc
23 $ echo '[web]' > .hg/hgrc
23 $ echo 'accesslog = access.log' >> .hg/hgrc
24 $ echo 'accesslog = access.log' >> .hg/hgrc
24 $ echo "port = $HGPORT1" >> .hg/hgrc
25 $ echo "port = $HGPORT1" >> .hg/hgrc
25
26
26 Without -v
27 Without -v
27
28
28 $ hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid -E errors.log
29 $ hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid -E errors.log
29 $ cat hg.pid >> "$DAEMON_PIDS"
30 $ cat hg.pid >> "$DAEMON_PIDS"
30 $ if [ -f access.log ]; then
31 $ if [ -f access.log ]; then
31 $ echo 'access log created - .hg/hgrc respected'
32 $ echo 'access log created - .hg/hgrc respected'
32 access log created - .hg/hgrc respected
33 access log created - .hg/hgrc respected
33 $ fi
34 $ fi
34
35
35 errors
36 errors
36
37
37 $ cat errors.log
38 $ cat errors.log
38
39
39 With -v
40 With -v
40
41
41 $ hgserve
42 $ hgserve
42 listening at http://localhost/ (bound to 127.0.0.1:HGPORT1)
43 listening at http://localhost/ (bound to 127.0.0.1:HGPORT1)
43 % errors
44 % errors
44
45
45 With -v and -p HGPORT2
46 With -v and -p HGPORT2
46
47
47 $ hgserve -p "$HGPORT2"
48 $ hgserve -p "$HGPORT2"
48 listening at http://localhost/ (bound to 127.0.0.1:HGPORT2)
49 listening at http://localhost/ (bound to 127.0.0.1:HGPORT2)
49 % errors
50 % errors
50
51
51 With -v and -p daytime (should fail because low port)
52 With -v and -p daytime (should fail because low port)
52
53
53 $ KILLQUIETLY=Y
54 $ KILLQUIETLY=Y
54 $ hgserve -p daytime
55 $ hgserve -p daytime
55 abort: cannot start server at 'localhost:13': Permission denied
56 abort: cannot start server at 'localhost:13': Permission denied
56 abort: child process failed to start
57 abort: child process failed to start
57 % errors
58 % errors
58 $ KILLQUIETLY=N
59 $ KILLQUIETLY=N
59
60
60 With --prefix foo
61 With --prefix foo
61
62
62 $ hgserve --prefix foo
63 $ hgserve --prefix foo
63 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
64 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
64 % errors
65 % errors
65
66
66 With --prefix /foo
67 With --prefix /foo
67
68
68 $ hgserve --prefix /foo
69 $ hgserve --prefix /foo
69 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
70 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
70 % errors
71 % errors
71
72
72 With --prefix foo/
73 With --prefix foo/
73
74
74 $ hgserve --prefix foo/
75 $ hgserve --prefix foo/
75 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
76 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
76 % errors
77 % errors
77
78
78 With --prefix /foo/
79 With --prefix /foo/
79
80
80 $ hgserve --prefix /foo/
81 $ hgserve --prefix /foo/
81 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
82 listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1)
82 % errors
83 % errors
@@ -1,126 +1,127 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "[extensions]" >> $HGRCPATH
3 $ echo "share = " >> $HGRCPATH
4 $ echo "share = " >> $HGRCPATH
4
5
5 prepare repo1
6 prepare repo1
6
7
7 $ hg init repo1
8 $ hg init repo1
8 $ cd repo1
9 $ cd repo1
9 $ echo a > a
10 $ echo a > a
10 $ hg commit -A -m'init'
11 $ hg commit -A -m'init'
11 adding a
12 adding a
12
13
13 share it
14 share it
14
15
15 $ cd ..
16 $ cd ..
16 $ hg share repo1 repo2
17 $ hg share repo1 repo2
17 updating working directory
18 updating working directory
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19
20
20 share shouldn't have a store dir
21 share shouldn't have a store dir
21
22
22 $ cd repo2
23 $ cd repo2
23 $ test -d .hg/store
24 $ test -d .hg/store
24 [1]
25 [1]
25
26
26 Some sed versions appends newline, some don't, and some just fails
27 Some sed versions appends newline, some don't, and some just fails
27
28
28 $ cat .hg/sharedpath; echo
29 $ cat .hg/sharedpath; echo
29 $TESTTMP/repo1/.hg
30 $TESTTMP/repo1/.hg
30
31
31 trailing newline on .hg/sharedpath is ok
32 trailing newline on .hg/sharedpath is ok
32 $ hg tip -q
33 $ hg tip -q
33 0:d3873e73d99e
34 0:d3873e73d99e
34 $ echo '' >> .hg/sharedpath
35 $ echo '' >> .hg/sharedpath
35 $ cat .hg/sharedpath
36 $ cat .hg/sharedpath
36 $TESTTMP/repo1/.hg
37 $TESTTMP/repo1/.hg
37 $ hg tip -q
38 $ hg tip -q
38 0:d3873e73d99e
39 0:d3873e73d99e
39
40
40 commit in shared clone
41 commit in shared clone
41
42
42 $ echo a >> a
43 $ echo a >> a
43 $ hg commit -m'change in shared clone'
44 $ hg commit -m'change in shared clone'
44
45
45 check original
46 check original
46
47
47 $ cd ../repo1
48 $ cd ../repo1
48 $ hg log
49 $ hg log
49 changeset: 1:8af4dc49db9e
50 changeset: 1:8af4dc49db9e
50 tag: tip
51 tag: tip
51 user: test
52 user: test
52 date: Thu Jan 01 00:00:00 1970 +0000
53 date: Thu Jan 01 00:00:00 1970 +0000
53 summary: change in shared clone
54 summary: change in shared clone
54
55
55 changeset: 0:d3873e73d99e
56 changeset: 0:d3873e73d99e
56 user: test
57 user: test
57 date: Thu Jan 01 00:00:00 1970 +0000
58 date: Thu Jan 01 00:00:00 1970 +0000
58 summary: init
59 summary: init
59
60
60 $ hg update
61 $ hg update
61 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 $ cat a # should be two lines of "a"
63 $ cat a # should be two lines of "a"
63 a
64 a
64 a
65 a
65
66
66 commit in original
67 commit in original
67
68
68 $ echo b > b
69 $ echo b > b
69 $ hg commit -A -m'another file'
70 $ hg commit -A -m'another file'
70 adding b
71 adding b
71
72
72 check in shared clone
73 check in shared clone
73
74
74 $ cd ../repo2
75 $ cd ../repo2
75 $ hg log
76 $ hg log
76 changeset: 2:c2e0ac586386
77 changeset: 2:c2e0ac586386
77 tag: tip
78 tag: tip
78 user: test
79 user: test
79 date: Thu Jan 01 00:00:00 1970 +0000
80 date: Thu Jan 01 00:00:00 1970 +0000
80 summary: another file
81 summary: another file
81
82
82 changeset: 1:8af4dc49db9e
83 changeset: 1:8af4dc49db9e
83 user: test
84 user: test
84 date: Thu Jan 01 00:00:00 1970 +0000
85 date: Thu Jan 01 00:00:00 1970 +0000
85 summary: change in shared clone
86 summary: change in shared clone
86
87
87 changeset: 0:d3873e73d99e
88 changeset: 0:d3873e73d99e
88 user: test
89 user: test
89 date: Thu Jan 01 00:00:00 1970 +0000
90 date: Thu Jan 01 00:00:00 1970 +0000
90 summary: init
91 summary: init
91
92
92 $ hg update
93 $ hg update
93 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
94 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
94 $ cat b # should exist with one "b"
95 $ cat b # should exist with one "b"
95 b
96 b
96
97
97 hg serve shared clone
98 hg serve shared clone
98
99
99 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid
100 $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid
100 $ cat hg.pid >> $DAEMON_PIDS
101 $ cat hg.pid >> $DAEMON_PIDS
101 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-file/'
102 $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-file/'
102 200 Script output follows
103 200 Script output follows
103
104
104
105
105 -rw-r--r-- 4 a
106 -rw-r--r-- 4 a
106 -rw-r--r-- 2 b
107 -rw-r--r-- 2 b
107
108
108
109
109
110
110 test unshare command
111 test unshare command
111
112
112 $ hg unshare
113 $ hg unshare
113 $ test -d .hg/store
114 $ test -d .hg/store
114 $ test -f .hg/sharedpath
115 $ test -f .hg/sharedpath
115 [1]
116 [1]
116 $ hg unshare
117 $ hg unshare
117 abort: this is not a shared repo
118 abort: this is not a shared repo
118 [255]
119 [255]
119
120
120 check that a change does not propagate
121 check that a change does not propagate
121
122
122 $ echo b >> b
123 $ echo b >> b
123 $ hg commit -m'change in unshared'
124 $ hg commit -m'change in unshared'
124 $ cd ../repo1
125 $ cd ../repo1
125 $ hg id -r tip
126 $ hg id -r tip
126 c2e0ac586386 tip
127 c2e0ac586386 tip
@@ -1,164 +1,165 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 $ hg clone http://localhost:$HGPORT/ copy
3 $ hg clone http://localhost:$HGPORT/ copy
3 abort: error: Connection refused
4 abort: error: Connection refused
4 [255]
5 [255]
5 $ test -d copy
6 $ test -d copy
6 [1]
7 [1]
7
8
8 This server doesn't do range requests so it's basically only good for
9 This server doesn't do range requests so it's basically only good for
9 one pull
10 one pull
10
11
11 $ cat > dumb.py <<EOF
12 $ cat > dumb.py <<EOF
12 > import BaseHTTPServer, SimpleHTTPServer, os, signal, sys
13 > import BaseHTTPServer, SimpleHTTPServer, os, signal, sys
13 >
14 >
14 > def run(server_class=BaseHTTPServer.HTTPServer,
15 > def run(server_class=BaseHTTPServer.HTTPServer,
15 > handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
16 > handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
16 > server_address = ('localhost', int(os.environ['HGPORT']))
17 > server_address = ('localhost', int(os.environ['HGPORT']))
17 > httpd = server_class(server_address, handler_class)
18 > httpd = server_class(server_address, handler_class)
18 > httpd.serve_forever()
19 > httpd.serve_forever()
19 >
20 >
20 > signal.signal(signal.SIGTERM, lambda x, y: sys.exit(0))
21 > signal.signal(signal.SIGTERM, lambda x, y: sys.exit(0))
21 > run()
22 > run()
22 > EOF
23 > EOF
23 $ python dumb.py 2>/dev/null &
24 $ python dumb.py 2>/dev/null &
24 $ echo $! >> $DAEMON_PIDS
25 $ echo $! >> $DAEMON_PIDS
25 $ hg init remote
26 $ hg init remote
26 $ cd remote
27 $ cd remote
27 $ echo foo > bar
28 $ echo foo > bar
28 $ echo c2 > '.dotfile with spaces'
29 $ echo c2 > '.dotfile with spaces'
29 $ hg add
30 $ hg add
30 adding .dotfile with spaces
31 adding .dotfile with spaces
31 adding bar
32 adding bar
32 $ hg commit -m"test"
33 $ hg commit -m"test"
33 $ hg tip
34 $ hg tip
34 changeset: 0:02770d679fb8
35 changeset: 0:02770d679fb8
35 tag: tip
36 tag: tip
36 user: test
37 user: test
37 date: Thu Jan 01 00:00:00 1970 +0000
38 date: Thu Jan 01 00:00:00 1970 +0000
38 summary: test
39 summary: test
39
40
40 $ cd ..
41 $ cd ..
41 $ hg clone static-http://localhost:$HGPORT/remote local
42 $ hg clone static-http://localhost:$HGPORT/remote local
42 requesting all changes
43 requesting all changes
43 adding changesets
44 adding changesets
44 adding manifests
45 adding manifests
45 adding file changes
46 adding file changes
46 added 1 changesets with 2 changes to 2 files
47 added 1 changesets with 2 changes to 2 files
47 updating to branch default
48 updating to branch default
48 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
49 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
49 $ cd local
50 $ cd local
50 $ hg verify
51 $ hg verify
51 checking changesets
52 checking changesets
52 checking manifests
53 checking manifests
53 crosschecking files in changesets and manifests
54 crosschecking files in changesets and manifests
54 checking files
55 checking files
55 2 files, 1 changesets, 2 total revisions
56 2 files, 1 changesets, 2 total revisions
56 $ cat bar
57 $ cat bar
57 foo
58 foo
58 $ cd ../remote
59 $ cd ../remote
59 $ echo baz > quux
60 $ echo baz > quux
60 $ hg commit -A -mtest2
61 $ hg commit -A -mtest2
61 adding quux
62 adding quux
62
63
63 check for HTTP opener failures when cachefile does not exist
64 check for HTTP opener failures when cachefile does not exist
64
65
65 $ rm .hg/cache/*
66 $ rm .hg/cache/*
66 $ cd ../local
67 $ cd ../local
67 $ echo '[hooks]' >> .hg/hgrc
68 $ echo '[hooks]' >> .hg/hgrc
68 $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup' >> .hg/hgrc
69 $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup' >> .hg/hgrc
69 $ hg pull
70 $ hg pull
70 pulling from static-http://localhost:$HGPORT/remote
71 pulling from static-http://localhost:$HGPORT/remote
71 searching for changes
72 searching for changes
72 adding changesets
73 adding changesets
73 adding manifests
74 adding manifests
74 adding file changes
75 adding file changes
75 added 1 changesets with 1 changes to 1 files
76 added 1 changesets with 1 changes to 1 files
76 changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote
77 changegroup hook: HG_NODE=4ac2e3648604439c580c69b09ec9d93a88d93432 HG_SOURCE=pull HG_URL=http://localhost:$HGPORT/remote
77 (run 'hg update' to get a working copy)
78 (run 'hg update' to get a working copy)
78
79
79 trying to push
80 trying to push
80
81
81 $ hg update
82 $ hg update
82 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
83 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
83 $ echo more foo >> bar
84 $ echo more foo >> bar
84 $ hg commit -m"test"
85 $ hg commit -m"test"
85 $ hg push
86 $ hg push
86 pushing to static-http://localhost:$HGPORT/remote
87 pushing to static-http://localhost:$HGPORT/remote
87 abort: cannot lock static-http repository
88 abort: cannot lock static-http repository
88 [255]
89 [255]
89
90
90 trying clone -r
91 trying clone -r
91
92
92 $ cd ..
93 $ cd ..
93 $ hg clone -r donotexist static-http://localhost:$HGPORT/remote local0
94 $ hg clone -r donotexist static-http://localhost:$HGPORT/remote local0
94 abort: unknown revision 'donotexist'!
95 abort: unknown revision 'donotexist'!
95 [255]
96 [255]
96 $ hg clone -r 0 static-http://localhost:$HGPORT/remote local0
97 $ hg clone -r 0 static-http://localhost:$HGPORT/remote local0
97 adding changesets
98 adding changesets
98 adding manifests
99 adding manifests
99 adding file changes
100 adding file changes
100 added 1 changesets with 2 changes to 2 files
101 added 1 changesets with 2 changes to 2 files
101 updating to branch default
102 updating to branch default
102 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
103 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
103
104
104 test with "/" URI (issue 747) and subrepo
105 test with "/" URI (issue 747) and subrepo
105
106
106 $ hg init
107 $ hg init
107 $ hg init sub
108 $ hg init sub
108 $ hg -R sub tag not-empty
109 $ hg -R sub tag not-empty
109 $ echo sub=sub > .hgsub
110 $ echo sub=sub > .hgsub
110 $ echo a > a
111 $ echo a > a
111 $ hg add a .hgsub
112 $ hg add a .hgsub
112 $ hg -q ci -ma
113 $ hg -q ci -ma
113 $ hg clone static-http://localhost:$HGPORT/ local2
114 $ hg clone static-http://localhost:$HGPORT/ local2
114 requesting all changes
115 requesting all changes
115 adding changesets
116 adding changesets
116 adding manifests
117 adding manifests
117 adding file changes
118 adding file changes
118 added 1 changesets with 3 changes to 3 files
119 added 1 changesets with 3 changes to 3 files
119 updating to branch default
120 updating to branch default
120 cloning subrepo sub from static-http://localhost:$HGPORT/sub
121 cloning subrepo sub from static-http://localhost:$HGPORT/sub
121 requesting all changes
122 requesting all changes
122 adding changesets
123 adding changesets
123 adding manifests
124 adding manifests
124 adding file changes
125 adding file changes
125 added 1 changesets with 1 changes to 1 files
126 added 1 changesets with 1 changes to 1 files
126 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
127 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
127 $ cd local2
128 $ cd local2
128 $ hg verify
129 $ hg verify
129 checking changesets
130 checking changesets
130 checking manifests
131 checking manifests
131 crosschecking files in changesets and manifests
132 crosschecking files in changesets and manifests
132 checking files
133 checking files
133 3 files, 1 changesets, 3 total revisions
134 3 files, 1 changesets, 3 total revisions
134 $ cat a
135 $ cat a
135 a
136 a
136 $ hg paths
137 $ hg paths
137 default = static-http://localhost:$HGPORT/
138 default = static-http://localhost:$HGPORT/
138
139
139 test with empty repo (issue965)
140 test with empty repo (issue965)
140
141
141 $ cd ..
142 $ cd ..
142 $ hg init remotempty
143 $ hg init remotempty
143 $ hg clone static-http://localhost:$HGPORT/remotempty local3
144 $ hg clone static-http://localhost:$HGPORT/remotempty local3
144 no changes found
145 no changes found
145 updating to branch default
146 updating to branch default
146 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
147 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
147 $ cd local3
148 $ cd local3
148 $ hg verify
149 $ hg verify
149 checking changesets
150 checking changesets
150 checking manifests
151 checking manifests
151 crosschecking files in changesets and manifests
152 crosschecking files in changesets and manifests
152 checking files
153 checking files
153 0 files, 0 changesets, 0 total revisions
154 0 files, 0 changesets, 0 total revisions
154 $ hg paths
155 $ hg paths
155 default = static-http://localhost:$HGPORT/remotempty
156 default = static-http://localhost:$HGPORT/remotempty
156
157
157 test with non-repo
158 test with non-repo
158
159
159 $ cd ..
160 $ cd ..
160 $ mkdir notarepo
161 $ mkdir notarepo
161 $ hg clone static-http://localhost:$HGPORT/notarepo local3
162 $ hg clone static-http://localhost:$HGPORT/notarepo local3
162 abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository!
163 abort: 'http://localhost:$HGPORT/notarepo' does not appear to be an hg repository!
163 [255]
164 [255]
164 $ kill $!
165 $ kill $!
@@ -1,103 +1,105 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Preparing the subrepository 'sub'
3 Preparing the subrepository 'sub'
2
4
3 $ hg init sub
5 $ hg init sub
4 $ echo sub > sub/sub
6 $ echo sub > sub/sub
5 $ hg add -R sub
7 $ hg add -R sub
6 adding sub/sub
8 adding sub/sub
7 $ hg commit -R sub -m "sub import"
9 $ hg commit -R sub -m "sub import"
8
10
9 Preparing the 'main' repo which depends on the subrepo 'sub'
11 Preparing the 'main' repo which depends on the subrepo 'sub'
10
12
11 $ hg init main
13 $ hg init main
12 $ echo main > main/main
14 $ echo main > main/main
13 $ echo "sub = ../sub" > main/.hgsub
15 $ echo "sub = ../sub" > main/.hgsub
14 $ hg clone sub main/sub
16 $ hg clone sub main/sub
15 updating to branch default
17 updating to branch default
16 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
18 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
17 $ hg add -R main
19 $ hg add -R main
18 adding main/.hgsub
20 adding main/.hgsub
19 adding main/main
21 adding main/main
20 $ hg commit -R main -m "main import"
22 $ hg commit -R main -m "main import"
21 committing subrepository sub
23 committing subrepository sub
22
24
23 Cleaning both repositories, just as a clone -U
25 Cleaning both repositories, just as a clone -U
24
26
25 $ hg up -C -R sub null
27 $ hg up -C -R sub null
26 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
28 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
27 $ hg up -C -R main null
29 $ hg up -C -R main null
28 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
30 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
29 $ rm -rf main/sub
31 $ rm -rf main/sub
30
32
31 Serving them both using hgweb
33 Serving them both using hgweb
32
34
33 $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf
35 $ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf
34 $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \
36 $ hg serve --webdir-conf webdir.conf -a localhost -p $HGPORT \
35 > -A /dev/null -E /dev/null --pid-file hg.pid -d
37 > -A /dev/null -E /dev/null --pid-file hg.pid -d
36 $ cat hg.pid >> $DAEMON_PIDS
38 $ cat hg.pid >> $DAEMON_PIDS
37
39
38 Clone main from hgweb
40 Clone main from hgweb
39
41
40 $ hg clone "http://localhost:$HGPORT/main" cloned
42 $ hg clone "http://localhost:$HGPORT/main" cloned
41 requesting all changes
43 requesting all changes
42 adding changesets
44 adding changesets
43 adding manifests
45 adding manifests
44 adding file changes
46 adding file changes
45 added 1 changesets with 3 changes to 3 files
47 added 1 changesets with 3 changes to 3 files
46 updating to branch default
48 updating to branch default
47 cloning subrepo sub from http://localhost:$HGPORT/sub
49 cloning subrepo sub from http://localhost:$HGPORT/sub
48 requesting all changes
50 requesting all changes
49 adding changesets
51 adding changesets
50 adding manifests
52 adding manifests
51 adding file changes
53 adding file changes
52 added 1 changesets with 1 changes to 1 files
54 added 1 changesets with 1 changes to 1 files
53 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
55 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
54
56
55 Checking cloned repo ids
57 Checking cloned repo ids
56
58
57 $ hg id -R cloned
59 $ hg id -R cloned
58 fdfeeb3e979e tip
60 fdfeeb3e979e tip
59 $ hg id -R cloned/sub
61 $ hg id -R cloned/sub
60 863c1745b441 tip
62 863c1745b441 tip
61
63
62 subrepo debug for 'main' clone
64 subrepo debug for 'main' clone
63
65
64 $ hg debugsub -R cloned
66 $ hg debugsub -R cloned
65 path sub
67 path sub
66 source ../sub
68 source ../sub
67 revision 863c1745b441bd97a8c4a096e87793073f4fb215
69 revision 863c1745b441bd97a8c4a096e87793073f4fb215
68
70
69 $ "$TESTDIR/killdaemons.py"
71 $ "$TESTDIR/killdaemons.py"
70
72
71 subrepo paths with ssh urls
73 subrepo paths with ssh urls
72
74
73 $ cp $TESTDIR/dummyssh $BINDIR/ssh
75 $ cp $TESTDIR/dummyssh $BINDIR/ssh
74
76
75 $ hg clone ssh://user@dummy/cloned sshclone
77 $ hg clone ssh://user@dummy/cloned sshclone
76 requesting all changes
78 requesting all changes
77 adding changesets
79 adding changesets
78 adding manifests
80 adding manifests
79 adding file changes
81 adding file changes
80 added 1 changesets with 3 changes to 3 files
82 added 1 changesets with 3 changes to 3 files
81 updating to branch default
83 updating to branch default
82 cloning subrepo sub from ssh://user@dummy/sub
84 cloning subrepo sub from ssh://user@dummy/sub
83 requesting all changes
85 requesting all changes
84 adding changesets
86 adding changesets
85 adding manifests
87 adding manifests
86 adding file changes
88 adding file changes
87 added 1 changesets with 1 changes to 1 files
89 added 1 changesets with 1 changes to 1 files
88 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
90 3 files updated, 0 files merged, 0 files removed, 0 files unresolved
89
91
90 $ hg -R sshclone push ssh://user@dummy/$TESTTMP/cloned
92 $ hg -R sshclone push ssh://user@dummy/$TESTTMP/cloned
91 pushing to ssh://user@dummy/$TESTTMP/cloned
93 pushing to ssh://user@dummy/$TESTTMP/cloned
92 pushing subrepo sub to ssh://user@dummy/$TESTTMP/sub
94 pushing subrepo sub to ssh://user@dummy/$TESTTMP/sub
93 searching for changes
95 searching for changes
94 no changes found
96 no changes found
95 searching for changes
97 searching for changes
96 no changes found
98 no changes found
97
99
98 $ cat dummylog
100 $ cat dummylog
99 Got arguments 1:user@dummy 2:hg -R cloned serve --stdio
101 Got arguments 1:user@dummy 2:hg -R cloned serve --stdio
100 Got arguments 1:user@dummy 2:hg -R sub serve --stdio
102 Got arguments 1:user@dummy 2:hg -R sub serve --stdio
101 Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio
103 Got arguments 1:user@dummy 2:hg -R $TESTTMP/cloned serve --stdio
102 Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio
104 Got arguments 1:user@dummy 2:hg -R $TESTTMP/sub serve --stdio
103 $ rm $BINDIR/ssh
105 $ rm $BINDIR/ssh
@@ -1,424 +1,426 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 $ cat <<EOF >> $HGRCPATH
3 $ cat <<EOF >> $HGRCPATH
2 > [extensions]
4 > [extensions]
3 > transplant=
5 > transplant=
4 > EOF
6 > EOF
5
7
6 $ hg init t
8 $ hg init t
7 $ cd t
9 $ cd t
8 $ echo r1 > r1
10 $ echo r1 > r1
9 $ hg ci -Amr1 -d'0 0'
11 $ hg ci -Amr1 -d'0 0'
10 adding r1
12 adding r1
11 $ echo r2 > r2
13 $ echo r2 > r2
12 $ hg ci -Amr2 -d'1 0'
14 $ hg ci -Amr2 -d'1 0'
13 adding r2
15 adding r2
14 $ hg up 0
16 $ hg up 0
15 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
17 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
16
18
17 $ echo b1 > b1
19 $ echo b1 > b1
18 $ hg ci -Amb1 -d '0 0'
20 $ hg ci -Amb1 -d '0 0'
19 adding b1
21 adding b1
20 created new head
22 created new head
21 $ echo b2 > b2
23 $ echo b2 > b2
22 $ hg ci -Amb2 -d '1 0'
24 $ hg ci -Amb2 -d '1 0'
23 adding b2
25 adding b2
24 $ echo b3 > b3
26 $ echo b3 > b3
25 $ hg ci -Amb3 -d '2 0'
27 $ hg ci -Amb3 -d '2 0'
26 adding b3
28 adding b3
27
29
28 $ hg log --template '{rev} {parents} {desc}\n'
30 $ hg log --template '{rev} {parents} {desc}\n'
29 4 b3
31 4 b3
30 3 b2
32 3 b2
31 2 0:17ab29e464c6 b1
33 2 0:17ab29e464c6 b1
32 1 r2
34 1 r2
33 0 r1
35 0 r1
34
36
35 $ hg clone . ../rebase
37 $ hg clone . ../rebase
36 updating to branch default
38 updating to branch default
37 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
39 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 $ cd ../rebase
40 $ cd ../rebase
39
41
40 $ hg up -C 1
42 $ hg up -C 1
41 1 files updated, 0 files merged, 3 files removed, 0 files unresolved
43 1 files updated, 0 files merged, 3 files removed, 0 files unresolved
42
44
43 rebase b onto r1
45 rebase b onto r1
44
46
45 $ hg transplant -a -b tip
47 $ hg transplant -a -b tip
46 applying 37a1297eb21b
48 applying 37a1297eb21b
47 37a1297eb21b transplanted to e234d668f844
49 37a1297eb21b transplanted to e234d668f844
48 applying 722f4667af76
50 applying 722f4667af76
49 722f4667af76 transplanted to 539f377d78df
51 722f4667af76 transplanted to 539f377d78df
50 applying a53251cdf717
52 applying a53251cdf717
51 a53251cdf717 transplanted to ffd6818a3975
53 a53251cdf717 transplanted to ffd6818a3975
52 $ hg log --template '{rev} {parents} {desc}\n'
54 $ hg log --template '{rev} {parents} {desc}\n'
53 7 b3
55 7 b3
54 6 b2
56 6 b2
55 5 1:d11e3596cc1a b1
57 5 1:d11e3596cc1a b1
56 4 b3
58 4 b3
57 3 b2
59 3 b2
58 2 0:17ab29e464c6 b1
60 2 0:17ab29e464c6 b1
59 1 r2
61 1 r2
60 0 r1
62 0 r1
61
63
62 test transplanted revset
64 test transplanted revset
63
65
64 $ hg log -r 'transplanted()' --template '{rev} {parents} {desc}\n'
66 $ hg log -r 'transplanted()' --template '{rev} {parents} {desc}\n'
65 5 1:d11e3596cc1a b1
67 5 1:d11e3596cc1a b1
66 6 b2
68 6 b2
67 7 b3
69 7 b3
68 $ hg help revsets | grep transplanted
70 $ hg help revsets | grep transplanted
69 "transplanted([set])"
71 "transplanted([set])"
70 Transplanted changesets in set, or all transplanted changesets.
72 Transplanted changesets in set, or all transplanted changesets.
71
73
72 test tranplanted keyword
74 test tranplanted keyword
73
75
74 $ hg log --template '{rev} {transplanted}\n'
76 $ hg log --template '{rev} {transplanted}\n'
75 7 a53251cdf717679d1907b289f991534be05c997a
77 7 a53251cdf717679d1907b289f991534be05c997a
76 6 722f4667af767100cb15b6a79324bf8abbfe1ef4
78 6 722f4667af767100cb15b6a79324bf8abbfe1ef4
77 5 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21
79 5 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21
78 4
80 4
79 3
81 3
80 2
82 2
81 1
83 1
82 0
84 0
83
85
84 rollback the transplant
86 rollback the transplant
85 $ hg rollback
87 $ hg rollback
86 repository tip rolled back to revision 4 (undo transplant)
88 repository tip rolled back to revision 4 (undo transplant)
87 working directory now based on revision 1
89 working directory now based on revision 1
88 $ hg tip -q
90 $ hg tip -q
89 4:a53251cdf717
91 4:a53251cdf717
90 $ hg parents -q
92 $ hg parents -q
91 1:d11e3596cc1a
93 1:d11e3596cc1a
92 $ hg status
94 $ hg status
93 ? b1
95 ? b1
94 ? b2
96 ? b2
95 ? b3
97 ? b3
96
98
97 $ hg clone ../t ../prune
99 $ hg clone ../t ../prune
98 updating to branch default
100 updating to branch default
99 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
101 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
100 $ cd ../prune
102 $ cd ../prune
101
103
102 $ hg up -C 1
104 $ hg up -C 1
103 1 files updated, 0 files merged, 3 files removed, 0 files unresolved
105 1 files updated, 0 files merged, 3 files removed, 0 files unresolved
104
106
105 rebase b onto r1, skipping b2
107 rebase b onto r1, skipping b2
106
108
107 $ hg transplant -a -b tip -p 3
109 $ hg transplant -a -b tip -p 3
108 applying 37a1297eb21b
110 applying 37a1297eb21b
109 37a1297eb21b transplanted to e234d668f844
111 37a1297eb21b transplanted to e234d668f844
110 applying a53251cdf717
112 applying a53251cdf717
111 a53251cdf717 transplanted to 7275fda4d04f
113 a53251cdf717 transplanted to 7275fda4d04f
112 $ hg log --template '{rev} {parents} {desc}\n'
114 $ hg log --template '{rev} {parents} {desc}\n'
113 6 b3
115 6 b3
114 5 1:d11e3596cc1a b1
116 5 1:d11e3596cc1a b1
115 4 b3
117 4 b3
116 3 b2
118 3 b2
117 2 0:17ab29e464c6 b1
119 2 0:17ab29e464c6 b1
118 1 r2
120 1 r2
119 0 r1
121 0 r1
120
122
121
123
122 remote transplant
124 remote transplant
123
125
124 $ hg clone -r 1 ../t ../remote
126 $ hg clone -r 1 ../t ../remote
125 adding changesets
127 adding changesets
126 adding manifests
128 adding manifests
127 adding file changes
129 adding file changes
128 added 2 changesets with 2 changes to 2 files
130 added 2 changesets with 2 changes to 2 files
129 updating to branch default
131 updating to branch default
130 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
132 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
131 $ cd ../remote
133 $ cd ../remote
132 $ hg transplant --log -s ../t 2 4
134 $ hg transplant --log -s ../t 2 4
133 searching for changes
135 searching for changes
134 applying 37a1297eb21b
136 applying 37a1297eb21b
135 37a1297eb21b transplanted to c19cf0ccb069
137 37a1297eb21b transplanted to c19cf0ccb069
136 applying a53251cdf717
138 applying a53251cdf717
137 a53251cdf717 transplanted to f7fe5bf98525
139 a53251cdf717 transplanted to f7fe5bf98525
138 $ hg log --template '{rev} {parents} {desc}\n'
140 $ hg log --template '{rev} {parents} {desc}\n'
139 3 b3
141 3 b3
140 (transplanted from a53251cdf717679d1907b289f991534be05c997a)
142 (transplanted from a53251cdf717679d1907b289f991534be05c997a)
141 2 b1
143 2 b1
142 (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21)
144 (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21)
143 1 r2
145 1 r2
144 0 r1
146 0 r1
145
147
146 skip previous transplants
148 skip previous transplants
147
149
148 $ hg transplant -s ../t -a -b 4
150 $ hg transplant -s ../t -a -b 4
149 searching for changes
151 searching for changes
150 applying 722f4667af76
152 applying 722f4667af76
151 722f4667af76 transplanted to 47156cd86c0b
153 722f4667af76 transplanted to 47156cd86c0b
152 $ hg log --template '{rev} {parents} {desc}\n'
154 $ hg log --template '{rev} {parents} {desc}\n'
153 4 b2
155 4 b2
154 3 b3
156 3 b3
155 (transplanted from a53251cdf717679d1907b289f991534be05c997a)
157 (transplanted from a53251cdf717679d1907b289f991534be05c997a)
156 2 b1
158 2 b1
157 (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21)
159 (transplanted from 37a1297eb21b3ef5c5d2ffac22121a0988ed9f21)
158 1 r2
160 1 r2
159 0 r1
161 0 r1
160
162
161 skip local changes transplanted to the source
163 skip local changes transplanted to the source
162
164
163 $ echo b4 > b4
165 $ echo b4 > b4
164 $ hg ci -Amb4 -d '3 0'
166 $ hg ci -Amb4 -d '3 0'
165 adding b4
167 adding b4
166 $ hg clone ../t ../pullback
168 $ hg clone ../t ../pullback
167 updating to branch default
169 updating to branch default
168 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
169 $ cd ../pullback
171 $ cd ../pullback
170 $ hg transplant -s ../remote -a -b tip
172 $ hg transplant -s ../remote -a -b tip
171 searching for changes
173 searching for changes
172 applying 4333daefcb15
174 applying 4333daefcb15
173 4333daefcb15 transplanted to 5f42c04e07cc
175 4333daefcb15 transplanted to 5f42c04e07cc
174
176
175
177
176 remote transplant with pull
178 remote transplant with pull
177
179
178 $ hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid
180 $ hg -R ../t serve -p $HGPORT -d --pid-file=../t.pid
179 $ cat ../t.pid >> $DAEMON_PIDS
181 $ cat ../t.pid >> $DAEMON_PIDS
180
182
181 $ hg clone -r 0 ../t ../rp
183 $ hg clone -r 0 ../t ../rp
182 adding changesets
184 adding changesets
183 adding manifests
185 adding manifests
184 adding file changes
186 adding file changes
185 added 1 changesets with 1 changes to 1 files
187 added 1 changesets with 1 changes to 1 files
186 updating to branch default
188 updating to branch default
187 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
189 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
188 $ cd ../rp
190 $ cd ../rp
189 $ hg transplant -s http://localhost:$HGPORT/ 2 4
191 $ hg transplant -s http://localhost:$HGPORT/ 2 4
190 searching for changes
192 searching for changes
191 searching for changes
193 searching for changes
192 adding changesets
194 adding changesets
193 adding manifests
195 adding manifests
194 adding file changes
196 adding file changes
195 added 1 changesets with 1 changes to 1 files
197 added 1 changesets with 1 changes to 1 files
196 applying a53251cdf717
198 applying a53251cdf717
197 a53251cdf717 transplanted to 8d9279348abb
199 a53251cdf717 transplanted to 8d9279348abb
198 $ hg log --template '{rev} {parents} {desc}\n'
200 $ hg log --template '{rev} {parents} {desc}\n'
199 2 b3
201 2 b3
200 1 b1
202 1 b1
201 0 r1
203 0 r1
202
204
203 transplant --continue
205 transplant --continue
204
206
205 $ hg init ../tc
207 $ hg init ../tc
206 $ cd ../tc
208 $ cd ../tc
207 $ cat <<EOF > foo
209 $ cat <<EOF > foo
208 > foo
210 > foo
209 > bar
211 > bar
210 > baz
212 > baz
211 > EOF
213 > EOF
212 $ echo toremove > toremove
214 $ echo toremove > toremove
213 $ hg ci -Amfoo
215 $ hg ci -Amfoo
214 adding foo
216 adding foo
215 adding toremove
217 adding toremove
216 $ cat <<EOF > foo
218 $ cat <<EOF > foo
217 > foo2
219 > foo2
218 > bar2
220 > bar2
219 > baz2
221 > baz2
220 > EOF
222 > EOF
221 $ rm toremove
223 $ rm toremove
222 $ echo added > added
224 $ echo added > added
223 $ hg ci -Amfoo2
225 $ hg ci -Amfoo2
224 adding added
226 adding added
225 removing toremove
227 removing toremove
226 $ echo bar > bar
228 $ echo bar > bar
227 $ hg ci -Ambar
229 $ hg ci -Ambar
228 adding bar
230 adding bar
229 $ echo bar2 >> bar
231 $ echo bar2 >> bar
230 $ hg ci -mbar2
232 $ hg ci -mbar2
231 $ hg up 0
233 $ hg up 0
232 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
234 2 files updated, 0 files merged, 2 files removed, 0 files unresolved
233 $ echo foobar > foo
235 $ echo foobar > foo
234 $ hg ci -mfoobar
236 $ hg ci -mfoobar
235 created new head
237 created new head
236 $ hg transplant 1:3
238 $ hg transplant 1:3
237 applying a1e30dd1b8e7
239 applying a1e30dd1b8e7
238 patching file foo
240 patching file foo
239 Hunk #1 FAILED at 0
241 Hunk #1 FAILED at 0
240 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
242 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
241 patch failed to apply
243 patch failed to apply
242 abort: fix up the merge and run hg transplant --continue
244 abort: fix up the merge and run hg transplant --continue
243 [255]
245 [255]
244
246
245 transplant -c shouldn't use an old changeset
247 transplant -c shouldn't use an old changeset
246
248
247 $ hg up -C
249 $ hg up -C
248 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
250 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
249 $ rm added
251 $ rm added
250 $ hg transplant 1
252 $ hg transplant 1
251 applying a1e30dd1b8e7
253 applying a1e30dd1b8e7
252 patching file foo
254 patching file foo
253 Hunk #1 FAILED at 0
255 Hunk #1 FAILED at 0
254 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
256 1 out of 1 hunks FAILED -- saving rejects to file foo.rej
255 patch failed to apply
257 patch failed to apply
256 abort: fix up the merge and run hg transplant --continue
258 abort: fix up the merge and run hg transplant --continue
257 [255]
259 [255]
258 $ hg transplant --continue
260 $ hg transplant --continue
259 a1e30dd1b8e7 transplanted as f1563cf27039
261 a1e30dd1b8e7 transplanted as f1563cf27039
260 $ hg transplant 1:3
262 $ hg transplant 1:3
261 skipping already applied revision 1:a1e30dd1b8e7
263 skipping already applied revision 1:a1e30dd1b8e7
262 applying 1739ac5f6139
264 applying 1739ac5f6139
263 1739ac5f6139 transplanted to d649c221319f
265 1739ac5f6139 transplanted to d649c221319f
264 applying 0282d5fbbe02
266 applying 0282d5fbbe02
265 0282d5fbbe02 transplanted to 77418277ccb3
267 0282d5fbbe02 transplanted to 77418277ccb3
266 $ hg locate
268 $ hg locate
267 added
269 added
268 bar
270 bar
269 foo
271 foo
270 $ cd ..
272 $ cd ..
271
273
272 Issue1111: Test transplant --merge
274 Issue1111: Test transplant --merge
273
275
274 $ hg init t1111
276 $ hg init t1111
275 $ cd t1111
277 $ cd t1111
276 $ echo a > a
278 $ echo a > a
277 $ hg ci -Am adda
279 $ hg ci -Am adda
278 adding a
280 adding a
279 $ echo b >> a
281 $ echo b >> a
280 $ hg ci -m appendb
282 $ hg ci -m appendb
281 $ echo c >> a
283 $ echo c >> a
282 $ hg ci -m appendc
284 $ hg ci -m appendc
283 $ hg up -C 0
285 $ hg up -C 0
284 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
286 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
285 $ echo d >> a
287 $ echo d >> a
286 $ hg ci -m appendd
288 $ hg ci -m appendd
287 created new head
289 created new head
288
290
289 tranplant
291 tranplant
290
292
291 $ hg transplant -m 1
293 $ hg transplant -m 1
292 applying 42dc4432fd35
294 applying 42dc4432fd35
293 1:42dc4432fd35 merged at a9f4acbac129
295 1:42dc4432fd35 merged at a9f4acbac129
294 $ cd ..
296 $ cd ..
295
297
296 test transplant into empty repository
298 test transplant into empty repository
297
299
298 $ hg init empty
300 $ hg init empty
299 $ cd empty
301 $ cd empty
300 $ hg transplant -s ../t -b tip -a
302 $ hg transplant -s ../t -b tip -a
301 adding changesets
303 adding changesets
302 adding manifests
304 adding manifests
303 adding file changes
305 adding file changes
304 added 4 changesets with 4 changes to 4 files
306 added 4 changesets with 4 changes to 4 files
305 $ cd ..
307 $ cd ..
306
308
307
309
308 test filter
310 test filter
309
311
310 $ hg init filter
312 $ hg init filter
311 $ cd filter
313 $ cd filter
312 $ cat <<'EOF' >test-filter
314 $ cat <<'EOF' >test-filter
313 > #!/bin/sh
315 > #!/bin/sh
314 > sed 's/r1/r2/' $1 > $1.new
316 > sed 's/r1/r2/' $1 > $1.new
315 > mv $1.new $1
317 > mv $1.new $1
316 > EOF
318 > EOF
317 $ chmod +x test-filter
319 $ chmod +x test-filter
318 $ hg transplant -s ../t -b tip -a --filter ./test-filter
320 $ hg transplant -s ../t -b tip -a --filter ./test-filter
319 filtering * (glob)
321 filtering * (glob)
320 applying 17ab29e464c6
322 applying 17ab29e464c6
321 17ab29e464c6 transplanted to e9ffc54ea104
323 17ab29e464c6 transplanted to e9ffc54ea104
322 filtering * (glob)
324 filtering * (glob)
323 applying 37a1297eb21b
325 applying 37a1297eb21b
324 37a1297eb21b transplanted to 348b36d0b6a5
326 37a1297eb21b transplanted to 348b36d0b6a5
325 filtering * (glob)
327 filtering * (glob)
326 applying 722f4667af76
328 applying 722f4667af76
327 722f4667af76 transplanted to 0aa6979afb95
329 722f4667af76 transplanted to 0aa6979afb95
328 filtering * (glob)
330 filtering * (glob)
329 applying a53251cdf717
331 applying a53251cdf717
330 a53251cdf717 transplanted to 14f8512272b5
332 a53251cdf717 transplanted to 14f8512272b5
331 $ hg log --template '{rev} {parents} {desc}\n'
333 $ hg log --template '{rev} {parents} {desc}\n'
332 3 b3
334 3 b3
333 2 b2
335 2 b2
334 1 b1
336 1 b1
335 0 r2
337 0 r2
336 $ cd ..
338 $ cd ..
337
339
338
340
339 test filter with failed patch
341 test filter with failed patch
340
342
341 $ cd filter
343 $ cd filter
342 $ hg up 0
344 $ hg up 0
343 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
345 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
344 $ echo foo > b1
346 $ echo foo > b1
345 $ hg ci -Am foo
347 $ hg ci -Am foo
346 adding b1
348 adding b1
347 adding test-filter
349 adding test-filter
348 created new head
350 created new head
349 $ hg transplant 1 --filter ./test-filter
351 $ hg transplant 1 --filter ./test-filter
350 filtering * (glob)
352 filtering * (glob)
351 applying 348b36d0b6a5
353 applying 348b36d0b6a5
352 file b1 already exists
354 file b1 already exists
353 1 out of 1 hunks FAILED -- saving rejects to file b1.rej
355 1 out of 1 hunks FAILED -- saving rejects to file b1.rej
354 patch failed to apply
356 patch failed to apply
355 abort: fix up the merge and run hg transplant --continue
357 abort: fix up the merge and run hg transplant --continue
356 [255]
358 [255]
357 $ cd ..
359 $ cd ..
358
360
359 test environment passed to filter
361 test environment passed to filter
360
362
361 $ hg init filter-environment
363 $ hg init filter-environment
362 $ cd filter-environment
364 $ cd filter-environment
363 $ cat <<'EOF' >test-filter-environment
365 $ cat <<'EOF' >test-filter-environment
364 > #!/bin/sh
366 > #!/bin/sh
365 > echo "Transplant by $HGUSER" >> $1
367 > echo "Transplant by $HGUSER" >> $1
366 > echo "Transplant from rev $HGREVISION" >> $1
368 > echo "Transplant from rev $HGREVISION" >> $1
367 > EOF
369 > EOF
368 $ chmod +x test-filter-environment
370 $ chmod +x test-filter-environment
369 $ hg transplant -s ../t --filter ./test-filter-environment 0
371 $ hg transplant -s ../t --filter ./test-filter-environment 0
370 filtering * (glob)
372 filtering * (glob)
371 applying 17ab29e464c6
373 applying 17ab29e464c6
372 17ab29e464c6 transplanted to 5190e68026a0
374 17ab29e464c6 transplanted to 5190e68026a0
373
375
374 $ hg log --template '{rev} {parents} {desc}\n'
376 $ hg log --template '{rev} {parents} {desc}\n'
375 0 r1
377 0 r1
376 Transplant by test
378 Transplant by test
377 Transplant from rev 17ab29e464c6ca53e329470efe2a9918ac617a6f
379 Transplant from rev 17ab29e464c6ca53e329470efe2a9918ac617a6f
378 $ cd ..
380 $ cd ..
379
381
380 test transplant with filter handles invalid changelog
382 test transplant with filter handles invalid changelog
381
383
382 $ hg init filter-invalid-log
384 $ hg init filter-invalid-log
383 $ cd filter-invalid-log
385 $ cd filter-invalid-log
384 $ cat <<'EOF' >test-filter-invalid-log
386 $ cat <<'EOF' >test-filter-invalid-log
385 > #!/bin/sh
387 > #!/bin/sh
386 > echo "" > $1
388 > echo "" > $1
387 > EOF
389 > EOF
388 $ chmod +x test-filter-invalid-log
390 $ chmod +x test-filter-invalid-log
389 $ hg transplant -s ../t --filter ./test-filter-invalid-log 0
391 $ hg transplant -s ../t --filter ./test-filter-invalid-log 0
390 filtering * (glob)
392 filtering * (glob)
391 abort: filter corrupted changeset (no user or date)
393 abort: filter corrupted changeset (no user or date)
392 [255]
394 [255]
393
395
394 test with a win32ext like setup (differing EOLs)
396 test with a win32ext like setup (differing EOLs)
395
397
396 $ hg init twin1
398 $ hg init twin1
397 $ cd twin1
399 $ cd twin1
398 $ echo a > a
400 $ echo a > a
399 $ echo b > b
401 $ echo b > b
400 $ echo b >> b
402 $ echo b >> b
401 $ hg ci -Am t
403 $ hg ci -Am t
402 adding a
404 adding a
403 adding b
405 adding b
404 $ echo a > b
406 $ echo a > b
405 $ echo b >> b
407 $ echo b >> b
406 $ hg ci -m changeb
408 $ hg ci -m changeb
407 $ cd ..
409 $ cd ..
408
410
409 $ hg init twin2
411 $ hg init twin2
410 $ cd twin2
412 $ cd twin2
411 $ echo '[patch]' >> .hg/hgrc
413 $ echo '[patch]' >> .hg/hgrc
412 $ echo 'eol = crlf' >> .hg/hgrc
414 $ echo 'eol = crlf' >> .hg/hgrc
413 $ python -c "file('b', 'wb').write('b\r\nb\r\n')"
415 $ python -c "file('b', 'wb').write('b\r\nb\r\n')"
414 $ hg ci -Am addb
416 $ hg ci -Am addb
415 adding b
417 adding b
416 $ hg transplant -s ../twin1 tip
418 $ hg transplant -s ../twin1 tip
417 searching for changes
419 searching for changes
418 warning: repository is unrelated
420 warning: repository is unrelated
419 applying 2e849d776c17
421 applying 2e849d776c17
420 2e849d776c17 transplanted to 8e65bebc063e
422 2e849d776c17 transplanted to 8e65bebc063e
421 $ cat b
423 $ cat b
422 a\r (esc)
424 a\r (esc)
423 b\r (esc)
425 b\r (esc)
424 $ cd ..
426 $ cd ..
@@ -1,310 +1,312 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Tests discovery against servers without getbundle support:
3 Tests discovery against servers without getbundle support:
2
4
3 $ cat >> $HGRCPATH <<EOF
5 $ cat >> $HGRCPATH <<EOF
4 > [ui]
6 > [ui]
5 > logtemplate="{rev} {node|short}: {desc} {branches}\n"
7 > logtemplate="{rev} {node|short}: {desc} {branches}\n"
6 > [extensions]
8 > [extensions]
7 > graphlog=
9 > graphlog=
8 > EOF
10 > EOF
9 $ cp $HGRCPATH $HGRCPATH-withcap
11 $ cp $HGRCPATH $HGRCPATH-withcap
10
12
11 $ CAP="getbundle known changegroupsubset"
13 $ CAP="getbundle known changegroupsubset"
12 $ . "$TESTDIR/notcapable"
14 $ . "$TESTDIR/notcapable"
13 $ cp $HGRCPATH $HGRCPATH-nocap
15 $ cp $HGRCPATH $HGRCPATH-nocap
14 $ cp $HGRCPATH-withcap $HGRCPATH
16 $ cp $HGRCPATH-withcap $HGRCPATH
15
17
16 Setup HTTP server control:
18 Setup HTTP server control:
17
19
18 $ remote=http://localhost:$HGPORT/
20 $ remote=http://localhost:$HGPORT/
19 $ export remote
21 $ export remote
20 $ tstart() {
22 $ tstart() {
21 > echo '[web]' > $1/.hg/hgrc
23 > echo '[web]' > $1/.hg/hgrc
22 > echo 'push_ssl = false' >> $1/.hg/hgrc
24 > echo 'push_ssl = false' >> $1/.hg/hgrc
23 > echo 'allow_push = *' >> $1/.hg/hgrc
25 > echo 'allow_push = *' >> $1/.hg/hgrc
24 > cp $HGRCPATH-nocap $HGRCPATH
26 > cp $HGRCPATH-nocap $HGRCPATH
25 > hg serve -R $1 -p $HGPORT -d --pid-file=hg.pid -E errors.log
27 > hg serve -R $1 -p $HGPORT -d --pid-file=hg.pid -E errors.log
26 > cat hg.pid >> $DAEMON_PIDS
28 > cat hg.pid >> $DAEMON_PIDS
27 > }
29 > }
28 $ tstop() {
30 $ tstop() {
29 > "$TESTDIR/killdaemons.py"
31 > "$TESTDIR/killdaemons.py"
30 > cp $HGRCPATH-withcap $HGRCPATH
32 > cp $HGRCPATH-withcap $HGRCPATH
31 > }
33 > }
32
34
33 Both are empty:
35 Both are empty:
34
36
35 $ hg init empty1
37 $ hg init empty1
36 $ hg init empty2
38 $ hg init empty2
37 $ tstart empty2
39 $ tstart empty2
38 $ hg incoming -R empty1 $remote
40 $ hg incoming -R empty1 $remote
39 comparing with http://localhost:$HGPORT/
41 comparing with http://localhost:$HGPORT/
40 no changes found
42 no changes found
41 [1]
43 [1]
42 $ hg outgoing -R empty1 $remote
44 $ hg outgoing -R empty1 $remote
43 comparing with http://localhost:$HGPORT/
45 comparing with http://localhost:$HGPORT/
44 no changes found
46 no changes found
45 [1]
47 [1]
46 $ hg pull -R empty1 $remote
48 $ hg pull -R empty1 $remote
47 pulling from http://localhost:$HGPORT/
49 pulling from http://localhost:$HGPORT/
48 no changes found
50 no changes found
49 $ hg push -R empty1 $remote
51 $ hg push -R empty1 $remote
50 pushing to http://localhost:$HGPORT/
52 pushing to http://localhost:$HGPORT/
51 no changes found
53 no changes found
52 $ tstop
54 $ tstop
53
55
54 Base repo:
56 Base repo:
55
57
56 $ hg init main
58 $ hg init main
57 $ cd main
59 $ cd main
58 $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip'
60 $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip'
59 $ hg glog
61 $ hg glog
60 o 11 a19bfa7e7328: r11 both
62 o 11 a19bfa7e7328: r11 both
61 |
63 |
62 o 10 8b6bad1512e1: r10 both
64 o 10 8b6bad1512e1: r10 both
63 |
65 |
64 o 9 025829e08038: r9 both
66 o 9 025829e08038: r9 both
65 |\
67 |\
66 | o 8 d8f638ac69e9: r8 name2
68 | o 8 d8f638ac69e9: r8 name2
67 | |
69 | |
68 | o 7 b6b4d315a2ac: r7 name2
70 | o 7 b6b4d315a2ac: r7 name2
69 | |
71 | |
70 | o 6 6c6f5d5f3c11: r6 name2
72 | o 6 6c6f5d5f3c11: r6 name2
71 | |
73 | |
72 | o 5 70314b29987d: r5 name2
74 | o 5 70314b29987d: r5 name2
73 | |
75 | |
74 o | 4 e71dbbc70e03: r4 name1
76 o | 4 e71dbbc70e03: r4 name1
75 | |
77 | |
76 o | 3 2c8d5d5ec612: r3 name1
78 o | 3 2c8d5d5ec612: r3 name1
77 | |
79 | |
78 o | 2 a7892891da29: r2 name1
80 o | 2 a7892891da29: r2 name1
79 |/
81 |/
80 o 1 0019a3b924fd: r1
82 o 1 0019a3b924fd: r1
81 |
83 |
82 o 0 d57206cc072a: r0
84 o 0 d57206cc072a: r0
83
85
84 $ cd ..
86 $ cd ..
85 $ tstart main
87 $ tstart main
86
88
87 Full clone:
89 Full clone:
88
90
89 $ hg clone main full
91 $ hg clone main full
90 updating to branch default
92 updating to branch default
91 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
93 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
92 $ cd full
94 $ cd full
93 $ hg incoming $remote
95 $ hg incoming $remote
94 comparing with http://localhost:$HGPORT/
96 comparing with http://localhost:$HGPORT/
95 searching for changes
97 searching for changes
96 no changes found
98 no changes found
97 [1]
99 [1]
98 $ hg outgoing $remote
100 $ hg outgoing $remote
99 comparing with http://localhost:$HGPORT/
101 comparing with http://localhost:$HGPORT/
100 searching for changes
102 searching for changes
101 no changes found
103 no changes found
102 [1]
104 [1]
103 $ hg pull $remote
105 $ hg pull $remote
104 pulling from http://localhost:$HGPORT/
106 pulling from http://localhost:$HGPORT/
105 searching for changes
107 searching for changes
106 no changes found
108 no changes found
107 $ hg push $remote
109 $ hg push $remote
108 pushing to http://localhost:$HGPORT/
110 pushing to http://localhost:$HGPORT/
109 searching for changes
111 searching for changes
110 no changes found
112 no changes found
111 $ cd ..
113 $ cd ..
112
114
113 Local is empty:
115 Local is empty:
114
116
115 $ cd empty1
117 $ cd empty1
116 $ hg incoming $remote --rev name1
118 $ hg incoming $remote --rev name1
117 comparing with http://localhost:$HGPORT/
119 comparing with http://localhost:$HGPORT/
118 abort: cannot look up remote changes; remote repository does not support the 'changegroupsubset' capability!
120 abort: cannot look up remote changes; remote repository does not support the 'changegroupsubset' capability!
119 [255]
121 [255]
120 $ hg incoming $remote
122 $ hg incoming $remote
121 comparing with http://localhost:$HGPORT/
123 comparing with http://localhost:$HGPORT/
122 0 d57206cc072a: r0
124 0 d57206cc072a: r0
123 1 0019a3b924fd: r1
125 1 0019a3b924fd: r1
124 2 a7892891da29: r2 name1
126 2 a7892891da29: r2 name1
125 3 2c8d5d5ec612: r3 name1
127 3 2c8d5d5ec612: r3 name1
126 4 e71dbbc70e03: r4 name1
128 4 e71dbbc70e03: r4 name1
127 5 70314b29987d: r5 name2
129 5 70314b29987d: r5 name2
128 6 6c6f5d5f3c11: r6 name2
130 6 6c6f5d5f3c11: r6 name2
129 7 b6b4d315a2ac: r7 name2
131 7 b6b4d315a2ac: r7 name2
130 8 d8f638ac69e9: r8 name2
132 8 d8f638ac69e9: r8 name2
131 9 025829e08038: r9 both
133 9 025829e08038: r9 both
132 10 8b6bad1512e1: r10 both
134 10 8b6bad1512e1: r10 both
133 11 a19bfa7e7328: r11 both
135 11 a19bfa7e7328: r11 both
134 $ hg outgoing $remote
136 $ hg outgoing $remote
135 comparing with http://localhost:$HGPORT/
137 comparing with http://localhost:$HGPORT/
136 no changes found
138 no changes found
137 [1]
139 [1]
138 $ hg push $remote
140 $ hg push $remote
139 pushing to http://localhost:$HGPORT/
141 pushing to http://localhost:$HGPORT/
140 no changes found
142 no changes found
141 $ hg pull $remote
143 $ hg pull $remote
142 pulling from http://localhost:$HGPORT/
144 pulling from http://localhost:$HGPORT/
143 requesting all changes
145 requesting all changes
144 adding changesets
146 adding changesets
145 adding manifests
147 adding manifests
146 adding file changes
148 adding file changes
147 added 12 changesets with 24 changes to 2 files
149 added 12 changesets with 24 changes to 2 files
148 (run 'hg update' to get a working copy)
150 (run 'hg update' to get a working copy)
149 $ hg incoming $remote
151 $ hg incoming $remote
150 comparing with http://localhost:$HGPORT/
152 comparing with http://localhost:$HGPORT/
151 searching for changes
153 searching for changes
152 no changes found
154 no changes found
153 [1]
155 [1]
154 $ cd ..
156 $ cd ..
155
157
156 Local is subset:
158 Local is subset:
157
159
158 $ cp $HGRCPATH-withcap $HGRCPATH
160 $ cp $HGRCPATH-withcap $HGRCPATH
159 $ hg clone main subset --rev name2 ; cd subset
161 $ hg clone main subset --rev name2 ; cd subset
160 adding changesets
162 adding changesets
161 adding manifests
163 adding manifests
162 adding file changes
164 adding file changes
163 added 6 changesets with 12 changes to 2 files
165 added 6 changesets with 12 changes to 2 files
164 updating to branch name2
166 updating to branch name2
165 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
167 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
166 $ cp $HGRCPATH-nocap $HGRCPATH
168 $ cp $HGRCPATH-nocap $HGRCPATH
167 $ hg incoming $remote
169 $ hg incoming $remote
168 comparing with http://localhost:$HGPORT/
170 comparing with http://localhost:$HGPORT/
169 searching for changes
171 searching for changes
170 6 a7892891da29: r2 name1
172 6 a7892891da29: r2 name1
171 7 2c8d5d5ec612: r3 name1
173 7 2c8d5d5ec612: r3 name1
172 8 e71dbbc70e03: r4 name1
174 8 e71dbbc70e03: r4 name1
173 9 025829e08038: r9 both
175 9 025829e08038: r9 both
174 10 8b6bad1512e1: r10 both
176 10 8b6bad1512e1: r10 both
175 11 a19bfa7e7328: r11 both
177 11 a19bfa7e7328: r11 both
176 $ hg outgoing $remote
178 $ hg outgoing $remote
177 comparing with http://localhost:$HGPORT/
179 comparing with http://localhost:$HGPORT/
178 searching for changes
180 searching for changes
179 no changes found
181 no changes found
180 [1]
182 [1]
181 $ hg push $remote
183 $ hg push $remote
182 pushing to http://localhost:$HGPORT/
184 pushing to http://localhost:$HGPORT/
183 searching for changes
185 searching for changes
184 no changes found
186 no changes found
185 $ hg pull $remote
187 $ hg pull $remote
186 pulling from http://localhost:$HGPORT/
188 pulling from http://localhost:$HGPORT/
187 searching for changes
189 searching for changes
188 adding changesets
190 adding changesets
189 adding manifests
191 adding manifests
190 adding file changes
192 adding file changes
191 added 6 changesets with 12 changes to 2 files
193 added 6 changesets with 12 changes to 2 files
192 (run 'hg update' to get a working copy)
194 (run 'hg update' to get a working copy)
193 $ hg incoming $remote
195 $ hg incoming $remote
194 comparing with http://localhost:$HGPORT/
196 comparing with http://localhost:$HGPORT/
195 searching for changes
197 searching for changes
196 no changes found
198 no changes found
197 [1]
199 [1]
198 $ cd ..
200 $ cd ..
199
201
200 Remote is empty:
202 Remote is empty:
201
203
202 $ tstop ; tstart empty2
204 $ tstop ; tstart empty2
203 $ cd main
205 $ cd main
204 $ hg incoming $remote
206 $ hg incoming $remote
205 comparing with http://localhost:$HGPORT/
207 comparing with http://localhost:$HGPORT/
206 searching for changes
208 searching for changes
207 no changes found
209 no changes found
208 [1]
210 [1]
209 $ hg outgoing $remote
211 $ hg outgoing $remote
210 comparing with http://localhost:$HGPORT/
212 comparing with http://localhost:$HGPORT/
211 searching for changes
213 searching for changes
212 0 d57206cc072a: r0
214 0 d57206cc072a: r0
213 1 0019a3b924fd: r1
215 1 0019a3b924fd: r1
214 2 a7892891da29: r2 name1
216 2 a7892891da29: r2 name1
215 3 2c8d5d5ec612: r3 name1
217 3 2c8d5d5ec612: r3 name1
216 4 e71dbbc70e03: r4 name1
218 4 e71dbbc70e03: r4 name1
217 5 70314b29987d: r5 name2
219 5 70314b29987d: r5 name2
218 6 6c6f5d5f3c11: r6 name2
220 6 6c6f5d5f3c11: r6 name2
219 7 b6b4d315a2ac: r7 name2
221 7 b6b4d315a2ac: r7 name2
220 8 d8f638ac69e9: r8 name2
222 8 d8f638ac69e9: r8 name2
221 9 025829e08038: r9 both
223 9 025829e08038: r9 both
222 10 8b6bad1512e1: r10 both
224 10 8b6bad1512e1: r10 both
223 11 a19bfa7e7328: r11 both
225 11 a19bfa7e7328: r11 both
224 $ hg pull $remote
226 $ hg pull $remote
225 pulling from http://localhost:$HGPORT/
227 pulling from http://localhost:$HGPORT/
226 searching for changes
228 searching for changes
227 no changes found
229 no changes found
228 $ hg push $remote
230 $ hg push $remote
229 pushing to http://localhost:$HGPORT/
231 pushing to http://localhost:$HGPORT/
230 searching for changes
232 searching for changes
231 remote: adding changesets
233 remote: adding changesets
232 remote: adding manifests
234 remote: adding manifests
233 remote: adding file changes
235 remote: adding file changes
234 remote: added 12 changesets with 24 changes to 2 files
236 remote: added 12 changesets with 24 changes to 2 files
235 $ hg outgoing $remote
237 $ hg outgoing $remote
236 comparing with http://localhost:$HGPORT/
238 comparing with http://localhost:$HGPORT/
237 searching for changes
239 searching for changes
238 no changes found
240 no changes found
239 [1]
241 [1]
240 $ cd ..
242 $ cd ..
241
243
242 Local is superset:
244 Local is superset:
243
245
244 $ tstop
246 $ tstop
245 $ hg clone main subset2 --rev name2
247 $ hg clone main subset2 --rev name2
246 adding changesets
248 adding changesets
247 adding manifests
249 adding manifests
248 adding file changes
250 adding file changes
249 added 6 changesets with 12 changes to 2 files
251 added 6 changesets with 12 changes to 2 files
250 updating to branch name2
252 updating to branch name2
251 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
253 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
252 $ tstart subset2
254 $ tstart subset2
253 $ cd main
255 $ cd main
254 $ hg incoming $remote
256 $ hg incoming $remote
255 comparing with http://localhost:$HGPORT/
257 comparing with http://localhost:$HGPORT/
256 searching for changes
258 searching for changes
257 no changes found
259 no changes found
258 [1]
260 [1]
259 $ hg outgoing $remote
261 $ hg outgoing $remote
260 comparing with http://localhost:$HGPORT/
262 comparing with http://localhost:$HGPORT/
261 searching for changes
263 searching for changes
262 2 a7892891da29: r2 name1
264 2 a7892891da29: r2 name1
263 3 2c8d5d5ec612: r3 name1
265 3 2c8d5d5ec612: r3 name1
264 4 e71dbbc70e03: r4 name1
266 4 e71dbbc70e03: r4 name1
265 9 025829e08038: r9 both
267 9 025829e08038: r9 both
266 10 8b6bad1512e1: r10 both
268 10 8b6bad1512e1: r10 both
267 11 a19bfa7e7328: r11 both
269 11 a19bfa7e7328: r11 both
268 $ hg pull $remote
270 $ hg pull $remote
269 pulling from http://localhost:$HGPORT/
271 pulling from http://localhost:$HGPORT/
270 searching for changes
272 searching for changes
271 no changes found
273 no changes found
272 $ hg push $remote
274 $ hg push $remote
273 pushing to http://localhost:$HGPORT/
275 pushing to http://localhost:$HGPORT/
274 searching for changes
276 searching for changes
275 abort: push creates new remote branches: both, name1!
277 abort: push creates new remote branches: both, name1!
276 (use 'hg push --new-branch' to create new remote branches)
278 (use 'hg push --new-branch' to create new remote branches)
277 [255]
279 [255]
278 $ hg push $remote --new-branch
280 $ hg push $remote --new-branch
279 pushing to http://localhost:$HGPORT/
281 pushing to http://localhost:$HGPORT/
280 searching for changes
282 searching for changes
281 remote: adding changesets
283 remote: adding changesets
282 remote: adding manifests
284 remote: adding manifests
283 remote: adding file changes
285 remote: adding file changes
284 remote: added 6 changesets with 12 changes to 2 files
286 remote: added 6 changesets with 12 changes to 2 files
285 $ hg outgoing $remote
287 $ hg outgoing $remote
286 comparing with http://localhost:$HGPORT/
288 comparing with http://localhost:$HGPORT/
287 searching for changes
289 searching for changes
288 no changes found
290 no changes found
289 [1]
291 [1]
290 $ cd ..
292 $ cd ..
291
293
292 Partial pull:
294 Partial pull:
293
295
294 $ tstop ; tstart main
296 $ tstop ; tstart main
295 $ hg clone $remote partial --rev name2
297 $ hg clone $remote partial --rev name2
296 abort: partial pull cannot be done because other repository doesn't support changegroupsubset.
298 abort: partial pull cannot be done because other repository doesn't support changegroupsubset.
297 [255]
299 [255]
298 $ hg init partial; cd partial
300 $ hg init partial; cd partial
299 $ hg incoming $remote --rev name2
301 $ hg incoming $remote --rev name2
300 comparing with http://localhost:$HGPORT/
302 comparing with http://localhost:$HGPORT/
301 abort: cannot look up remote changes; remote repository does not support the 'changegroupsubset' capability!
303 abort: cannot look up remote changes; remote repository does not support the 'changegroupsubset' capability!
302 [255]
304 [255]
303 $ hg pull $remote --rev name2
305 $ hg pull $remote --rev name2
304 pulling from http://localhost:$HGPORT/
306 pulling from http://localhost:$HGPORT/
305 abort: partial pull cannot be done because other repository doesn't support changegroupsubset.
307 abort: partial pull cannot be done because other repository doesn't support changegroupsubset.
306 [255]
308 [255]
307 $ cd ..
309 $ cd ..
308
310
309 $ tstop
311 $ tstop
310
312
@@ -1,498 +1,500 b''
1 $ "$TESTDIR/hghave" serve || exit 80
2
1 Tests discovery against servers without getbundle support:
3 Tests discovery against servers without getbundle support:
2
4
3 $ CAP=getbundle
5 $ CAP=getbundle
4 $ . "$TESTDIR/notcapable"
6 $ . "$TESTDIR/notcapable"
5 $ cat >> $HGRCPATH <<EOF
7 $ cat >> $HGRCPATH <<EOF
6 > [ui]
8 > [ui]
7 > logtemplate="{rev} {node|short}: {desc} {branches}\n"
9 > logtemplate="{rev} {node|short}: {desc} {branches}\n"
8 > [extensions]
10 > [extensions]
9 > graphlog=
11 > graphlog=
10 > EOF
12 > EOF
11
13
12 Setup HTTP server control:
14 Setup HTTP server control:
13
15
14 $ remote=http://localhost:$HGPORT/
16 $ remote=http://localhost:$HGPORT/
15 $ export remote
17 $ export remote
16 $ tstart() {
18 $ tstart() {
17 > echo '[web]' > $1/.hg/hgrc
19 > echo '[web]' > $1/.hg/hgrc
18 > echo 'push_ssl = false' >> $1/.hg/hgrc
20 > echo 'push_ssl = false' >> $1/.hg/hgrc
19 > echo 'allow_push = *' >> $1/.hg/hgrc
21 > echo 'allow_push = *' >> $1/.hg/hgrc
20 > hg serve -R $1 -p $HGPORT -d --pid-file=hg.pid -E errors.log
22 > hg serve -R $1 -p $HGPORT -d --pid-file=hg.pid -E errors.log
21 > cat hg.pid >> $DAEMON_PIDS
23 > cat hg.pid >> $DAEMON_PIDS
22 > }
24 > }
23 $ tstop() {
25 $ tstop() {
24 > "$TESTDIR/killdaemons.py"
26 > "$TESTDIR/killdaemons.py"
25 > }
27 > }
26
28
27 Both are empty:
29 Both are empty:
28
30
29 $ hg init empty1
31 $ hg init empty1
30 $ hg init empty2
32 $ hg init empty2
31 $ tstart empty2
33 $ tstart empty2
32 $ hg incoming -R empty1 $remote
34 $ hg incoming -R empty1 $remote
33 comparing with http://localhost:$HGPORT/
35 comparing with http://localhost:$HGPORT/
34 no changes found
36 no changes found
35 [1]
37 [1]
36 $ hg outgoing -R empty1 $remote
38 $ hg outgoing -R empty1 $remote
37 comparing with http://localhost:$HGPORT/
39 comparing with http://localhost:$HGPORT/
38 no changes found
40 no changes found
39 [1]
41 [1]
40 $ hg pull -R empty1 $remote
42 $ hg pull -R empty1 $remote
41 pulling from http://localhost:$HGPORT/
43 pulling from http://localhost:$HGPORT/
42 no changes found
44 no changes found
43 $ hg push -R empty1 $remote
45 $ hg push -R empty1 $remote
44 pushing to http://localhost:$HGPORT/
46 pushing to http://localhost:$HGPORT/
45 no changes found
47 no changes found
46 $ tstop
48 $ tstop
47
49
48 Base repo:
50 Base repo:
49
51
50 $ hg init main
52 $ hg init main
51 $ cd main
53 $ cd main
52 $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip'
54 $ hg debugbuilddag -mo '+2:tbase @name1 +3:thead1 <tbase @name2 +4:thead2 @both /thead1 +2:tmaintip'
53 $ hg glog
55 $ hg glog
54 o 11 a19bfa7e7328: r11 both
56 o 11 a19bfa7e7328: r11 both
55 |
57 |
56 o 10 8b6bad1512e1: r10 both
58 o 10 8b6bad1512e1: r10 both
57 |
59 |
58 o 9 025829e08038: r9 both
60 o 9 025829e08038: r9 both
59 |\
61 |\
60 | o 8 d8f638ac69e9: r8 name2
62 | o 8 d8f638ac69e9: r8 name2
61 | |
63 | |
62 | o 7 b6b4d315a2ac: r7 name2
64 | o 7 b6b4d315a2ac: r7 name2
63 | |
65 | |
64 | o 6 6c6f5d5f3c11: r6 name2
66 | o 6 6c6f5d5f3c11: r6 name2
65 | |
67 | |
66 | o 5 70314b29987d: r5 name2
68 | o 5 70314b29987d: r5 name2
67 | |
69 | |
68 o | 4 e71dbbc70e03: r4 name1
70 o | 4 e71dbbc70e03: r4 name1
69 | |
71 | |
70 o | 3 2c8d5d5ec612: r3 name1
72 o | 3 2c8d5d5ec612: r3 name1
71 | |
73 | |
72 o | 2 a7892891da29: r2 name1
74 o | 2 a7892891da29: r2 name1
73 |/
75 |/
74 o 1 0019a3b924fd: r1
76 o 1 0019a3b924fd: r1
75 |
77 |
76 o 0 d57206cc072a: r0
78 o 0 d57206cc072a: r0
77
79
78 $ cd ..
80 $ cd ..
79 $ tstart main
81 $ tstart main
80
82
81 Full clone:
83 Full clone:
82
84
83 $ hg clone main full
85 $ hg clone main full
84 updating to branch default
86 updating to branch default
85 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
87 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
86 $ cd full
88 $ cd full
87 $ hg incoming $remote
89 $ hg incoming $remote
88 comparing with http://localhost:$HGPORT/
90 comparing with http://localhost:$HGPORT/
89 searching for changes
91 searching for changes
90 no changes found
92 no changes found
91 [1]
93 [1]
92 $ hg outgoing $remote
94 $ hg outgoing $remote
93 comparing with http://localhost:$HGPORT/
95 comparing with http://localhost:$HGPORT/
94 searching for changes
96 searching for changes
95 no changes found
97 no changes found
96 [1]
98 [1]
97 $ hg pull $remote
99 $ hg pull $remote
98 pulling from http://localhost:$HGPORT/
100 pulling from http://localhost:$HGPORT/
99 searching for changes
101 searching for changes
100 no changes found
102 no changes found
101 $ hg push $remote
103 $ hg push $remote
102 pushing to http://localhost:$HGPORT/
104 pushing to http://localhost:$HGPORT/
103 searching for changes
105 searching for changes
104 no changes found
106 no changes found
105 $ cd ..
107 $ cd ..
106
108
107 Local is empty:
109 Local is empty:
108
110
109 $ cd empty1
111 $ cd empty1
110 $ hg incoming $remote
112 $ hg incoming $remote
111 comparing with http://localhost:$HGPORT/
113 comparing with http://localhost:$HGPORT/
112 0 d57206cc072a: r0
114 0 d57206cc072a: r0
113 1 0019a3b924fd: r1
115 1 0019a3b924fd: r1
114 2 a7892891da29: r2 name1
116 2 a7892891da29: r2 name1
115 3 2c8d5d5ec612: r3 name1
117 3 2c8d5d5ec612: r3 name1
116 4 e71dbbc70e03: r4 name1
118 4 e71dbbc70e03: r4 name1
117 5 70314b29987d: r5 name2
119 5 70314b29987d: r5 name2
118 6 6c6f5d5f3c11: r6 name2
120 6 6c6f5d5f3c11: r6 name2
119 7 b6b4d315a2ac: r7 name2
121 7 b6b4d315a2ac: r7 name2
120 8 d8f638ac69e9: r8 name2
122 8 d8f638ac69e9: r8 name2
121 9 025829e08038: r9 both
123 9 025829e08038: r9 both
122 10 8b6bad1512e1: r10 both
124 10 8b6bad1512e1: r10 both
123 11 a19bfa7e7328: r11 both
125 11 a19bfa7e7328: r11 both
124 $ hg outgoing $remote
126 $ hg outgoing $remote
125 comparing with http://localhost:$HGPORT/
127 comparing with http://localhost:$HGPORT/
126 no changes found
128 no changes found
127 [1]
129 [1]
128 $ hg push $remote
130 $ hg push $remote
129 pushing to http://localhost:$HGPORT/
131 pushing to http://localhost:$HGPORT/
130 no changes found
132 no changes found
131 $ hg pull $remote
133 $ hg pull $remote
132 pulling from http://localhost:$HGPORT/
134 pulling from http://localhost:$HGPORT/
133 requesting all changes
135 requesting all changes
134 adding changesets
136 adding changesets
135 adding manifests
137 adding manifests
136 adding file changes
138 adding file changes
137 added 12 changesets with 24 changes to 2 files
139 added 12 changesets with 24 changes to 2 files
138 (run 'hg update' to get a working copy)
140 (run 'hg update' to get a working copy)
139 $ hg incoming $remote
141 $ hg incoming $remote
140 comparing with http://localhost:$HGPORT/
142 comparing with http://localhost:$HGPORT/
141 searching for changes
143 searching for changes
142 no changes found
144 no changes found
143 [1]
145 [1]
144 $ cd ..
146 $ cd ..
145
147
146 Local is subset:
148 Local is subset:
147
149
148 $ hg clone main subset --rev name2 ; cd subset
150 $ hg clone main subset --rev name2 ; cd subset
149 adding changesets
151 adding changesets
150 adding manifests
152 adding manifests
151 adding file changes
153 adding file changes
152 added 6 changesets with 12 changes to 2 files
154 added 6 changesets with 12 changes to 2 files
153 updating to branch name2
155 updating to branch name2
154 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
156 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
155 $ hg incoming $remote
157 $ hg incoming $remote
156 comparing with http://localhost:$HGPORT/
158 comparing with http://localhost:$HGPORT/
157 searching for changes
159 searching for changes
158 6 a7892891da29: r2 name1
160 6 a7892891da29: r2 name1
159 7 2c8d5d5ec612: r3 name1
161 7 2c8d5d5ec612: r3 name1
160 8 e71dbbc70e03: r4 name1
162 8 e71dbbc70e03: r4 name1
161 9 025829e08038: r9 both
163 9 025829e08038: r9 both
162 10 8b6bad1512e1: r10 both
164 10 8b6bad1512e1: r10 both
163 11 a19bfa7e7328: r11 both
165 11 a19bfa7e7328: r11 both
164 $ hg outgoing $remote
166 $ hg outgoing $remote
165 comparing with http://localhost:$HGPORT/
167 comparing with http://localhost:$HGPORT/
166 searching for changes
168 searching for changes
167 no changes found
169 no changes found
168 [1]
170 [1]
169 $ hg push $remote
171 $ hg push $remote
170 pushing to http://localhost:$HGPORT/
172 pushing to http://localhost:$HGPORT/
171 searching for changes
173 searching for changes
172 no changes found
174 no changes found
173 $ hg pull $remote
175 $ hg pull $remote
174 pulling from http://localhost:$HGPORT/
176 pulling from http://localhost:$HGPORT/
175 searching for changes
177 searching for changes
176 adding changesets
178 adding changesets
177 adding manifests
179 adding manifests
178 adding file changes
180 adding file changes
179 added 6 changesets with 12 changes to 2 files
181 added 6 changesets with 12 changes to 2 files
180 (run 'hg update' to get a working copy)
182 (run 'hg update' to get a working copy)
181 $ hg incoming $remote
183 $ hg incoming $remote
182 comparing with http://localhost:$HGPORT/
184 comparing with http://localhost:$HGPORT/
183 searching for changes
185 searching for changes
184 no changes found
186 no changes found
185 [1]
187 [1]
186 $ cd ..
188 $ cd ..
187
189
188 Remote is empty:
190 Remote is empty:
189
191
190 $ tstop ; tstart empty2
192 $ tstop ; tstart empty2
191 $ cd main
193 $ cd main
192 $ hg incoming $remote
194 $ hg incoming $remote
193 comparing with http://localhost:$HGPORT/
195 comparing with http://localhost:$HGPORT/
194 searching for changes
196 searching for changes
195 no changes found
197 no changes found
196 [1]
198 [1]
197 $ hg outgoing $remote
199 $ hg outgoing $remote
198 comparing with http://localhost:$HGPORT/
200 comparing with http://localhost:$HGPORT/
199 searching for changes
201 searching for changes
200 0 d57206cc072a: r0
202 0 d57206cc072a: r0
201 1 0019a3b924fd: r1
203 1 0019a3b924fd: r1
202 2 a7892891da29: r2 name1
204 2 a7892891da29: r2 name1
203 3 2c8d5d5ec612: r3 name1
205 3 2c8d5d5ec612: r3 name1
204 4 e71dbbc70e03: r4 name1
206 4 e71dbbc70e03: r4 name1
205 5 70314b29987d: r5 name2
207 5 70314b29987d: r5 name2
206 6 6c6f5d5f3c11: r6 name2
208 6 6c6f5d5f3c11: r6 name2
207 7 b6b4d315a2ac: r7 name2
209 7 b6b4d315a2ac: r7 name2
208 8 d8f638ac69e9: r8 name2
210 8 d8f638ac69e9: r8 name2
209 9 025829e08038: r9 both
211 9 025829e08038: r9 both
210 10 8b6bad1512e1: r10 both
212 10 8b6bad1512e1: r10 both
211 11 a19bfa7e7328: r11 both
213 11 a19bfa7e7328: r11 both
212 $ hg pull $remote
214 $ hg pull $remote
213 pulling from http://localhost:$HGPORT/
215 pulling from http://localhost:$HGPORT/
214 searching for changes
216 searching for changes
215 no changes found
217 no changes found
216 $ hg push $remote
218 $ hg push $remote
217 pushing to http://localhost:$HGPORT/
219 pushing to http://localhost:$HGPORT/
218 searching for changes
220 searching for changes
219 remote: adding changesets
221 remote: adding changesets
220 remote: adding manifests
222 remote: adding manifests
221 remote: adding file changes
223 remote: adding file changes
222 remote: added 12 changesets with 24 changes to 2 files
224 remote: added 12 changesets with 24 changes to 2 files
223 $ hg outgoing $remote
225 $ hg outgoing $remote
224 comparing with http://localhost:$HGPORT/
226 comparing with http://localhost:$HGPORT/
225 searching for changes
227 searching for changes
226 no changes found
228 no changes found
227 [1]
229 [1]
228 $ cd ..
230 $ cd ..
229
231
230 Local is superset:
232 Local is superset:
231
233
232 $ tstop
234 $ tstop
233 $ hg clone main subset2 --rev name2
235 $ hg clone main subset2 --rev name2
234 adding changesets
236 adding changesets
235 adding manifests
237 adding manifests
236 adding file changes
238 adding file changes
237 added 6 changesets with 12 changes to 2 files
239 added 6 changesets with 12 changes to 2 files
238 updating to branch name2
240 updating to branch name2
239 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
241 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
240 $ tstart subset2
242 $ tstart subset2
241 $ cd main
243 $ cd main
242 $ hg incoming $remote
244 $ hg incoming $remote
243 comparing with http://localhost:$HGPORT/
245 comparing with http://localhost:$HGPORT/
244 searching for changes
246 searching for changes
245 no changes found
247 no changes found
246 [1]
248 [1]
247 $ hg outgoing $remote
249 $ hg outgoing $remote
248 comparing with http://localhost:$HGPORT/
250 comparing with http://localhost:$HGPORT/
249 searching for changes
251 searching for changes
250 2 a7892891da29: r2 name1
252 2 a7892891da29: r2 name1
251 3 2c8d5d5ec612: r3 name1
253 3 2c8d5d5ec612: r3 name1
252 4 e71dbbc70e03: r4 name1
254 4 e71dbbc70e03: r4 name1
253 9 025829e08038: r9 both
255 9 025829e08038: r9 both
254 10 8b6bad1512e1: r10 both
256 10 8b6bad1512e1: r10 both
255 11 a19bfa7e7328: r11 both
257 11 a19bfa7e7328: r11 both
256 $ hg pull $remote
258 $ hg pull $remote
257 pulling from http://localhost:$HGPORT/
259 pulling from http://localhost:$HGPORT/
258 searching for changes
260 searching for changes
259 no changes found
261 no changes found
260 $ hg push $remote
262 $ hg push $remote
261 pushing to http://localhost:$HGPORT/
263 pushing to http://localhost:$HGPORT/
262 searching for changes
264 searching for changes
263 abort: push creates new remote branches: both, name1!
265 abort: push creates new remote branches: both, name1!
264 (use 'hg push --new-branch' to create new remote branches)
266 (use 'hg push --new-branch' to create new remote branches)
265 [255]
267 [255]
266 $ hg push $remote --new-branch
268 $ hg push $remote --new-branch
267 pushing to http://localhost:$HGPORT/
269 pushing to http://localhost:$HGPORT/
268 searching for changes
270 searching for changes
269 remote: adding changesets
271 remote: adding changesets
270 remote: adding manifests
272 remote: adding manifests
271 remote: adding file changes
273 remote: adding file changes
272 remote: added 6 changesets with 12 changes to 2 files
274 remote: added 6 changesets with 12 changes to 2 files
273 $ hg outgoing $remote
275 $ hg outgoing $remote
274 comparing with http://localhost:$HGPORT/
276 comparing with http://localhost:$HGPORT/
275 searching for changes
277 searching for changes
276 no changes found
278 no changes found
277 [1]
279 [1]
278 $ cd ..
280 $ cd ..
279
281
280 Partial pull:
282 Partial pull:
281
283
282 $ tstop ; tstart main
284 $ tstop ; tstart main
283 $ hg clone $remote partial --rev name2
285 $ hg clone $remote partial --rev name2
284 adding changesets
286 adding changesets
285 adding manifests
287 adding manifests
286 adding file changes
288 adding file changes
287 added 6 changesets with 12 changes to 2 files
289 added 6 changesets with 12 changes to 2 files
288 updating to branch name2
290 updating to branch name2
289 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
291 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
290 $ cd partial
292 $ cd partial
291 $ hg incoming $remote
293 $ hg incoming $remote
292 comparing with http://localhost:$HGPORT/
294 comparing with http://localhost:$HGPORT/
293 searching for changes
295 searching for changes
294 6 a7892891da29: r2 name1
296 6 a7892891da29: r2 name1
295 7 2c8d5d5ec612: r3 name1
297 7 2c8d5d5ec612: r3 name1
296 8 e71dbbc70e03: r4 name1
298 8 e71dbbc70e03: r4 name1
297 9 025829e08038: r9 both
299 9 025829e08038: r9 both
298 10 8b6bad1512e1: r10 both
300 10 8b6bad1512e1: r10 both
299 11 a19bfa7e7328: r11 both
301 11 a19bfa7e7328: r11 both
300 $ hg incoming $remote --rev name1
302 $ hg incoming $remote --rev name1
301 comparing with http://localhost:$HGPORT/
303 comparing with http://localhost:$HGPORT/
302 searching for changes
304 searching for changes
303 6 a7892891da29: r2 name1
305 6 a7892891da29: r2 name1
304 7 2c8d5d5ec612: r3 name1
306 7 2c8d5d5ec612: r3 name1
305 8 e71dbbc70e03: r4 name1
307 8 e71dbbc70e03: r4 name1
306 $ hg pull $remote --rev name1
308 $ hg pull $remote --rev name1
307 pulling from http://localhost:$HGPORT/
309 pulling from http://localhost:$HGPORT/
308 searching for changes
310 searching for changes
309 adding changesets
311 adding changesets
310 adding manifests
312 adding manifests
311 adding file changes
313 adding file changes
312 added 3 changesets with 6 changes to 2 files (+1 heads)
314 added 3 changesets with 6 changes to 2 files (+1 heads)
313 (run 'hg heads' to see heads)
315 (run 'hg heads' to see heads)
314 $ hg incoming $remote
316 $ hg incoming $remote
315 comparing with http://localhost:$HGPORT/
317 comparing with http://localhost:$HGPORT/
316 searching for changes
318 searching for changes
317 9 025829e08038: r9 both
319 9 025829e08038: r9 both
318 10 8b6bad1512e1: r10 both
320 10 8b6bad1512e1: r10 both
319 11 a19bfa7e7328: r11 both
321 11 a19bfa7e7328: r11 both
320 $ cd ..
322 $ cd ..
321
323
322 Both have new stuff in new named branches:
324 Both have new stuff in new named branches:
323
325
324 $ tstop
326 $ tstop
325 $ hg clone main repo1a --rev name1 -q
327 $ hg clone main repo1a --rev name1 -q
326 $ hg clone repo1a repo1b -q
328 $ hg clone repo1a repo1b -q
327 $ hg clone main repo2a --rev name2 -q
329 $ hg clone main repo2a --rev name2 -q
328 $ hg clone repo2a repo2b -q
330 $ hg clone repo2a repo2b -q
329 $ tstart repo1a
331 $ tstart repo1a
330
332
331 $ cd repo2a
333 $ cd repo2a
332 $ hg incoming $remote
334 $ hg incoming $remote
333 comparing with http://localhost:$HGPORT/
335 comparing with http://localhost:$HGPORT/
334 searching for changes
336 searching for changes
335 6 a7892891da29: r2 name1
337 6 a7892891da29: r2 name1
336 7 2c8d5d5ec612: r3 name1
338 7 2c8d5d5ec612: r3 name1
337 8 e71dbbc70e03: r4 name1
339 8 e71dbbc70e03: r4 name1
338 $ hg outgoing $remote
340 $ hg outgoing $remote
339 comparing with http://localhost:$HGPORT/
341 comparing with http://localhost:$HGPORT/
340 searching for changes
342 searching for changes
341 2 70314b29987d: r5 name2
343 2 70314b29987d: r5 name2
342 3 6c6f5d5f3c11: r6 name2
344 3 6c6f5d5f3c11: r6 name2
343 4 b6b4d315a2ac: r7 name2
345 4 b6b4d315a2ac: r7 name2
344 5 d8f638ac69e9: r8 name2
346 5 d8f638ac69e9: r8 name2
345 $ hg push $remote --new-branch
347 $ hg push $remote --new-branch
346 pushing to http://localhost:$HGPORT/
348 pushing to http://localhost:$HGPORT/
347 searching for changes
349 searching for changes
348 remote: adding changesets
350 remote: adding changesets
349 remote: adding manifests
351 remote: adding manifests
350 remote: adding file changes
352 remote: adding file changes
351 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
353 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
352 $ hg pull $remote
354 $ hg pull $remote
353 pulling from http://localhost:$HGPORT/
355 pulling from http://localhost:$HGPORT/
354 searching for changes
356 searching for changes
355 adding changesets
357 adding changesets
356 adding manifests
358 adding manifests
357 adding file changes
359 adding file changes
358 added 3 changesets with 6 changes to 2 files (+1 heads)
360 added 3 changesets with 6 changes to 2 files (+1 heads)
359 (run 'hg heads' to see heads)
361 (run 'hg heads' to see heads)
360 $ hg incoming $remote
362 $ hg incoming $remote
361 comparing with http://localhost:$HGPORT/
363 comparing with http://localhost:$HGPORT/
362 searching for changes
364 searching for changes
363 no changes found
365 no changes found
364 [1]
366 [1]
365 $ hg outgoing $remote
367 $ hg outgoing $remote
366 comparing with http://localhost:$HGPORT/
368 comparing with http://localhost:$HGPORT/
367 searching for changes
369 searching for changes
368 no changes found
370 no changes found
369 [1]
371 [1]
370 $ cd ..
372 $ cd ..
371
373
372 $ tstop ; tstart repo1b
374 $ tstop ; tstart repo1b
373 $ cd repo2b
375 $ cd repo2b
374 $ hg incoming $remote
376 $ hg incoming $remote
375 comparing with http://localhost:$HGPORT/
377 comparing with http://localhost:$HGPORT/
376 searching for changes
378 searching for changes
377 6 a7892891da29: r2 name1
379 6 a7892891da29: r2 name1
378 7 2c8d5d5ec612: r3 name1
380 7 2c8d5d5ec612: r3 name1
379 8 e71dbbc70e03: r4 name1
381 8 e71dbbc70e03: r4 name1
380 $ hg outgoing $remote
382 $ hg outgoing $remote
381 comparing with http://localhost:$HGPORT/
383 comparing with http://localhost:$HGPORT/
382 searching for changes
384 searching for changes
383 2 70314b29987d: r5 name2
385 2 70314b29987d: r5 name2
384 3 6c6f5d5f3c11: r6 name2
386 3 6c6f5d5f3c11: r6 name2
385 4 b6b4d315a2ac: r7 name2
387 4 b6b4d315a2ac: r7 name2
386 5 d8f638ac69e9: r8 name2
388 5 d8f638ac69e9: r8 name2
387 $ hg pull $remote
389 $ hg pull $remote
388 pulling from http://localhost:$HGPORT/
390 pulling from http://localhost:$HGPORT/
389 searching for changes
391 searching for changes
390 adding changesets
392 adding changesets
391 adding manifests
393 adding manifests
392 adding file changes
394 adding file changes
393 added 3 changesets with 6 changes to 2 files (+1 heads)
395 added 3 changesets with 6 changes to 2 files (+1 heads)
394 (run 'hg heads' to see heads)
396 (run 'hg heads' to see heads)
395 $ hg push $remote --new-branch
397 $ hg push $remote --new-branch
396 pushing to http://localhost:$HGPORT/
398 pushing to http://localhost:$HGPORT/
397 searching for changes
399 searching for changes
398 remote: adding changesets
400 remote: adding changesets
399 remote: adding manifests
401 remote: adding manifests
400 remote: adding file changes
402 remote: adding file changes
401 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
403 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
402 $ hg incoming $remote
404 $ hg incoming $remote
403 comparing with http://localhost:$HGPORT/
405 comparing with http://localhost:$HGPORT/
404 searching for changes
406 searching for changes
405 no changes found
407 no changes found
406 [1]
408 [1]
407 $ hg outgoing $remote
409 $ hg outgoing $remote
408 comparing with http://localhost:$HGPORT/
410 comparing with http://localhost:$HGPORT/
409 searching for changes
411 searching for changes
410 no changes found
412 no changes found
411 [1]
413 [1]
412 $ cd ..
414 $ cd ..
413
415
414 Both have new stuff in existing named branches:
416 Both have new stuff in existing named branches:
415
417
416 $ tstop
418 $ tstop
417 $ rm -r repo1a repo1b repo2a repo2b
419 $ rm -r repo1a repo1b repo2a repo2b
418 $ hg clone main repo1a --rev 3 --rev 8 -q
420 $ hg clone main repo1a --rev 3 --rev 8 -q
419 $ hg clone repo1a repo1b -q
421 $ hg clone repo1a repo1b -q
420 $ hg clone main repo2a --rev 4 --rev 7 -q
422 $ hg clone main repo2a --rev 4 --rev 7 -q
421 $ hg clone repo2a repo2b -q
423 $ hg clone repo2a repo2b -q
422 $ tstart repo1a
424 $ tstart repo1a
423
425
424 $ cd repo2a
426 $ cd repo2a
425 $ hg incoming $remote
427 $ hg incoming $remote
426 comparing with http://localhost:$HGPORT/
428 comparing with http://localhost:$HGPORT/
427 searching for changes
429 searching for changes
428 8 d8f638ac69e9: r8 name2
430 8 d8f638ac69e9: r8 name2
429 $ hg outgoing $remote
431 $ hg outgoing $remote
430 comparing with http://localhost:$HGPORT/
432 comparing with http://localhost:$HGPORT/
431 searching for changes
433 searching for changes
432 4 e71dbbc70e03: r4 name1
434 4 e71dbbc70e03: r4 name1
433 $ hg push $remote --new-branch
435 $ hg push $remote --new-branch
434 pushing to http://localhost:$HGPORT/
436 pushing to http://localhost:$HGPORT/
435 searching for changes
437 searching for changes
436 remote: adding changesets
438 remote: adding changesets
437 remote: adding manifests
439 remote: adding manifests
438 remote: adding file changes
440 remote: adding file changes
439 remote: added 1 changesets with 2 changes to 2 files
441 remote: added 1 changesets with 2 changes to 2 files
440 $ hg pull $remote
442 $ hg pull $remote
441 pulling from http://localhost:$HGPORT/
443 pulling from http://localhost:$HGPORT/
442 searching for changes
444 searching for changes
443 adding changesets
445 adding changesets
444 adding manifests
446 adding manifests
445 adding file changes
447 adding file changes
446 added 1 changesets with 2 changes to 2 files
448 added 1 changesets with 2 changes to 2 files
447 (run 'hg update' to get a working copy)
449 (run 'hg update' to get a working copy)
448 $ hg incoming $remote
450 $ hg incoming $remote
449 comparing with http://localhost:$HGPORT/
451 comparing with http://localhost:$HGPORT/
450 searching for changes
452 searching for changes
451 no changes found
453 no changes found
452 [1]
454 [1]
453 $ hg outgoing $remote
455 $ hg outgoing $remote
454 comparing with http://localhost:$HGPORT/
456 comparing with http://localhost:$HGPORT/
455 searching for changes
457 searching for changes
456 no changes found
458 no changes found
457 [1]
459 [1]
458 $ cd ..
460 $ cd ..
459
461
460 $ tstop ; tstart repo1b
462 $ tstop ; tstart repo1b
461 $ cd repo2b
463 $ cd repo2b
462 $ hg incoming $remote
464 $ hg incoming $remote
463 comparing with http://localhost:$HGPORT/
465 comparing with http://localhost:$HGPORT/
464 searching for changes
466 searching for changes
465 8 d8f638ac69e9: r8 name2
467 8 d8f638ac69e9: r8 name2
466 $ hg outgoing $remote
468 $ hg outgoing $remote
467 comparing with http://localhost:$HGPORT/
469 comparing with http://localhost:$HGPORT/
468 searching for changes
470 searching for changes
469 4 e71dbbc70e03: r4 name1
471 4 e71dbbc70e03: r4 name1
470 $ hg pull $remote
472 $ hg pull $remote
471 pulling from http://localhost:$HGPORT/
473 pulling from http://localhost:$HGPORT/
472 searching for changes
474 searching for changes
473 adding changesets
475 adding changesets
474 adding manifests
476 adding manifests
475 adding file changes
477 adding file changes
476 added 1 changesets with 2 changes to 2 files
478 added 1 changesets with 2 changes to 2 files
477 (run 'hg update' to get a working copy)
479 (run 'hg update' to get a working copy)
478 $ hg push $remote --new-branch
480 $ hg push $remote --new-branch
479 pushing to http://localhost:$HGPORT/
481 pushing to http://localhost:$HGPORT/
480 searching for changes
482 searching for changes
481 remote: adding changesets
483 remote: adding changesets
482 remote: adding manifests
484 remote: adding manifests
483 remote: adding file changes
485 remote: adding file changes
484 remote: added 1 changesets with 2 changes to 2 files
486 remote: added 1 changesets with 2 changes to 2 files
485 $ hg incoming $remote
487 $ hg incoming $remote
486 comparing with http://localhost:$HGPORT/
488 comparing with http://localhost:$HGPORT/
487 searching for changes
489 searching for changes
488 no changes found
490 no changes found
489 [1]
491 [1]
490 $ hg outgoing $remote
492 $ hg outgoing $remote
491 comparing with http://localhost:$HGPORT/
493 comparing with http://localhost:$HGPORT/
492 searching for changes
494 searching for changes
493 no changes found
495 no changes found
494 [1]
496 [1]
495 $ cd ..
497 $ cd ..
496
498
497 $ tstop
499 $ tstop
498
500
@@ -1,31 +1,32 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 Test wire protocol unbundle with hashed heads (capability: unbundlehash)
3 Test wire protocol unbundle with hashed heads (capability: unbundlehash)
3
4
4 Create a remote repository.
5 Create a remote repository.
5
6
6 $ hg init remote
7 $ hg init remote
7 $ hg serve -R remote --config web.push_ssl=False --config web.allow_push=* -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
8 $ hg serve -R remote --config web.push_ssl=False --config web.allow_push=* -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
8 $ cat hg1.pid >> $DAEMON_PIDS
9 $ cat hg1.pid >> $DAEMON_PIDS
9
10
10 Clone the repository and push a change.
11 Clone the repository and push a change.
11
12
12 $ hg clone http://localhost:$HGPORT/ local
13 $ hg clone http://localhost:$HGPORT/ local
13 no changes found
14 no changes found
14 updating to branch default
15 updating to branch default
15 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
16 $ touch local/README
17 $ touch local/README
17 $ hg ci -R local -A -m hoge
18 $ hg ci -R local -A -m hoge
18 adding README
19 adding README
19 $ hg push -R local
20 $ hg push -R local
20 pushing to http://localhost:$HGPORT/
21 pushing to http://localhost:$HGPORT/
21 searching for changes
22 searching for changes
22 remote: adding changesets
23 remote: adding changesets
23 remote: adding manifests
24 remote: adding manifests
24 remote: adding file changes
25 remote: adding file changes
25 remote: added 1 changesets with 1 changes to 1 files
26 remote: added 1 changesets with 1 changes to 1 files
26
27
27 Ensure hashed heads format is used.
28 Ensure hashed heads format is used.
28 The hash here is always the same since the remote repository only has the null head.
29 The hash here is always the same since the remote repository only has the null head.
29
30
30 $ cat access.log | grep unbundle
31 $ cat access.log | grep unbundle
31 * - - [*] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+6768033e216468247bd031a0a2d9876d79818f8f (glob)
32 * - - [*] "POST /?cmd=unbundle HTTP/1.1" 200 - x-hgarg-1:heads=686173686564+6768033e216468247bd031a0a2d9876d79818f8f (glob)
@@ -1,113 +1,114 b''
1 $ "$TESTDIR/hghave" serve || exit 80
1
2
2 Test wire protocol argument passing
3 Test wire protocol argument passing
3
4
4 Setup repo:
5 Setup repo:
5
6
6 $ hg init repo
7 $ hg init repo
7
8
8 Local:
9 Local:
9
10
10 $ hg debugwireargs repo eins zwei --three drei --four vier
11 $ hg debugwireargs repo eins zwei --three drei --four vier
11 eins zwei drei vier None
12 eins zwei drei vier None
12 $ hg debugwireargs repo eins zwei --four vier
13 $ hg debugwireargs repo eins zwei --four vier
13 eins zwei None vier None
14 eins zwei None vier None
14 $ hg debugwireargs repo eins zwei
15 $ hg debugwireargs repo eins zwei
15 eins zwei None None None
16 eins zwei None None None
16 $ hg debugwireargs repo eins zwei --five fuenf
17 $ hg debugwireargs repo eins zwei --five fuenf
17 eins zwei None None fuenf
18 eins zwei None None fuenf
18
19
19 HTTP:
20 HTTP:
20
21
21 $ hg serve -R repo -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
22 $ hg serve -R repo -p $HGPORT -d --pid-file=hg1.pid -E error.log -A access.log
22 $ cat hg1.pid >> $DAEMON_PIDS
23 $ cat hg1.pid >> $DAEMON_PIDS
23
24
24 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois quatre
25 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois quatre
25 un deux trois quatre None
26 un deux trois quatre None
26 $ hg debugwireargs http://localhost:$HGPORT/ \ un deux trois\ qu\ \ atre
27 $ hg debugwireargs http://localhost:$HGPORT/ \ un deux trois\ qu\ \ atre
27 un deux trois qu atre None
28 un deux trois qu atre None
28 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --four vier
29 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --four vier
29 eins zwei None vier None
30 eins zwei None vier None
30 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei
31 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei
31 eins zwei None None None
32 eins zwei None None None
32 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --five fuenf
33 $ hg debugwireargs http://localhost:$HGPORT/ eins zwei --five fuenf
33 eins zwei None None None
34 eins zwei None None None
34 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
35 $ hg debugwireargs http://localhost:$HGPORT/ un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
35 un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None
36 un deux trois onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx None
36 $ cat error.log
37 $ cat error.log
37 $ cat access.log
38 $ cat access.log
38 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
39 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
39 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob)
40 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob)
40 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob)
41 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=quatre&one=un&three=trois&two=deux (glob)
41 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
42 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
42 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
43 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
43 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
44 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=qu++atre&one=+un&three=trois+&two=deux (glob)
44 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
45 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
45 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob)
46 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob)
46 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob)
47 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=vier&one=eins&two=zwei (glob)
47 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
48 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
48 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
49 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
49 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
50 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
50 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
51 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
51 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
52 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
52 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
53 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:one=eins&two=zwei (glob)
53 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
54 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
54 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux (glob)
55 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux (glob)
55 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux (glob)
56 * - - [*] "GET /?cmd=debugwireargs HTTP/1.1" 200 - x-hgarg-1:four=onethousandcharactersxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&one x-hgarg-2:=un&three=trois&two=deux (glob)
56
57
57 HTTP without the httpheader capability:
58 HTTP without the httpheader capability:
58
59
59 $ HGRCPATH="`pwd`/repo/.hgrc"
60 $ HGRCPATH="`pwd`/repo/.hgrc"
60 $ export HGRCPATH
61 $ export HGRCPATH
61 $ CAP=httpheader
62 $ CAP=httpheader
62 $ . "$TESTDIR/notcapable"
63 $ . "$TESTDIR/notcapable"
63
64
64 $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log
65 $ hg serve -R repo -p $HGPORT2 -d --pid-file=hg2.pid -E error2.log -A access2.log
65 $ cat hg2.pid >> $DAEMON_PIDS
66 $ cat hg2.pid >> $DAEMON_PIDS
66
67
67 $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre
68 $ hg debugwireargs http://localhost:$HGPORT2/ un deux trois quatre
68 un deux trois quatre None
69 un deux trois quatre None
69 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier
70 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --four vier
70 eins zwei None vier None
71 eins zwei None vier None
71 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei
72 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei
72 eins zwei None None None
73 eins zwei None None None
73 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf
74 $ hg debugwireargs http://localhost:$HGPORT2/ eins zwei --five fuenf
74 eins zwei None None None
75 eins zwei None None None
75 $ cat error2.log
76 $ cat error2.log
76 $ cat access2.log
77 $ cat access2.log
77 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
78 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
78 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
79 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
79 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
80 * - - [*] "GET /?cmd=debugwireargs&four=quatre&one=un&three=trois&two=deux HTTP/1.1" 200 - (glob)
80 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
81 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
81 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
82 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
82 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
83 * - - [*] "GET /?cmd=debugwireargs&four=vier&one=eins&two=zwei HTTP/1.1" 200 - (glob)
83 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
84 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
84 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
85 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
85 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
86 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
86 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
87 * - - [*] "GET /?cmd=capabilities HTTP/1.1" 200 - (glob)
87 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
88 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
88 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
89 * - - [*] "GET /?cmd=debugwireargs&one=eins&two=zwei HTTP/1.1" 200 - (glob)
89
90
90 SSH (try to exercise the ssh functionality with a dummy script):
91 SSH (try to exercise the ssh functionality with a dummy script):
91
92
92 $ cat <<EOF > dummyssh
93 $ cat <<EOF > dummyssh
93 > import sys
94 > import sys
94 > import os
95 > import os
95 > os.chdir(os.path.dirname(sys.argv[0]))
96 > os.chdir(os.path.dirname(sys.argv[0]))
96 > if sys.argv[1] != "user@dummy":
97 > if sys.argv[1] != "user@dummy":
97 > sys.exit(-1)
98 > sys.exit(-1)
98 > if not os.path.exists("dummyssh"):
99 > if not os.path.exists("dummyssh"):
99 > sys.exit(-1)
100 > sys.exit(-1)
100 > os.environ["SSH_CLIENT"] = "127.0.0.1 1 2"
101 > os.environ["SSH_CLIENT"] = "127.0.0.1 1 2"
101 > r = os.system(sys.argv[2])
102 > r = os.system(sys.argv[2])
102 > sys.exit(bool(r))
103 > sys.exit(bool(r))
103 > EOF
104 > EOF
104
105
105 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo uno due tre quattro
106 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo uno due tre quattro
106 uno due tre quattro None
107 uno due tre quattro None
107 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --four vier
108 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --four vier
108 eins zwei None vier None
109 eins zwei None vier None
109 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei
110 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei
110 eins zwei None None None
111 eins zwei None None None
111 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --five fuenf
112 $ hg debugwireargs --ssh "python ./dummyssh" ssh://user@dummy/repo eins zwei --five fuenf
112 eins zwei None None None
113 eins zwei None None None
113
114
General Comments 0
You need to be logged in to leave comments. Login now