Show More
@@ -472,17 +472,27 b' def patch(ui, repo, patch1, *patches, **' | |||
|
472 | 472 | addremove(ui, repo, *files) |
|
473 | 473 | repo.commit(files, text) |
|
474 | 474 | |
|
475 | def pull(ui, repo, source="default"): | |
|
475 | def pull(ui, repo, source="default", **opts): | |
|
476 | 476 | """pull changes from the specified source""" |
|
477 | 477 | paths = {} |
|
478 | 478 | for name, path in ui.configitems("paths"): |
|
479 | 479 | paths[name] = path |
|
480 | 480 | |
|
481 |
if source in paths: |
|
|
481 | if source in paths: | |
|
482 | source = paths[source] | |
|
483 | ||
|
484 | ui.status('pulling from %s\n' % (source)) | |
|
482 | 485 | |
|
483 | 486 | other = hg.repository(ui, source) |
|
484 | 487 | cg = repo.getchangegroup(other) |
|
485 | repo.addchangegroup(cg) | |
|
488 | r = repo.addchangegroup(cg) | |
|
489 | if cg and not r: | |
|
490 | if opts['update']: | |
|
491 | return update(ui, repo) | |
|
492 | else: | |
|
493 | ui.status("(run 'hg update' to get a working copy)\n") | |
|
494 | ||
|
495 | return r | |
|
486 | 496 | |
|
487 | 497 | def push(ui, repo, dest="default-push"): |
|
488 | 498 | """push changes to the specified destination""" |
@@ -678,7 +688,9 b' table = {' | |||
|
678 | 688 | ('b', 'base', "", 'base path'), |
|
679 | 689 | ('q', 'quiet', "", 'silence diff')], |
|
680 | 690 | "hg import [options] patches"), |
|
681 |
"pull|merge": (pull, |
|
|
691 | "pull|merge": (pull, | |
|
692 | [('u', 'update', None, 'update working directory')], | |
|
693 | 'hg pull [options] [source]'), | |
|
682 | 694 | "push": (push, [], 'hg push <destination>'), |
|
683 | 695 | "rawcommit": (rawcommit, |
|
684 | 696 | [('p', 'parent', [], 'parent'), |
@@ -19,11 +19,13 b' 1 files, 1 changesets, 1 total revisions' | |||
|
19 | 19 | + hg commit -t 2 |
|
20 | 20 | + cd ../test |
|
21 | 21 | + hg pull ../branch |
|
22 | pulling from ../branch | |
|
22 | 23 | searching for changes |
|
23 | 24 | adding changesets |
|
24 | 25 | adding manifests |
|
25 | 26 | adding file revisions |
|
26 | 27 | modified 1 files, added 1 changesets and 1 new revisions |
|
28 | (run 'hg update' to get a working copy) | |
|
27 | 29 | + hg verify |
|
28 | 30 | checking changesets |
|
29 | 31 | checking manifests |
General Comments 0
You need to be logged in to leave comments.
Login now