mercurial/cmdutil.py
branchstable
changeset 16165 60101427d618
parent 16108 f7e0d95d0a0b
child 16283 6c4dbe28dda3
equal deleted inserted replaced
16164:18743c4d1989 16165:60101427d618
  1022                 revs.append((linkrev, parentlinkrevs,
  1022                 revs.append((linkrev, parentlinkrevs,
  1023                              follow and filelog.renamed(n)))
  1023                              follow and filelog.renamed(n)))
  1024 
  1024 
  1025             return reversed(revs)
  1025             return reversed(revs)
  1026         def iterfiles():
  1026         def iterfiles():
       
  1027             pctx = repo['.']
  1027             for filename in match.files():
  1028             for filename in match.files():
  1028                 yield filename, None
  1029                 if follow:
       
  1030                     if filename not in pctx:
       
  1031                         raise util.Abort(_('cannot follow file not in parent '
       
  1032                                            'revision: "%s"') % filename)
       
  1033                     yield filename, pctx[filename].filenode()
       
  1034                 else:
       
  1035                     yield filename, None
  1029             for filename_node in copies:
  1036             for filename_node in copies:
  1030                 yield filename_node
  1037                 yield filename_node
  1031         for file_, node in iterfiles():
  1038         for file_, node in iterfiles():
  1032             filelog = repo.file(file_)
  1039             filelog = repo.file(file_)
  1033             if not len(filelog):
  1040             if not len(filelog):