##// END OF EJS Templates
Fix hg cat when the file cannot be found in the specified revision
Mikael Berthe -
r1242:4a6efec8 default
parent child Browse files
Show More
@@ -579,8 +579,11 b' def cat(ui, repo, file1, rev=None, **opt'
579 579 change = repo.changelog.read(n)
580 580 m = repo.manifest.read(change[0])
581 581 n = m[relpath(repo, [file1])[0]]
582 except hg.RepoError, KeyError:
583 n = r.lookup(rev)
582 except (hg.RepoError, KeyError):
583 try:
584 n = r.lookup(rev)
585 except KeyError, inst:
586 raise util.Abort('cannot find file %s in rev %s', file1, rev)
584 587 else:
585 588 n = r.tip()
586 589 fp = make_file(repo, r, opts['output'], node=n)
General Comments 0
You need to be logged in to leave comments. Login now