mercurial/commands.py
changeset 706 5107a7b6b14a
parent 705 574869103985
child 707 116b2d3f4554
equal deleted inserted replaced
705:574869103985 706:5107a7b6b14a
   762     files.sort()
   762     files.sort()
   763 
   763 
   764     for f in files:
   764     for f in files:
   765         ui.write("%40s %3s %s\n" % (hg.hex(m[f]), mf[f] and "755" or "644", f))
   765         ui.write("%40s %3s %s\n" % (hg.hex(m[f]), mf[f] and "755" or "644", f))
   766 
   766 
   767 def parents(ui, repo, node=None):
   767 def parents(ui, repo, rev=None):
   768     '''show the parents of the current working dir'''
   768     """show the parents of the working dir or revision"""
   769     if node:
   769     if rev:
   770         p = repo.changelog.parents(repo.lookup(hg.bin(node)))
   770         p = repo.changelog.parents(repo.lookup(rev))
   771     else:
   771     else:
   772         p = repo.dirstate.parents()
   772         p = repo.dirstate.parents()
   773 
   773 
   774     for n in p:
   774     for n in p:
   775         if n != hg.nullid:
   775         if n != hg.nullid: