# HG changeset patch # User Thomas Arendsen Hein # Date 1121412765 -3600 # Node ID 5107a7b6b14a78b68e0cf7096a43a3ad5707b6fe # Parent 57486910398547b25eb80db55e5630ad0ae00779 Make "hg parents REV" work (again?) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Make "hg parents REV" work (again?) manifest hash: d14db0d23b539ad0b754a51a83926d14f1be9a6e -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFC12adW7P1GVgWeRoRAtknAJ9TeUybLWYWY+Bi2b5grmAspgfemwCeP9cd 6mYSTWIsovCqW59KIrEvVVo= =u5nR -----END PGP SIGNATURE----- diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -764,10 +764,10 @@ def manifest(ui, repo, rev=None): for f in files: ui.write("%40s %3s %s\n" % (hg.hex(m[f]), mf[f] and "755" or "644", f)) -def parents(ui, repo, node=None): - '''show the parents of the current working dir''' - if node: - p = repo.changelog.parents(repo.lookup(hg.bin(node))) +def parents(ui, repo, rev=None): + """show the parents of the working dir or revision""" + if rev: + p = repo.changelog.parents(repo.lookup(rev)) else: p = repo.dirstate.parents()