author | Mikael Berthe <mikael@lilotux.net> |
Wed, 14 Sep 2005 12:35:10 -0500 | |
changeset 1242 | 4a6efec8b698 |
parent 1241 | 3b4f05ff3130 |
child 1243 | 9d10f89b75a5 |
--- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -579,8 +579,11 @@ def cat(ui, repo, file1, rev=None, **opt change = repo.changelog.read(n) m = repo.manifest.read(change[0]) n = m[relpath(repo, [file1])[0]] - except hg.RepoError, KeyError: - n = r.lookup(rev) + except (hg.RepoError, KeyError): + try: + n = r.lookup(rev) + except KeyError, inst: + raise util.Abort('cannot find file %s in rev %s', file1, rev) else: n = r.tip() fp = make_file(repo, r, opts['output'], node=n)