mercurial/revset.py
changeset 12733 098dfb2b7596
parent 12716 c7e619e30ba3
child 12736 7e14e67e6622
equal deleted inserted replaced
12732:4bca87c29445 12733:098dfb2b7596
   172     raise error.ParseError(_("not a function: %s") % a[1])
   172     raise error.ParseError(_("not a function: %s") % a[1])
   173 
   173 
   174 # functions
   174 # functions
   175 
   175 
   176 def node(repo, subset, x):
   176 def node(repo, subset, x):
   177     l = getargs(x, 1, 1, _("rev wants one argument"))
   177     l = getargs(x, 1, 1, _("id wants one argument"))
   178     n = getstring(l[0], _("rev wants a string"))
   178     n = getstring(l[0], _("id wants a string"))
   179     if len(n) == 40:
   179     if len(n) == 40:
   180         rn = repo[n].rev()
   180         rn = repo[n].rev()
   181     else:
   181     else:
   182         rn = repo.changelog.rev(repo.changelog._partialmatch(n))
   182         rn = repo.changelog.rev(repo.changelog._partialmatch(n))
   183     return [r for r in subset if r == rn]
   183     return [r for r in subset if r == rn]