Mercurial > hg
changeset 13577:18937290986c
merge with stable
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Fri, 11 Mar 2011 12:35:41 +0100 |
parents | edd06611a7c6 (diff) 8e94a1b4e9a4 (current diff) |
children | e720b3324e35 |
files | |
diffstat | 43 files changed, 225 insertions(+), 180 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/check-code.py Thu Mar 10 11:30:38 2011 -0600 +++ b/contrib/check-code.py Fri Mar 11 12:35:41 2011 +0100 @@ -66,6 +66,7 @@ (r'^source\b', "don't use 'source', use '.'"), (r'touch -d', "don't use 'touch -d', use 'touch -t' instead"), (r'ls\s+[^|-]+\s+-', "options to 'ls' must come before filenames"), + (r'[^>]>\s*\$HGRCPATH', "don't overwrite $HGRCPATH, append to it"), ] testfilters = [
--- a/contrib/zsh_completion Thu Mar 10 11:30:38 2011 -0600 +++ b/contrib/zsh_completion Fri Mar 11 12:35:41 2011 +0100 @@ -360,8 +360,8 @@ '(--help -h)'{-h,--help}'[display help and exit]' '--debug[debug mode]' '--debugger[start debugger]' - '--encoding[set the charset encoding (default: UTF8)]' - '--encodingmode[set the charset encoding mode (default: strict)]' + '--encoding[set the charset encoding]' + '--encodingmode[set the charset encoding mode]' '--lsprof[print improved command execution profile]' '--traceback[print traceback on exception]' '--time[time how long the command takes]'
--- a/hgext/convert/subversion.py Thu Mar 10 11:30:38 2011 -0600 +++ b/hgext/convert/subversion.py Fri Mar 11 12:35:41 2011 +0100 @@ -259,6 +259,7 @@ except ValueError: raise util.Abort(_('svn: revision %s is not an integer') % rev) + self.trunkname = self.ui.config('convert', 'svn.trunk', 'trunk').strip('/') self.startrev = self.ui.config('convert', 'svn.startrev', default=0) try: self.startrev = int(self.startrev) @@ -761,9 +762,8 @@ author = author and self.recode(author) or '' try: branch = self.module.split("/")[-1] - trunkname = self.ui.config('convert', 'svn.trunk', 'trunk') - if branch == trunkname.strip('/'): - branch = '' + if branch == self.trunkname: + branch = None except IndexError: branch = None @@ -942,6 +942,7 @@ class svn_sink(converter_sink, commandline): commit_re = re.compile(r'Committed revision (\d+).', re.M) + uuid_re = re.compile(r'Repository UUID:\s*(\S+)', re.M) def prerun(self): if self.wc: @@ -962,8 +963,6 @@ def __init__(self, ui, path): - if svn is None: - raise MissingTool(_('Could not load Subversion python bindings')) converter_sink.__init__(self, ui, path) commandline.__init__(self, ui, 'svn') self.delete = [] @@ -1010,8 +1009,8 @@ fp.close() util.set_flags(hook, False, True) - xport = transport.SvnRaTransport(url=geturl(path)) - self.uuid = svn.ra.get_uuid(xport.ra) + output = self.run0('info') + self.uuid = self.uuid_re.search(output).group(1).strip() def wjoin(self, *names): return os.path.join(self.wc, *names)
--- a/hgext/mq.py Thu Mar 10 11:30:38 2011 -0600 +++ b/hgext/mq.py Fri Mar 11 12:35:41 2011 +0100 @@ -1898,7 +1898,7 @@ With -g/--git, patches imported with --rev will use the git diff format. See the diffs help topic for information on why this is important for preserving rename/copy information and permission - changes. + changes. Use :hg:`qfinish` to remove changesets from mq control. To import a patch from standard input, pass - as the patch file. When importing from standard input, a patch name must be specified
--- a/mercurial/ancestor.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/ancestor.py Fri Mar 11 12:35:41 2011 +0100 @@ -9,9 +9,10 @@ def ancestor(a, b, pfunc): """ - return a minimal-distance ancestor of nodes a and b, or None if there is no - such ancestor. Note that there can be several ancestors with the same - (minimal) distance, and the one returned is arbitrary. + Returns the common ancestor of a and b that is furthest from a + root (as measured by longest path) or None if no ancestor is + found. If there are multiple common ancestors at the same + distance, the first one found is returned. pfunc must return a list of parent vertices for a given vertex """ @@ -22,6 +23,7 @@ a, b = sorted([a, b]) # find depth from root of all ancestors + # depth is stored as a negative for heapq parentcache = {} visit = [a, b] depth = {} @@ -39,6 +41,7 @@ if p not in depth: visit.append(p) if visit[-1] == vertex: + # -(maximum distance of parents + 1) depth[vertex] = min([depth[p] for p in pl]) - 1 visit.pop()
--- a/mercurial/commands.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/commands.py Fri Mar 11 12:35:41 2011 +0100 @@ -1175,6 +1175,7 @@ if len(items) > 1 or items and sections: raise util.Abort(_('only one config item permitted')) for section, name, value in ui.walkconfig(untrusted=untrusted): + value = str(value).replace('\n', '\\n') sectname = section + '.' + name if values: for v in values: @@ -4053,7 +4054,7 @@ if rev and node: raise util.Abort(_("please specify just one revision")) - if not rev: + if rev is None or rev == '': rev = node # if we defined a bookmark, we have to remember the original bookmark name
--- a/mercurial/hgweb/common.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/hgweb/common.py Fri Mar 11 12:35:41 2011 +0100 @@ -78,6 +78,23 @@ self.message = message self.headers = headers +class continuereader(object): + def __init__(self, f, write): + self.f = f + self._write = write + self.continued = False + + def read(self, amt=-1): + if not self.continued: + self.continued = True + self._write('HTTP/1.1 100 Continue\r\n\r\n') + return self.f.read(amt) + + def __getattr__(self, attr): + if attr in ('close', 'readline', 'readlines', '__iter__'): + return getattr(self.f, attr) + raise AttributeError() + def _statusmessage(code): from BaseHTTPServer import BaseHTTPRequestHandler responses = BaseHTTPRequestHandler.responses
--- a/mercurial/hgweb/hgweb_mod.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/hgweb/hgweb_mod.py Fri Mar 11 12:35:41 2011 +0100 @@ -121,7 +121,11 @@ self.check_perm(req, perms[cmd]) return protocol.call(self.repo, req, cmd) except ErrorResponse, inst: - if cmd == 'unbundle': + # A client that sends unbundle without 100-continue will + # break if we respond early. + if (cmd == 'unbundle' and + req.env.get('HTTP_EXPECT', + '').lower() != '100-continue'): req.drain() req.respond(inst, protocol.HGTYPE) return '0\n%s\n' % inst.message
--- a/mercurial/hgweb/hgwebdir_mod.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/hgweb/hgwebdir_mod.py Fri Mar 11 12:35:41 2011 +0100 @@ -40,9 +40,10 @@ def urlrepos(prefix, roothead, paths): """yield url paths and filesystem paths from a list of repo paths - >>> list(urlrepos('hg', '/opt', ['/opt/r', '/opt/r/r', '/opt'])) + >>> conv = lambda seq: [(v, util.pconvert(p)) for v,p in seq] + >>> conv(urlrepos('hg', '/opt', ['/opt/r', '/opt/r/r', '/opt'])) [('hg/r', '/opt/r'), ('hg/r/r', '/opt/r/r'), ('hg', '/opt')] - >>> list(urlrepos('', '/opt', ['/opt/r', '/opt/r/r', '/opt'])) + >>> conv(urlrepos('', '/opt', ['/opt/r', '/opt/r/r', '/opt'])) [('r', '/opt/r'), ('r/r', '/opt/r/r'), ('', '/opt')] """ for path in paths:
--- a/mercurial/hgweb/server.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/hgweb/server.py Fri Mar 11 12:35:41 2011 +0100 @@ -8,6 +8,7 @@ import os, sys, errno, urllib, BaseHTTPServer, socket, SocketServer, traceback from mercurial import util, error +from mercurial.hgweb import common from mercurial.i18n import _ def _splitURI(uri): @@ -111,6 +112,9 @@ env['SERVER_PROTOCOL'] = self.request_version env['wsgi.version'] = (1, 0) env['wsgi.url_scheme'] = self.url_scheme + if env.get('HTTP_EXPECT', '').lower() == '100-continue': + self.rfile = common.continuereader(self.rfile, self.wfile.write) + env['wsgi.input'] = self.rfile env['wsgi.errors'] = _error_logger(self) env['wsgi.multithread'] = isinstance(self.server,
--- a/mercurial/hgweb/wsgicgi.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/hgweb/wsgicgi.py Fri Mar 11 12:35:41 2011 +0100 @@ -10,6 +10,7 @@ import os, sys from mercurial import util +from mercurial.hgweb import common def launch(application): util.set_binary(sys.stdin) @@ -23,7 +24,11 @@ if environ['PATH_INFO'].startswith(scriptname): environ['PATH_INFO'] = environ['PATH_INFO'][len(scriptname):] - environ['wsgi.input'] = sys.stdin + stdin = sys.stdin + if environ.get('HTTP_EXPECT', '').lower() == '100-continue': + stdin = common.continuereader(stdin, sys.stdout.write) + + environ['wsgi.input'] = stdin environ['wsgi.errors'] = sys.stderr environ['wsgi.version'] = (1, 0) environ['wsgi.multithread'] = False
--- a/mercurial/httprepo.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/httprepo.py Fri Mar 11 12:35:41 2011 +0100 @@ -73,8 +73,7 @@ data = args.pop('data', None) headers = args.pop('headers', {}) self.ui.debug("sending %s command\n" % cmd) - q = {"cmd": cmd} - q.update(args) + q = [('cmd', cmd)] + sorted(args.items()) qs = '?%s' % urllib.urlencode(q) cu = "%s%s" % (self._url, qs) req = urllib2.Request(cu, data, headers)
--- a/mercurial/merge.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/merge.py Fri Mar 11 12:35:41 2011 +0100 @@ -493,7 +493,6 @@ p1, p2 = pl[0], repo[node] pa = p1.ancestor(p2) fp1, fp2, xp1, xp2 = p1.node(), p2.node(), str(p1), str(p2) - fastforward = False ### check phase if not overwrite and len(pl) > 1: @@ -503,9 +502,7 @@ raise util.Abort(_("merging with a working directory ancestor" " has no effect")) elif pa == p1: - if p1.branch() != p2.branch(): - fastforward = True - else: + if p1.branch() == p2.branch(): raise util.Abort(_("nothing to merge (use 'hg update'" " or check 'hg heads')")) if not force and (wc.files() or wc.deleted()): @@ -550,7 +547,7 @@ if not partial: repo.dirstate.setparents(fp1, fp2) recordupdates(repo, action, branchmerge) - if not branchmerge and not fastforward: + if not branchmerge: repo.dirstate.setbranch(p2.branch()) finally: wlock.release()
--- a/mercurial/statichttprepo.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/statichttprepo.py Fri Mar 11 12:35:41 2011 +0100 @@ -71,7 +71,7 @@ """return a function that opens files over http""" p = base def o(path, mode="r", atomictemp=None): - if 'a' in mode or 'w' in mode: + if mode not in ('r', 'rb'): raise IOError('Permission denied') f = "/".join((p, urllib.quote(path))) return httprangereader(f, urlopener)
--- a/mercurial/subrepo.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/subrepo.py Fri Mar 11 12:35:41 2011 +0100 @@ -714,6 +714,12 @@ current = None return current + def _gitremote(self, remote): + out = self._gitcommand(['remote', 'show', '-n', remote]) + line = out.split('\n')[1] + i = line.index('URL: ') + len('URL: ') + return line[i:] + def _githavelocally(self, revision): out, code = self._gitdir(['cat-file', '-e', revision]) return code == 0 @@ -762,11 +768,14 @@ def _fetch(self, source, revision): if self._gitmissing(): - self._ui.status(_('cloning subrepo %s\n') % self._relpath) - self._gitnodir(['clone', self._abssource(source), self._abspath]) + source = self._abssource(source) + self._ui.status(_('cloning subrepo %s from %s\n') % + (self._relpath, source)) + self._gitnodir(['clone', source, self._abspath]) if self._githavelocally(revision): return - self._ui.status(_('pulling subrepo %s\n') % self._relpath) + self._ui.status(_('pulling subrepo %s from %s\n') % + (self._relpath, self._gitremote('origin'))) # try only origin: the originally cloned repo self._gitcommand(['fetch']) if not self._githavelocally(revision):
--- a/mercurial/ui.py Thu Mar 10 11:30:38 2011 -0600 +++ b/mercurial/ui.py Fri Mar 11 12:35:41 2011 +0100 @@ -273,7 +273,7 @@ cfg = self._data(untrusted) for section in cfg.sections(): for name, value in self.configitems(section, untrusted): - yield section, name, str(value).replace('\n', '\\n') + yield section, name, value def plain(self): '''is plain mode active?
--- a/tests/run-tests.py Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/run-tests.py Fri Mar 11 12:35:41 2011 +0100 @@ -227,8 +227,8 @@ continue for line in f.readlines(): - line = line.strip() - if line and not line.startswith('#'): + line = line.split('#', 1)[0].strip() + if line: blacklist[line] = filename f.close()
--- a/tests/test-basic.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-basic.t Fri Mar 11 12:35:41 2011 +0100 @@ -20,6 +20,22 @@ summary: test +Verify that updating to revision 0 via commands.update() works properly + + $ cat <<EOF > update_to_rev0.py + > from mercurial import ui, hg, commands + > myui = ui.ui() + > repo = hg.repository(myui, path='.') + > commands.update(myui, repo, rev=0) + > EOF + $ hg up null + 0 files updated, 0 files merged, 1 files removed, 0 files unresolved + $ python ./update_to_rev0.py + 1 files updated, 0 files merged, 0 files removed, 0 files unresolved + $ hg identify -n + 0 + + Poke around at hashes: $ hg manifest --debug
--- a/tests/test-convert-hg-startrev.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-convert-hg-startrev.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,5 +1,5 @@ - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [extensions] > graphlog = > convert =
--- a/tests/test-convert-svn-branches.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-convert-svn-branches.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,7 +1,7 @@ $ "$TESTDIR/hghave" svn svn-bindings || exit 80 - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [extensions] > convert = > graphlog =
--- a/tests/test-convert-svn-encoding.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-convert-svn-encoding.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,7 +1,7 @@ $ "$TESTDIR/hghave" svn svn-bindings || exit 80 - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [extensions] > convert = > graphlog =
--- a/tests/test-convert-svn-move.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-convert-svn-move.t Fri Mar 11 12:35:41 2011 +0100 @@ -5,7 +5,7 @@ > { > tr '\\' / > } - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [extensions] > convert = > graphlog =
--- a/tests/test-convert-svn-sink.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-convert-svn-sink.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,5 +1,5 @@ - $ "$TESTDIR/hghave" svn svn-bindings no-outer-repo || exit 80 + $ "$TESTDIR/hghave" svn no-outer-repo || exit 80 $ fixpath() > { @@ -22,7 +22,7 @@ > ) > } - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [extensions] > convert = > graphlog =
--- a/tests/test-convert-svn-source.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-convert-svn-source.t Fri Mar 11 12:35:41 2011 +0100 @@ -5,7 +5,7 @@ > { > tr '\\' / > } - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [extensions] > convert = > graphlog =
--- a/tests/test-convert-svn-startrev.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-convert-svn-startrev.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,7 +1,7 @@ $ "$TESTDIR/hghave" svn svn-bindings || exit 80 - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [extensions] > convert = > graphlog =
--- a/tests/test-convert-svn-tags.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-convert-svn-tags.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,7 +1,7 @@ $ "$TESTDIR/hghave" svn svn-bindings || exit 80 - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [extensions] > convert = > graphlog =
--- a/tests/test-eol-add.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-eol-add.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,6 +1,6 @@ Test adding .hgeol - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [diff] > git = 1 > EOF
--- a/tests/test-eol-clone.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-eol-clone.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,9 +1,6 @@ Testing cloning with the EOL extension - $ cat > $HGRCPATH <<EOF - > [diff] - > git = True - > + $ cat >> $HGRCPATH <<EOF > [extensions] > eol = >
--- a/tests/test-eol-hook.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-eol-hook.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,9 +1,5 @@ Test the EOL hook - $ cat > $HGRCPATH <<EOF - > [diff] - > git = True - > EOF $ hg init main $ cat > main/.hg/hgrc <<EOF > [extensions]
--- a/tests/test-eol-patch.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-eol-patch.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,6 +1,6 @@ Test EOL patching - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [diff] > git = 1 > EOF
--- a/tests/test-eol-tag.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-eol-tag.t Fri Mar 11 12:35:41 2011 +0100 @@ -2,10 +2,7 @@ Testing tagging with the EOL extension - $ cat > $HGRCPATH <<EOF - > [diff] - > git = True - > + $ cat >> $HGRCPATH <<EOF > [extensions] > eol = >
--- a/tests/test-eol-update.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-eol-update.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,6 +1,6 @@ Test EOL update - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [diff] > git = 1 > EOF
--- a/tests/test-eol.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-eol.t Fri Mar 11 12:35:41 2011 +0100 @@ -1,6 +1,6 @@ Test EOL extension - $ cat > $HGRCPATH <<EOF + $ cat >> $HGRCPATH <<EOF > [diff] > git = True > EOF
--- a/tests/test-hgrc.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-hgrc.t Fri Mar 11 12:35:41 2011 +0100 @@ -20,12 +20,12 @@ $ cd foobar $ cat .hg/hgrc [paths] - default = */foo%bar (glob) + default = $TESTTMP/foo%bar $ hg paths - default = */foo%bar (glob) + default = $TESTTMP/foo%bar $ hg showconfig - bundle.mainreporoot=*/foobar (glob) - paths.default=*/foo%bar (glob) + bundle.mainreporoot=$TESTTMP/foobar + paths.default=$TESTTMP/foo%bar $ cd .. issue1829: wrong indentation
--- a/tests/test-http-proxy.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-http-proxy.t Fri Mar 11 12:35:41 2011 +0100 @@ -98,25 +98,25 @@ updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cat proxy.log - * - - [*] "GET http://localhost:$HGPORT/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" - - (glob) + * - - [*] "GET http://localhost:$HGPORT/?cmd=between&pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=stream_out HTTP/1.1" - - (glob) - * - - [*] "GET http://localhost:$HGPORT/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" - - (glob) + * - - [*] "GET http://localhost:$HGPORT/?cmd=between&pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=changegroup&roots=0000000000000000000000000000000000000000 HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys&namespace=bookmarks HTTP/1.1" - - (glob) - * - - [*] "GET http://localhost:$HGPORT/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" - - (glob) + * - - [*] "GET http://localhost:$HGPORT/?cmd=between&pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=changegroup&roots=0000000000000000000000000000000000000000 HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys&namespace=bookmarks HTTP/1.1" - - (glob) - * - - [*] "GET http://localhost:$HGPORT/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" - - (glob) + * - - [*] "GET http://localhost:$HGPORT/?cmd=between&pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=changegroup&roots=0000000000000000000000000000000000000000 HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys&namespace=bookmarks HTTP/1.1" - - (glob) - * - - [*] "GET http://localhost:$HGPORT/?pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000&cmd=between HTTP/1.1" - - (glob) + * - - [*] "GET http://localhost:$HGPORT/?cmd=between&pairs=0000000000000000000000000000000000000000-0000000000000000000000000000000000000000 HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=heads HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=changegroup&roots=0000000000000000000000000000000000000000 HTTP/1.1" - - (glob) * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
--- a/tests/test-keyword.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-keyword.t Fri Mar 11 12:35:41 2011 +0100 @@ -209,7 +209,7 @@ To: Test changeset a2392c293916 in $TESTTMP/Test - details: *cmd=changeset;node=a2392c293916 (glob) + details: $TESTTMP/Test?cmd=changeset;node=a2392c293916 description: addsym
--- a/tests/test-mq-strip.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-mq-strip.t Fri Mar 11 12:35:41 2011 +0100 @@ -410,7 +410,7 @@ abort: local changes found [255] $ hg strip tip --keep - saved backup bundle to * (glob) + saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) $ hg log --graph @ changeset: 0:9ab35a2d17cb tag: tip
--- a/tests/test-rename-merge1.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-rename-merge1.t Fri Mar 11 12:35:41 2011 +0100 @@ -131,27 +131,27 @@ $ hg init repo2089 $ cd repo2089 - $ echo 0 > A - $ hg -q ci -Am 0 + $ echo c0 > f1 + $ hg ci -Aqm0 - $ hg -q up -C null - $ echo 1 > A - $ hg -q ci -Am 1 + $ hg up null -q + $ echo c1 > f1 + $ hg ci -Aqm1 - $ hg -q up -C 0 + $ hg up 0 -q $ hg merge 1 -q --tool internal:local - $ echo 2 > A - $ hg -q ci -m 2 + $ echo c2 > f1 + $ hg ci -qm2 - $ hg -q up -C 1 - $ hg mv A a - $ hg -q ci -Am 3 + $ hg up 1 -q + $ hg mv f1 f2 + $ hg ci -Aqm3 - $ hg -q up -C 2 + $ hg up 2 -q $ hg merge 3 - merging A and a to a + merging f1 and f2 to f2 0 files updated, 1 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) - $ cat a - 2 + $ cat f2 + c2
--- a/tests/test-revset-outgoing.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-revset-outgoing.t Fri Mar 11 12:35:41 2011 +0100 @@ -39,7 +39,7 @@ $ cd b $ cat .hg/hgrc [paths] - default = */a#stable (glob) + default = $TESTTMP/a#stable $ echo red >> a $ hg ci -qm3 @@ -60,7 +60,7 @@ $ hg tout - comparing with */a (glob) + comparing with $TESTTMP/a searching for changes 2:1d4099801a4e: '3' stable @@ -79,11 +79,11 @@ $ cat .hg/hgrc [paths] - default = */a#stable (glob) + default = $TESTTMP/a#stable green = ../a#default $ hg tout green - comparing with */a (glob) + comparing with $TESTTMP/a searching for changes 3:f0461977a3db: '4'
--- a/tests/test-serve Thu Mar 10 11:30:38 2011 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -#!/bin/sh - -hgserve() -{ - hg serve -a localhost -d --pid-file=hg.pid -E errors.log -v $@ \ - | sed -e "s/:$HGPORT1\\([^0-9]\\)/:HGPORT1\1/g" \ - -e "s/:$HGPORT2\\([^0-9]\\)/:HGPORT2\1/g" \ - -e 's/http:\/\/[^/]*\//http:\/\/localhost\//' - cat hg.pid >> "$DAEMON_PIDS" - echo % errors - cat errors.log - sleep 1 - if [ "$KILLQUIETLY" = "Y" ]; then - kill `cat hg.pid` 2>/dev/null - else - kill `cat hg.pid` - fi - sleep 1 -} - -hg init test -cd test - -echo '[web]' > .hg/hgrc -echo 'accesslog = access.log' >> .hg/hgrc -echo "port = $HGPORT1" >> .hg/hgrc - -echo % Without -v -hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid -E errors.log -cat hg.pid >> "$DAEMON_PIDS" -if [ -f access.log ]; then - echo 'access log created - .hg/hgrc respected' -fi -echo % errors -cat errors.log - -echo % With -v -hgserve - -echo % With -v and -p HGPORT2 -hgserve -p "$HGPORT2" - -echo '% With -v and -p daytime (should fail because low port)' -KILLQUIETLY=Y -hgserve -p daytime -KILLQUIETLY=N - -echo % With --prefix foo -hgserve --prefix foo - -echo % With --prefix /foo -hgserve --prefix /foo - -echo % With --prefix foo/ -hgserve --prefix foo/ - -echo % With --prefix /foo/ -hgserve --prefix /foo/
--- a/tests/test-serve.out Thu Mar 10 11:30:38 2011 -0600 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -% Without -v -access log created - .hg/hgrc respected -% errors -% With -v -listening at http://localhost/ (bound to 127.0.0.1:HGPORT1) -% errors -% With -v and -p HGPORT2 -listening at http://localhost/ (bound to 127.0.0.1:HGPORT2) -% errors -% With -v and -p daytime (should fail because low port) -abort: cannot start server at 'localhost:13': Permission denied -abort: child process failed to start -% errors -% With --prefix foo -listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) -% errors -% With --prefix /foo -listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) -% errors -% With --prefix foo/ -listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) -% errors -% With --prefix /foo/ -listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) -% errors
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-serve.t Fri Mar 11 12:35:41 2011 +0100 @@ -0,0 +1,82 @@ + + $ hgserve() + > { + > hg serve -a localhost -d --pid-file=hg.pid -E errors.log -v $@ \ + > | sed -e "s/:$HGPORT1\\([^0-9]\\)/:HGPORT1\1/g" \ + > -e "s/:$HGPORT2\\([^0-9]\\)/:HGPORT2\1/g" \ + > -e 's/http:\/\/[^/]*\//http:\/\/localhost\//' + > cat hg.pid >> "$DAEMON_PIDS" + > echo % errors + > cat errors.log + > sleep 1 + > if [ "$KILLQUIETLY" = "Y" ]; then + > kill `cat hg.pid` 2>/dev/null + > else + > kill `cat hg.pid` + > fi + > sleep 1 + > } + + $ hg init test + $ cd test + $ echo '[web]' > .hg/hgrc + $ echo 'accesslog = access.log' >> .hg/hgrc + $ echo "port = $HGPORT1" >> .hg/hgrc + +Without -v + + $ hg serve -a localhost -p $HGPORT -d --pid-file=hg.pid -E errors.log + $ cat hg.pid >> "$DAEMON_PIDS" + $ if [ -f access.log ]; then + $ echo 'access log created - .hg/hgrc respected' + access log created - .hg/hgrc respected + $ fi + +errors + + $ cat errors.log + +With -v + + $ hgserve + listening at http://localhost/ (bound to 127.0.0.1:HGPORT1) + % errors + +With -v and -p HGPORT2 + + $ hgserve -p "$HGPORT2" + listening at http://localhost/ (bound to 127.0.0.1:HGPORT2) + % errors + +With -v and -p daytime (should fail because low port) + + $ KILLQUIETLY=Y + $ hgserve -p daytime + abort: cannot start server at 'localhost:13': Permission denied + abort: child process failed to start + % errors + $ KILLQUIETLY=N + +With --prefix foo + + $ hgserve --prefix foo + listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) + % errors + +With --prefix /foo + + $ hgserve --prefix /foo + listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) + % errors + +With --prefix foo/ + + $ hgserve --prefix foo/ + listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) + % errors + +With --prefix /foo/ + + $ hgserve --prefix /foo/ + listening at http://localhost/foo/ (bound to 127.0.0.1:HGPORT1) + % errors
--- a/tests/test-subrepo-git.t Thu Mar 10 11:30:38 2011 -0600 +++ b/tests/test-subrepo-git.t Fri Mar 11 12:35:41 2011 +0100 @@ -73,7 +73,7 @@ $ cd t $ hg clone . ../tc updating to branch default - cloning subrepo s + cloning subrepo s from $TESTTMP/gitroot 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd ../tc $ hg debugsub @@ -96,7 +96,7 @@ $ cd ../t $ hg clone . ../ta updating to branch default - cloning subrepo s + cloning subrepo s from $TESTTMP/gitroot 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd ../ta @@ -115,7 +115,7 @@ $ cd ../t $ hg clone . ../tb updating to branch default - cloning subrepo s + cloning subrepo s from $TESTTMP/gitroot 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd ../tb/s @@ -155,7 +155,7 @@ added 1 changesets with 1 changes to 1 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) $ hg merge 2>/dev/null - pulling subrepo s + pulling subrepo s from $TESTTMP/gitroot 0 files updated, 0 files merged, 0 files removed, 0 files unresolved (branch merge, don't forget to commit) $ cat s/f @@ -199,7 +199,7 @@ $ cd ../t $ hg clone . ../td updating to branch default - cloning subrepo s + cloning subrepo s from $TESTTMP/gitroot checking out detached HEAD in subrepo s check out a git branch if you intend to make changes 3 files updated, 0 files merged, 0 files removed, 0 files unresolved @@ -232,7 +232,7 @@ $ cd ../tb $ hg pull -q $ hg update 2>/dev/null - pulling subrepo s + pulling subrepo s from $TESTTMP/gitroot 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg debugsub path s @@ -262,7 +262,7 @@ $ cd ../tc $ hg pull -q $ hg archive --subrepos -r 5 ../archive 2>/dev/null - pulling subrepo s + pulling subrepo s from $TESTTMP/gitroot $ cd ../archive $ cat s/f f @@ -282,7 +282,7 @@ $ hg clone ../t inner updating to branch default - cloning subrepo s + cloning subrepo s from $TESTTMP/gitroot 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo inner = inner > .hgsub $ hg add .hgsub @@ -311,7 +311,7 @@ $ mkdir d $ hg clone t d/t updating to branch default - cloning subrepo s + cloning subrepo s from $TESTTMP/gitroot 3 files updated, 0 files merged, 0 files removed, 0 files unresolved Don't crash if the subrepo is missing @@ -329,7 +329,7 @@ abort: subrepo s is missing [255] $ hg update -C - cloning subrepo s + cloning subrepo s from $TESTTMP/gitroot 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg sum | grep commit commit: (clean)