Show More
@@ -182,7 +182,7 b' def archive(ui, repo, dest, **opts):' | |||||
182 | archival.archive(repo, dest, node, kind, not opts['no_decode'], |
|
182 | archival.archive(repo, dest, node, kind, not opts['no_decode'], | |
183 | matchfn, prefix) |
|
183 | matchfn, prefix) | |
184 |
|
184 | |||
185 | def backout(ui, repo, rev, **opts): |
|
185 | def backout(ui, repo, node=None, rev=None, **opts): | |
186 | '''reverse effect of earlier changeset |
|
186 | '''reverse effect of earlier changeset | |
187 |
|
187 | |||
188 | Commit the backed out changes as a new changeset. The new |
|
188 | Commit the backed out changes as a new changeset. The new | |
@@ -199,6 +199,11 b' def backout(ui, repo, rev, **opts):' | |||||
199 | changeset afterwards. This saves you from doing the merge by |
|
199 | changeset afterwards. This saves you from doing the merge by | |
200 | hand. The result of this merge is not committed, as for a normal |
|
200 | hand. The result of this merge is not committed, as for a normal | |
201 | merge.''' |
|
201 | merge.''' | |
|
202 | if rev and node: | |||
|
203 | raise util.Abort(_("please specify just one revision")) | |||
|
204 | ||||
|
205 | if not rev: | |||
|
206 | rev = node | |||
202 |
|
207 | |||
203 | bail_if_changed(repo) |
|
208 | bail_if_changed(repo) | |
204 | op1, op2 = repo.dirstate.parents() |
|
209 | op1, op2 = repo.dirstate.parents() | |
@@ -1832,7 +1837,7 b' def manifest(ui, repo, rev=None):' | |||||
1832 | ui.write("%3s " % (m.execf(f) and "755" or "644")) |
|
1837 | ui.write("%3s " % (m.execf(f) and "755" or "644")) | |
1833 | ui.write("%s\n" % f) |
|
1838 | ui.write("%s\n" % f) | |
1834 |
|
1839 | |||
1835 | def merge(ui, repo, node=None, force=None): |
|
1840 | def merge(ui, repo, node=None, force=None, rev=None): | |
1836 | """merge working directory with another revision |
|
1841 | """merge working directory with another revision | |
1837 |
|
1842 | |||
1838 | Merge the contents of the current working directory and the |
|
1843 | Merge the contents of the current working directory and the | |
@@ -1846,6 +1851,12 b' def merge(ui, repo, node=None, force=Non' | |||||
1846 | revision to merge with must be provided. |
|
1851 | revision to merge with must be provided. | |
1847 | """ |
|
1852 | """ | |
1848 |
|
1853 | |||
|
1854 | if rev and node: | |||
|
1855 | raise util.Abort(_("please specify just one revision")) | |||
|
1856 | ||||
|
1857 | if not node: | |||
|
1858 | node = rev | |||
|
1859 | ||||
1849 | if not node: |
|
1860 | if not node: | |
1850 | heads = repo.heads() |
|
1861 | heads = repo.heads() | |
1851 | if len(heads) > 2: |
|
1862 | if len(heads) > 2: | |
@@ -2558,7 +2569,7 b' def unbundle(ui, repo, fname, **opts):' | |||||
2558 | modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname) |
|
2569 | modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname) | |
2559 | return postincoming(ui, repo, modheads, opts['update']) |
|
2570 | return postincoming(ui, repo, modheads, opts['update']) | |
2560 |
|
2571 | |||
2561 | def update(ui, repo, node=None, clean=False, date=None): |
|
2572 | def update(ui, repo, node=None, rev=None, clean=False, date=None): | |
2562 | """update working directory |
|
2573 | """update working directory | |
2563 |
|
2574 | |||
2564 | Update the working directory to the specified revision, or the |
|
2575 | Update the working directory to the specified revision, or the | |
@@ -2574,15 +2585,21 b' def update(ui, repo, node=None, clean=Fa' | |||||
2574 | By default, update will refuse to run if doing so would require |
|
2585 | By default, update will refuse to run if doing so would require | |
2575 | discarding local changes. |
|
2586 | discarding local changes. | |
2576 | """ |
|
2587 | """ | |
|
2588 | if rev and node: | |||
|
2589 | raise util.Abort(_("please specify just one revision")) | |||
|
2590 | ||||
|
2591 | if not rev: | |||
|
2592 | rev = node | |||
|
2593 | ||||
2577 | if date: |
|
2594 | if date: | |
2578 |
if |
|
2595 | if rev: | |
2579 | raise util.Abort(_("you can't specify a revision and a date")) |
|
2596 | raise util.Abort(_("you can't specify a revision and a date")) | |
2580 |
|
|
2597 | rev = cmdutil.finddate(ui, repo, date) | |
2581 |
|
2598 | |||
2582 | if clean: |
|
2599 | if clean: | |
2583 |
return hg.clean(repo, |
|
2600 | return hg.clean(repo, rev) | |
2584 | else: |
|
2601 | else: | |
2585 |
return hg.update(repo, |
|
2602 | return hg.update(repo, rev) | |
2586 |
|
2603 | |||
2587 | def verify(ui, repo): |
|
2604 | def verify(ui, repo): | |
2588 | """verify the integrity of the repository |
|
2605 | """verify the integrity of the repository | |
@@ -2682,8 +2699,9 b' table = {' | |||||
2682 | ('d', 'date', '', _('record datecode as commit date')), |
|
2699 | ('d', 'date', '', _('record datecode as commit date')), | |
2683 | ('', 'parent', '', _('parent to choose when backing out merge')), |
|
2700 | ('', 'parent', '', _('parent to choose when backing out merge')), | |
2684 | ('u', 'user', '', _('record user as committer')), |
|
2701 | ('u', 'user', '', _('record user as committer')), | |
|
2702 | ('r', 'rev', '', _('revision to backout')), | |||
2685 | ] + walkopts + commitopts, |
|
2703 | ] + walkopts + commitopts, | |
2686 | _('hg backout [OPTION]... REV')), |
|
2704 | _('hg backout [OPTION]... [-r] REV')), | |
2687 | "branch": (branch, |
|
2705 | "branch": (branch, | |
2688 | [('f', 'force', None, |
|
2706 | [('f', 'force', None, | |
2689 | _('set branch name even if it shadows an existing branch'))], |
|
2707 | _('set branch name even if it shadows an existing branch'))], | |
@@ -2858,8 +2876,10 b' table = {' | |||||
2858 | "manifest": (manifest, [], _('hg manifest [REV]')), |
|
2876 | "manifest": (manifest, [], _('hg manifest [REV]')), | |
2859 | "^merge": |
|
2877 | "^merge": | |
2860 | (merge, |
|
2878 | (merge, | |
2861 |
[('f', 'force', None, _('force a merge with outstanding changes')) |
|
2879 | [('f', 'force', None, _('force a merge with outstanding changes')), | |
2862 | _('hg merge [-f] [REV]')), |
|
2880 | ('r', 'rev', '', _('revision to merge')), | |
|
2881 | ], | |||
|
2882 | _('hg merge [-f] [[-r] REV]')), | |||
2863 | "outgoing|out": (outgoing, |
|
2883 | "outgoing|out": (outgoing, | |
2864 | [('M', 'no-merges', None, _('do not show merges')), |
|
2884 | [('M', 'no-merges', None, _('do not show merges')), | |
2865 | ('f', 'force', None, |
|
2885 | ('f', 'force', None, | |
@@ -2990,8 +3010,9 b' table = {' | |||||
2990 | "^update|up|checkout|co": |
|
3010 | "^update|up|checkout|co": | |
2991 | (update, |
|
3011 | (update, | |
2992 | [('C', 'clean', None, _('overwrite locally modified files')), |
|
3012 | [('C', 'clean', None, _('overwrite locally modified files')), | |
2993 |
('d', 'date', '', _('tipmost revision matching date')) |
|
3013 | ('d', 'date', '', _('tipmost revision matching date')), | |
2994 | _('hg update [-C] [-d DATE] [REV]')), |
|
3014 | ('r', 'rev', '', _('revision'))], | |
|
3015 | _('hg update [-C] [-d DATE] [[-r] REV]')), | |||
2995 | "verify": (verify, [], _('hg verify')), |
|
3016 | "verify": (verify, [], _('hg verify')), | |
2996 | "version": (version_, [], _('hg version')), |
|
3017 | "version": (version_, [], _('hg version')), | |
2997 | } |
|
3018 | } |
General Comments 0
You need to be logged in to leave comments.
Login now