##// END OF EJS Templates
merge with stable
Martin Geisler -
r14703:0e642867 merge default
parent child Browse files
Show More
@@ -333,7 +333,7 b' class cmdalias(object):'
333
333
334 def __call__(self, ui, *args, **opts):
334 def __call__(self, ui, *args, **opts):
335 if self.shadows:
335 if self.shadows:
336 ui.debug("alias '%s' shadows command '%s'\n" %
336 ui.debug(_("alias '%s' shadows command '%s'\n") %
337 (self.name, self.cmdname))
337 (self.name, self.cmdname))
338
338
339 if hasattr(self, 'shell'):
339 if hasattr(self, 'shell'):
@@ -343,7 +343,7 b' class cmdalias(object):'
343 util.checksignature(self.fn)(ui, *args, **opts)
343 util.checksignature(self.fn)(ui, *args, **opts)
344 except error.SignatureError:
344 except error.SignatureError:
345 args = ' '.join([self.cmdname] + self.args)
345 args = ' '.join([self.cmdname] + self.args)
346 ui.debug("alias '%s' expands to '%s'\n" % (self.name, args))
346 ui.debug(_("alias '%s' expands to '%s'\n") % (self.name, args))
347 raise
347 raise
348
348
349 def addaliases(ui, cmdtable):
349 def addaliases(ui, cmdtable):
@@ -228,7 +228,7 b' def unresolved(mctx, x):'
228 return [f for f in mctx.subset if f in ms and ms[f] == 'u']
228 return [f for f in mctx.subset if f in ms and ms[f] == 'u']
229
229
230 def hgignore(mctx, x):
230 def hgignore(mctx, x):
231 """``resolved()``
231 """``hgignore()``
232 File that matches the active .hgignore pattern.
232 File that matches the active .hgignore pattern.
233 """
233 """
234 getargs(x, 0, 0, _("hgignore takes no arguments"))
234 getargs(x, 0, 0, _("hgignore takes no arguments"))
@@ -402,7 +402,7 b' def _intree(funcs, tree):'
402 def getfileset(ctx, expr):
402 def getfileset(ctx, expr):
403 tree, pos = parse(expr)
403 tree, pos = parse(expr)
404 if (pos != len(expr)):
404 if (pos != len(expr)):
405 raise error.ParseError("invalid token", pos)
405 raise error.ParseError(_("invalid token"), pos)
406
406
407 # do we need status info?
407 # do we need status info?
408 if _intree(['modified', 'added', 'removed', 'deleted',
408 if _intree(['modified', 'added', 'removed', 'deleted',
@@ -16,6 +16,7 b''
16 # __call__(program) parses program into a labelled tree
16 # __call__(program) parses program into a labelled tree
17
17
18 import error
18 import error
19 from i18n import _
19
20
20 class parser(object):
21 class parser(object):
21 def __init__(self, tokenizer, elements, methods=None):
22 def __init__(self, tokenizer, elements, methods=None):
@@ -34,7 +35,7 b' class parser(object):'
34 def _match(self, m, pos):
35 def _match(self, m, pos):
35 'make sure the tokenizer matches an end condition'
36 'make sure the tokenizer matches an end condition'
36 if self.current[0] != m:
37 if self.current[0] != m:
37 raise error.ParseError("unexpected token: %s" % self.current[0],
38 raise error.ParseError(_("unexpected token: %s") % self.current[0],
38 self.current[2])
39 self.current[2])
39 self._advance()
40 self._advance()
40 def _parse(self, bind=0):
41 def _parse(self, bind=0):
@@ -42,7 +43,7 b' class parser(object):'
42 # handle prefix rules on current token
43 # handle prefix rules on current token
43 prefix = self._elements[token][1]
44 prefix = self._elements[token][1]
44 if not prefix:
45 if not prefix:
45 raise error.ParseError("not a prefix: %s" % token, pos)
46 raise error.ParseError(_("not a prefix: %s") % token, pos)
46 if len(prefix) == 1:
47 if len(prefix) == 1:
47 expr = (prefix[0], value)
48 expr = (prefix[0], value)
48 else:
49 else:
@@ -64,7 +65,7 b' class parser(object):'
64 else:
65 else:
65 # handle infix rules
66 # handle infix rules
66 if len(e) < 3 or not e[2]:
67 if len(e) < 3 or not e[2]:
67 raise error.ParseError("not an infix: %s" % token, pos)
68 raise error.ParseError(_("not an infix: %s") % token, pos)
68 infix = e[2]
69 infix = e[2]
69 if len(infix) == 3 and infix[2] == self.current[0]:
70 if len(infix) == 3 and infix[2] == self.current[0]:
70 self._match(infix[2], pos)
71 self._match(infix[2], pos)
@@ -979,7 +979,7 b' class revsetalias(object):'
979 value = value.replace(arg, repr(arg))
979 value = value.replace(arg, repr(arg))
980 self.replacement, pos = parse(value)
980 self.replacement, pos = parse(value)
981 if pos != len(value):
981 if pos != len(value):
982 raise error.ParseError('invalid token', pos)
982 raise error.ParseError(_('invalid token'), pos)
983 else:
983 else:
984 self.replacement = value
984 self.replacement = value
985
985
@@ -997,7 +997,8 b' class revsetalias(object):'
997 (len(self.args) == 1 and tree[2][0] == 'list') or
997 (len(self.args) == 1 and tree[2][0] == 'list') or
998 (len(self.args) > 1 and (tree[2][0] != 'list' or
998 (len(self.args) > 1 and (tree[2][0] != 'list' or
999 len(tree[2]) - 1 != len(self.args)))):
999 len(tree[2]) - 1 != len(self.args)))):
1000 raise error.ParseError('invalid amount of arguments', len(tree) - 2)
1000 raise error.ParseError(_('invalid amount of arguments'),
1001 len(tree) - 2)
1001 return True
1002 return True
1002
1003
1003 def replace(self, tree):
1004 def replace(self, tree):
@@ -1033,7 +1034,7 b' def match(ui, spec):'
1033 raise error.ParseError(_("empty query"))
1034 raise error.ParseError(_("empty query"))
1034 tree, pos = parse(spec)
1035 tree, pos = parse(spec)
1035 if (pos != len(spec)):
1036 if (pos != len(spec)):
1036 raise error.ParseError("invalid token", pos)
1037 raise error.ParseError(_("invalid token"), pos)
1037 tree = findaliases(ui, tree)
1038 tree = findaliases(ui, tree)
1038 weight, tree = optimize(tree, True)
1039 weight, tree = optimize(tree, True)
1039 def mfunc(repo, subset):
1040 def mfunc(repo, subset):
@@ -49,7 +49,6 b' def findcommonincoming(repo, remote, hea'
49 if not unknown:
49 if not unknown:
50 return list(base), [], list(heads)
50 return list(base), [], list(heads)
51
51
52 heads = unknown
53 req = set(unknown)
52 req = set(unknown)
54 reqcnt = 0
53 reqcnt = 0
55
54
@@ -1359,6 +1359,8 b' class url(object):'
1359 <url scheme: 'bundle', path: '../foo'>
1359 <url scheme: 'bundle', path: '../foo'>
1360 >>> url(r'c:\foo\bar')
1360 >>> url(r'c:\foo\bar')
1361 <url path: 'c:\\foo\\bar'>
1361 <url path: 'c:\\foo\\bar'>
1362 >>> url(r'\\blah\blah\blah')
1363 <url path: '\\\\blah\\blah\\blah'>
1362
1364
1363 Authentication credentials:
1365 Authentication credentials:
1364
1366
@@ -1387,8 +1389,8 b' class url(object):'
1387 self._hostport = ''
1389 self._hostport = ''
1388 self._origpath = path
1390 self._origpath = path
1389
1391
1390 # special case for Windows drive letters
1392 # special case for Windows drive letters and UNC paths
1391 if hasdriveletter(path):
1393 if hasdriveletter(path) or path.startswith(r'\\'):
1392 self.path = path
1394 self.path = path
1393 return
1395 return
1394
1396
@@ -319,5 +319,180 b' Partial pull:'
319 11 a19bfa7e7328: r11 both
319 11 a19bfa7e7328: r11 both
320 $ cd ..
320 $ cd ..
321
321
322 Both have new stuff in new named branches:
323
324 $ stop
325 $ hg clone main repo1a --rev name1 -q
326 $ hg clone repo1a repo1b -q
327 $ hg clone main repo2a --rev name2 -q
328 $ hg clone repo2a repo2b -q
329 $ start repo1a
330
331 $ cd repo2a
332 $ hg incoming $remote
333 comparing with http://localhost:$HGPORT/
334 searching for changes
335 6 a7892891da29: r2 name1
336 7 2c8d5d5ec612: r3 name1
337 8 e71dbbc70e03: r4 name1
338 $ hg outgoing $remote
339 comparing with http://localhost:$HGPORT/
340 searching for changes
341 2 70314b29987d: r5 name2
342 3 6c6f5d5f3c11: r6 name2
343 4 b6b4d315a2ac: r7 name2
344 5 d8f638ac69e9: r8 name2
345 $ hg push $remote --new-branch
346 pushing to http://localhost:$HGPORT/
347 searching for changes
348 remote: adding changesets
349 remote: adding manifests
350 remote: adding file changes
351 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
352 $ hg pull $remote
353 pulling from http://localhost:$HGPORT/
354 searching for changes
355 adding changesets
356 adding manifests
357 adding file changes
358 added 3 changesets with 6 changes to 2 files (+1 heads)
359 (run 'hg heads' to see heads)
360 $ hg incoming $remote
361 comparing with http://localhost:$HGPORT/
362 searching for changes
363 no changes found
364 [1]
365 $ hg outgoing $remote
366 comparing with http://localhost:$HGPORT/
367 searching for changes
368 no changes found
369 [1]
370 $ cd ..
371
372 $ stop ; start repo1b
373 $ cd repo2b
374 $ hg incoming $remote
375 comparing with http://localhost:$HGPORT/
376 searching for changes
377 6 a7892891da29: r2 name1
378 7 2c8d5d5ec612: r3 name1
379 8 e71dbbc70e03: r4 name1
380 $ hg outgoing $remote
381 comparing with http://localhost:$HGPORT/
382 searching for changes
383 2 70314b29987d: r5 name2
384 3 6c6f5d5f3c11: r6 name2
385 4 b6b4d315a2ac: r7 name2
386 5 d8f638ac69e9: r8 name2
387 $ hg pull $remote
388 pulling from http://localhost:$HGPORT/
389 searching for changes
390 adding changesets
391 adding manifests
392 adding file changes
393 added 3 changesets with 6 changes to 2 files (+1 heads)
394 (run 'hg heads' to see heads)
395 $ hg push $remote --new-branch
396 pushing to http://localhost:$HGPORT/
397 searching for changes
398 remote: adding changesets
399 remote: adding manifests
400 remote: adding file changes
401 remote: added 4 changesets with 8 changes to 2 files (+1 heads)
402 $ hg incoming $remote
403 comparing with http://localhost:$HGPORT/
404 searching for changes
405 no changes found
406 [1]
407 $ hg outgoing $remote
408 comparing with http://localhost:$HGPORT/
409 searching for changes
410 no changes found
411 [1]
412 $ cd ..
413
414 Both have new stuff in existing named branches:
415
416 $ stop
417 $ rm -r repo1a repo1b repo2a repo2b
418 $ hg clone main repo1a --rev 3 --rev 8 -q
419 $ hg clone repo1a repo1b -q
420 $ hg clone main repo2a --rev 4 --rev 7 -q
421 $ hg clone repo2a repo2b -q
422 $ start repo1a
423
424 $ cd repo2a
425 $ hg incoming $remote
426 comparing with http://localhost:$HGPORT/
427 searching for changes
428 8 d8f638ac69e9: r8 name2
429 $ hg outgoing $remote
430 comparing with http://localhost:$HGPORT/
431 searching for changes
432 4 e71dbbc70e03: r4 name1
433 $ hg push $remote --new-branch
434 pushing to http://localhost:$HGPORT/
435 searching for changes
436 remote: adding changesets
437 remote: adding manifests
438 remote: adding file changes
439 remote: added 1 changesets with 2 changes to 2 files
440 $ hg pull $remote
441 pulling from http://localhost:$HGPORT/
442 searching for changes
443 adding changesets
444 adding manifests
445 adding file changes
446 added 1 changesets with 2 changes to 2 files
447 (run 'hg update' to get a working copy)
448 $ hg incoming $remote
449 comparing with http://localhost:$HGPORT/
450 searching for changes
451 no changes found
452 [1]
453 $ hg outgoing $remote
454 comparing with http://localhost:$HGPORT/
455 searching for changes
456 no changes found
457 [1]
458 $ cd ..
459
460 $ stop ; start repo1b
461 $ cd repo2b
462 $ hg incoming $remote
463 comparing with http://localhost:$HGPORT/
464 searching for changes
465 8 d8f638ac69e9: r8 name2
466 $ hg outgoing $remote
467 comparing with http://localhost:$HGPORT/
468 searching for changes
469 4 e71dbbc70e03: r4 name1
470 $ hg pull $remote
471 pulling from http://localhost:$HGPORT/
472 searching for changes
473 adding changesets
474 adding manifests
475 adding file changes
476 added 1 changesets with 2 changes to 2 files
477 (run 'hg update' to get a working copy)
478 $ hg push $remote --new-branch
479 pushing to http://localhost:$HGPORT/
480 searching for changes
481 remote: adding changesets
482 remote: adding manifests
483 remote: adding file changes
484 remote: added 1 changesets with 2 changes to 2 files
485 $ hg incoming $remote
486 comparing with http://localhost:$HGPORT/
487 searching for changes
488 no changes found
489 [1]
490 $ hg outgoing $remote
491 comparing with http://localhost:$HGPORT/
492 searching for changes
493 no changes found
494 [1]
495 $ cd ..
496
322 $ stop
497 $ stop
323
498
General Comments 0
You need to be logged in to leave comments. Login now