1679 if opts['patch']: |
1679 if opts['patch']: |
1680 prev = (parents and parents[0]) or nullid |
1680 prev = (parents and parents[0]) or nullid |
1681 dodiff(ui, ui, repo, prev, n) |
1681 dodiff(ui, ui, repo, prev, n) |
1682 ui.write("\n") |
1682 ui.write("\n") |
1683 |
1683 |
1684 def parents(ui, repo, rev=None): |
1684 def parents(ui, repo, rev=None, branch=None): |
1685 """show the parents of the working dir or revision |
1685 """show the parents of the working dir or revision |
1686 |
1686 |
1687 Print the working directory's parent revisions. |
1687 Print the working directory's parent revisions. |
1688 """ |
1688 """ |
1689 if rev: |
1689 if rev: |
1690 p = repo.changelog.parents(repo.lookup(rev)) |
1690 p = repo.changelog.parents(repo.lookup(rev)) |
1691 else: |
1691 else: |
1692 p = repo.dirstate.parents() |
1692 p = repo.dirstate.parents() |
1693 |
1693 |
|
1694 br = None |
|
1695 if branch is not None: |
|
1696 br = repo.branchlookup(p) |
1694 for n in p: |
1697 for n in p: |
1695 if n != nullid: |
1698 if n != nullid: |
1696 show_changeset(ui, repo, changenode=n) |
1699 show_changeset(ui, repo, changenode=n, brinfo=br) |
1697 |
1700 |
1698 def paths(ui, search=None): |
1701 def paths(ui, search=None): |
1699 """show definition of symbolic path names |
1702 """show definition of symbolic path names |
1700 |
1703 |
1701 Show definition of symbolic path name NAME. If no name is given, show |
1704 Show definition of symbolic path name NAME. If no name is given, show |
2410 "outgoing|out": (outgoing, |
2413 "outgoing|out": (outgoing, |
2411 [('M', 'no-merges', None, _('do not show merges')), |
2414 [('M', 'no-merges', None, _('do not show merges')), |
2412 ('p', 'patch', None, _('show patch')), |
2415 ('p', 'patch', None, _('show patch')), |
2413 ('n', 'newest-first', None, _('show newest record first'))], |
2416 ('n', 'newest-first', None, _('show newest record first'))], |
2414 _('hg outgoing [-p] [-n] [-M] [DEST]')), |
2417 _('hg outgoing [-p] [-n] [-M] [DEST]')), |
2415 "^parents": (parents, [], _('hg parents [REV]')), |
2418 "^parents": |
|
2419 (parents, |
|
2420 [('b', 'branch', None, _('show branches'))], |
|
2421 _('hg parents [-b] [REV]')), |
2416 "paths": (paths, [], _('hg paths [NAME]')), |
2422 "paths": (paths, [], _('hg paths [NAME]')), |
2417 "^pull": |
2423 "^pull": |
2418 (pull, |
2424 (pull, |
2419 [('u', 'update', None, |
2425 [('u', 'update', None, |
2420 _('update the working directory to tip after pull')), |
2426 _('update the working directory to tip after pull')), |