Mercurial > hg
changeset 1242:4a6efec8b698
Fix hg cat when the file cannot be found in the specified revision
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Wed, 14 Sep 2005 12:35:10 -0500 |
parents | 3b4f05ff3130 |
children | 9d10f89b75a5 |
files | mercurial/commands.py |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Sep 14 12:22:20 2005 -0500 +++ b/mercurial/commands.py Wed Sep 14 12:35:10 2005 -0500 @@ -579,8 +579,11 @@ 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)