Mercurial > hg
changeset 14703:0e64286760d5
merge with stable
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Tue, 21 Jun 2011 14:00:26 +0200 |
parents | b1880474e3ad (current diff) 1ec8bd909ac3 (diff) |
children | 640bfe96ddcf |
files | |
diffstat | 7 files changed, 191 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- 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):
--- 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',
--- 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)
--- 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):
--- 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
--- 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 scheme: 'bundle', path: '../foo'> >>> url(r'c:\foo\bar') <url path: 'c:\\foo\\bar'> + >>> url(r'\\blah\blah\blah') + <url path: '\\\\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
--- 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