Mercurial > hg
changeset 6536:dfdef3d560a8
cmdutil: handle and warn about missing copy revisions
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 14 Apr 2008 22:31:33 +0200 |
parents | 93e140dbcd44 |
children | b6a24c273c30 |
files | mercurial/cmdutil.py |
diffstat | 1 files changed, 9 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/cmdutil.py Mon Apr 14 22:31:33 2008 +0200 +++ b/mercurial/cmdutil.py Mon Apr 14 22:31:33 2008 +0200 @@ -1018,11 +1018,16 @@ minrev, maxrev = min(revs), max(revs) for file_, node in iterfiles(): filelog = repo.file(file_) - # A zero count may be a directory or deleted file, so - # try to find matching entries on the slow path. if filelog.count() == 0: - slowpath = True - break + if node is None: + # A zero count may be a directory or deleted file, so + # try to find matching entries on the slow path. + slowpath = True + break + else: + ui.warn(_('%s:%s copy source revision cannot be found!\n') + % (file_, short(node))) + continue for rev, copied in filerevgen(filelog, node): if rev <= maxrev: if rev < minrev: