Show More
@@ -472,17 +472,27 b' def patch(ui, repo, patch1, *patches, **' | |||||
472 | addremove(ui, repo, *files) |
|
472 | addremove(ui, repo, *files) | |
473 | repo.commit(files, text) |
|
473 | repo.commit(files, text) | |
474 |
|
474 | |||
475 | def pull(ui, repo, source="default"): |
|
475 | def pull(ui, repo, source="default", **opts): | |
476 | """pull changes from the specified source""" |
|
476 | """pull changes from the specified source""" | |
477 | paths = {} |
|
477 | paths = {} | |
478 | for name, path in ui.configitems("paths"): |
|
478 | for name, path in ui.configitems("paths"): | |
479 | paths[name] = path |
|
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 | other = hg.repository(ui, source) |
|
486 | other = hg.repository(ui, source) | |
484 | cg = repo.getchangegroup(other) |
|
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 | def push(ui, repo, dest="default-push"): |
|
497 | def push(ui, repo, dest="default-push"): | |
488 | """push changes to the specified destination""" |
|
498 | """push changes to the specified destination""" | |
@@ -678,7 +688,9 b' table = {' | |||||
678 | ('b', 'base', "", 'base path'), |
|
688 | ('b', 'base', "", 'base path'), | |
679 | ('q', 'quiet', "", 'silence diff')], |
|
689 | ('q', 'quiet', "", 'silence diff')], | |
680 | "hg import [options] patches"), |
|
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 | "push": (push, [], 'hg push <destination>'), |
|
694 | "push": (push, [], 'hg push <destination>'), | |
683 | "rawcommit": (rawcommit, |
|
695 | "rawcommit": (rawcommit, | |
684 | [('p', 'parent', [], 'parent'), |
|
696 | [('p', 'parent', [], 'parent'), |
@@ -19,11 +19,13 b' 1 files, 1 changesets, 1 total revisions' | |||||
19 | + hg commit -t 2 |
|
19 | + hg commit -t 2 | |
20 | + cd ../test |
|
20 | + cd ../test | |
21 | + hg pull ../branch |
|
21 | + hg pull ../branch | |
|
22 | pulling from ../branch | |||
22 | searching for changes |
|
23 | searching for changes | |
23 | adding changesets |
|
24 | adding changesets | |
24 | adding manifests |
|
25 | adding manifests | |
25 | adding file revisions |
|
26 | adding file revisions | |
26 | modified 1 files, added 1 changesets and 1 new revisions |
|
27 | modified 1 files, added 1 changesets and 1 new revisions | |
|
28 | (run 'hg update' to get a working copy) | |||
27 | + hg verify |
|
29 | + hg verify | |
28 | checking changesets |
|
30 | checking changesets | |
29 | checking manifests |
|
31 | checking manifests |
General Comments 0
You need to be logged in to leave comments.
Login now