Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commands.py @ 4014:509342f95564
various doc fixes
- update can no longer be used to merge
- short summary start with lowercase
- add merge to short help list
- fix tests
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Fri, 29 Dec 2006 06:37:43 +0100 |
parents | 54fa628b8c78 |
children | a195f11ed1a2 31047b6f7ec1 |
comparison
equal
deleted
inserted
replaced
4013:54fa628b8c78 | 4014:509342f95564 |
---|---|
1771 if ui.verbose: | 1771 if ui.verbose: |
1772 ui.write("%3s " % (m.execf(f) and "755" or "644")) | 1772 ui.write("%3s " % (m.execf(f) and "755" or "644")) |
1773 ui.write("%s\n" % f) | 1773 ui.write("%s\n" % f) |
1774 | 1774 |
1775 def merge(ui, repo, node=None, force=None, branch=None): | 1775 def merge(ui, repo, node=None, force=None, branch=None): |
1776 """Merge working directory with another revision | 1776 """merge working directory with another revision |
1777 | 1777 |
1778 Merge the contents of the current working directory and the | 1778 Merge the contents of the current working directory and the |
1779 requested revision. Files that changed between either parent are | 1779 requested revision. Files that changed between either parent are |
1780 marked as changed for the next commit and a commit must be | 1780 marked as changed for the next commit and a commit must be |
1781 performed before any further updates are allowed. | 1781 performed before any further updates are allowed. |
2487 gen = changegroup.readbundle(urllib.urlopen(fname), fname) | 2487 gen = changegroup.readbundle(urllib.urlopen(fname), fname) |
2488 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname) | 2488 modheads = repo.addchangegroup(gen, 'unbundle', 'bundle:' + fname) |
2489 return postincoming(ui, repo, modheads, opts['update']) | 2489 return postincoming(ui, repo, modheads, opts['update']) |
2490 | 2490 |
2491 def update(ui, repo, node=None, clean=False, branch=None, date=None): | 2491 def update(ui, repo, node=None, clean=False, branch=None, date=None): |
2492 """update or merge working directory | 2492 """update working directory |
2493 | 2493 |
2494 Update the working directory to the specified revision. | 2494 Update the working directory to the specified revision. |
2495 | 2495 |
2496 If there are no outstanding changes in the working directory and | 2496 If there are no outstanding changes in the working directory and |
2497 there is a linear relationship between the current version and the | 2497 there is a linear relationship between the current version and the |
2499 | 2499 |
2500 To merge the working directory with another revision, use the | 2500 To merge the working directory with another revision, use the |
2501 merge command. | 2501 merge command. |
2502 | 2502 |
2503 By default, update will refuse to run if doing so would require | 2503 By default, update will refuse to run if doing so would require |
2504 merging or discarding local changes. | 2504 discarding local changes. |
2505 """ | 2505 """ |
2506 if date: | 2506 if date: |
2507 if node: | 2507 if node: |
2508 raise util.Abort(_("you can't specify a revision and a date")) | 2508 raise util.Abort(_("you can't specify a revision and a date")) |
2509 node = cmdutil.finddate(ui, repo, date) | 2509 node = cmdutil.finddate(ui, repo, date) |
2805 ('P', 'prune', [], _('do not display revision or any of its ancestors')), | 2805 ('P', 'prune', [], _('do not display revision or any of its ancestors')), |
2806 ('', 'template', '', _('display with template')), | 2806 ('', 'template', '', _('display with template')), |
2807 ] + walkopts, | 2807 ] + walkopts, |
2808 _('hg log [OPTION]... [FILE]')), | 2808 _('hg log [OPTION]... [FILE]')), |
2809 "manifest": (manifest, [], _('hg manifest [REV]')), | 2809 "manifest": (manifest, [], _('hg manifest [REV]')), |
2810 "merge": | 2810 "^merge": |
2811 (merge, | 2811 (merge, |
2812 [('b', 'branch', '', _('merge with head of a specific branch (DEPRECATED)')), | 2812 [('b', 'branch', '', _('merge with head of a specific branch (DEPRECATED)')), |
2813 ('f', 'force', None, _('force a merge with outstanding changes'))], | 2813 ('f', 'force', None, _('force a merge with outstanding changes'))], |
2814 _('hg merge [-f] [REV]')), | 2814 _('hg merge [-f] [REV]')), |
2815 "outgoing|out": (outgoing, | 2815 "outgoing|out": (outgoing, |