# HG changeset patch # User Martin Geisler # Date 1308657626 -7200 # Node ID 0e64286760d5214d9046d1597a988e5bd1a05b52 # Parent b1880474e3adb25d2242cb00005b872ce67e85b2# Parent 1ec8bd909ac3b570d5ffd196bd46d60b838c7148 merge with stable diff -r b1880474e3ad -r 0e64286760d5 mercurial/dispatch.py --- a/mercurial/dispatch.py Mon Jun 20 11:08:41 2011 +0200 +++ b/mercurial/dispatch.py Tue Jun 21 14:00:26 2011 +0200 @@ -333,7 +333,7 @@ def __call__(self, ui, *args, **opts): if self.shadows: - ui.debug("alias '%s' shadows command '%s'\n" % + ui.debug(_("alias '%s' shadows command '%s'\n") % (self.name, self.cmdname)) if hasattr(self, 'shell'): @@ -343,7 +343,7 @@ util.checksignature(self.fn)(ui, *args, **opts) except error.SignatureError: args = ' '.join([self.cmdname] + self.args) - ui.debug("alias '%s' expands to '%s'\n" % (self.name, args)) + ui.debug(_("alias '%s' expands to '%s'\n") % (self.name, args)) raise def addaliases(ui, cmdtable): diff -r b1880474e3ad -r 0e64286760d5 mercurial/fileset.py --- a/mercurial/fileset.py Mon Jun 20 11:08:41 2011 +0200 +++ b/mercurial/fileset.py Tue Jun 21 14:00:26 2011 +0200 @@ -228,7 +228,7 @@ return [f for f in mctx.subset if f in ms and ms[f] == 'u'] def hgignore(mctx, x): - """``resolved()`` + """``hgignore()`` File that matches the active .hgignore pattern. """ getargs(x, 0, 0, _("hgignore takes no arguments")) @@ -402,7 +402,7 @@ def getfileset(ctx, expr): tree, pos = parse(expr) if (pos != len(expr)): - raise error.ParseError("invalid token", pos) + raise error.ParseError(_("invalid token"), pos) # do we need status info? if _intree(['modified', 'added', 'removed', 'deleted', diff -r b1880474e3ad -r 0e64286760d5 mercurial/parser.py --- a/mercurial/parser.py Mon Jun 20 11:08:41 2011 +0200 +++ b/mercurial/parser.py Tue Jun 21 14:00:26 2011 +0200 @@ -16,6 +16,7 @@ # __call__(program) parses program into a labelled tree import error +from i18n import _ class parser(object): def __init__(self, tokenizer, elements, methods=None): @@ -34,7 +35,7 @@ def _match(self, m, pos): 'make sure the tokenizer matches an end condition' if self.current[0] != m: - raise error.ParseError("unexpected token: %s" % self.current[0], + raise error.ParseError(_("unexpected token: %s") % self.current[0], self.current[2]) self._advance() def _parse(self, bind=0): @@ -42,7 +43,7 @@ # handle prefix rules on current token prefix = self._elements[token][1] if not prefix: - raise error.ParseError("not a prefix: %s" % token, pos) + raise error.ParseError(_("not a prefix: %s") % token, pos) if len(prefix) == 1: expr = (prefix[0], value) else: @@ -64,7 +65,7 @@ else: # handle infix rules if len(e) < 3 or not e[2]: - raise error.ParseError("not an infix: %s" % token, pos) + raise error.ParseError(_("not an infix: %s") % token, pos) infix = e[2] if len(infix) == 3 and infix[2] == self.current[0]: self._match(infix[2], pos) diff -r b1880474e3ad -r 0e64286760d5 mercurial/revset.py --- a/mercurial/revset.py Mon Jun 20 11:08:41 2011 +0200 +++ b/mercurial/revset.py Tue Jun 21 14:00:26 2011 +0200 @@ -979,7 +979,7 @@ value = value.replace(arg, repr(arg)) self.replacement, pos = parse(value) if pos != len(value): - raise error.ParseError('invalid token', pos) + raise error.ParseError(_('invalid token'), pos) else: self.replacement = value @@ -997,7 +997,8 @@ (len(self.args) == 1 and tree[2][0] == 'list') or (len(self.args) > 1 and (tree[2][0] != 'list' or len(tree[2]) - 1 != len(self.args)))): - raise error.ParseError('invalid amount of arguments', len(tree) - 2) + raise error.ParseError(_('invalid amount of arguments'), + len(tree) - 2) return True def replace(self, tree): @@ -1033,7 +1034,7 @@ raise error.ParseError(_("empty query")) tree, pos = parse(spec) if (pos != len(spec)): - raise error.ParseError("invalid token", pos) + raise error.ParseError(_("invalid token"), pos) tree = findaliases(ui, tree) weight, tree = optimize(tree, True) def mfunc(repo, subset): diff -r b1880474e3ad -r 0e64286760d5 mercurial/treediscovery.py --- a/mercurial/treediscovery.py Mon Jun 20 11:08:41 2011 +0200 +++ b/mercurial/treediscovery.py Tue Jun 21 14:00:26 2011 +0200 @@ -49,7 +49,6 @@ if not unknown: return list(base), [], list(heads) - heads = unknown req = set(unknown) reqcnt = 0 diff -r b1880474e3ad -r 0e64286760d5 mercurial/util.py --- a/mercurial/util.py Mon Jun 20 11:08:41 2011 +0200 +++ b/mercurial/util.py Tue Jun 21 14:00:26 2011 +0200 @@ -1359,6 +1359,8 @@ >>> url(r'c:\foo\bar') + >>> url(r'\\blah\blah\blah') + Authentication credentials: @@ -1387,8 +1389,8 @@ self._hostport = '' self._origpath = path - # special case for Windows drive letters - if hasdriveletter(path): + # special case for Windows drive letters and UNC paths + if hasdriveletter(path) or path.startswith(r'\\'): self.path = path return diff -r b1880474e3ad -r 0e64286760d5 tests/test-treediscovery.t --- a/tests/test-treediscovery.t Mon Jun 20 11:08:41 2011 +0200 +++ b/tests/test-treediscovery.t Tue Jun 21 14:00:26 2011 +0200 @@ -319,5 +319,180 @@ 11 a19bfa7e7328: r11 both $ cd .. +Both have new stuff in new named branches: + + $ stop + $ hg clone main repo1a --rev name1 -q + $ hg clone repo1a repo1b -q + $ hg clone main repo2a --rev name2 -q + $ hg clone repo2a repo2b -q + $ start repo1a + + $ cd repo2a + $ hg incoming $remote + comparing with http://localhost:$HGPORT/ + searching for changes + 6 a7892891da29: r2 name1 + 7 2c8d5d5ec612: r3 name1 + 8 e71dbbc70e03: r4 name1 + $ hg outgoing $remote + comparing with http://localhost:$HGPORT/ + searching for changes + 2 70314b29987d: r5 name2 + 3 6c6f5d5f3c11: r6 name2 + 4 b6b4d315a2ac: r7 name2 + 5 d8f638ac69e9: r8 name2 + $ hg push $remote --new-branch + pushing to http://localhost:$HGPORT/ + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 4 changesets with 8 changes to 2 files (+1 heads) + $ hg pull $remote + pulling from http://localhost:$HGPORT/ + searching for changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 6 changes to 2 files (+1 heads) + (run 'hg heads' to see heads) + $ hg incoming $remote + comparing with http://localhost:$HGPORT/ + searching for changes + no changes found + [1] + $ hg outgoing $remote + comparing with http://localhost:$HGPORT/ + searching for changes + no changes found + [1] + $ cd .. + + $ stop ; start repo1b + $ cd repo2b + $ hg incoming $remote + comparing with http://localhost:$HGPORT/ + searching for changes + 6 a7892891da29: r2 name1 + 7 2c8d5d5ec612: r3 name1 + 8 e71dbbc70e03: r4 name1 + $ hg outgoing $remote + comparing with http://localhost:$HGPORT/ + searching for changes + 2 70314b29987d: r5 name2 + 3 6c6f5d5f3c11: r6 name2 + 4 b6b4d315a2ac: r7 name2 + 5 d8f638ac69e9: r8 name2 + $ hg pull $remote + pulling from http://localhost:$HGPORT/ + searching for changes + adding changesets + adding manifests + adding file changes + added 3 changesets with 6 changes to 2 files (+1 heads) + (run 'hg heads' to see heads) + $ hg push $remote --new-branch + pushing to http://localhost:$HGPORT/ + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 4 changesets with 8 changes to 2 files (+1 heads) + $ hg incoming $remote + comparing with http://localhost:$HGPORT/ + searching for changes + no changes found + [1] + $ hg outgoing $remote + comparing with http://localhost:$HGPORT/ + searching for changes + no changes found + [1] + $ cd .. + +Both have new stuff in existing named branches: + + $ stop + $ rm -r repo1a repo1b repo2a repo2b + $ hg clone main repo1a --rev 3 --rev 8 -q + $ hg clone repo1a repo1b -q + $ hg clone main repo2a --rev 4 --rev 7 -q + $ hg clone repo2a repo2b -q + $ start repo1a + + $ cd repo2a + $ hg incoming $remote + comparing with http://localhost:$HGPORT/ + searching for changes + 8 d8f638ac69e9: r8 name2 + $ hg outgoing $remote + comparing with http://localhost:$HGPORT/ + searching for changes + 4 e71dbbc70e03: r4 name1 + $ hg push $remote --new-branch + pushing to http://localhost:$HGPORT/ + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 2 changes to 2 files + $ hg pull $remote + pulling from http://localhost:$HGPORT/ + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 2 changes to 2 files + (run 'hg update' to get a working copy) + $ hg incoming $remote + comparing with http://localhost:$HGPORT/ + searching for changes + no changes found + [1] + $ hg outgoing $remote + comparing with http://localhost:$HGPORT/ + searching for changes + no changes found + [1] + $ cd .. + + $ stop ; start repo1b + $ cd repo2b + $ hg incoming $remote + comparing with http://localhost:$HGPORT/ + searching for changes + 8 d8f638ac69e9: r8 name2 + $ hg outgoing $remote + comparing with http://localhost:$HGPORT/ + searching for changes + 4 e71dbbc70e03: r4 name1 + $ hg pull $remote + pulling from http://localhost:$HGPORT/ + searching for changes + adding changesets + adding manifests + adding file changes + added 1 changesets with 2 changes to 2 files + (run 'hg update' to get a working copy) + $ hg push $remote --new-branch + pushing to http://localhost:$HGPORT/ + searching for changes + remote: adding changesets + remote: adding manifests + remote: adding file changes + remote: added 1 changesets with 2 changes to 2 files + $ hg incoming $remote + comparing with http://localhost:$HGPORT/ + searching for changes + no changes found + [1] + $ hg outgoing $remote + comparing with http://localhost:$HGPORT/ + searching for changes + no changes found + [1] + $ cd .. + $ stop