Show More
@@ -455,7 +455,14 b' def cat(ui, repo, file1, rev=None, **opt' | |||||
455 | """output the latest or given revision of a file""" |
|
455 | """output the latest or given revision of a file""" | |
456 | r = repo.file(relpath(repo, [file1])[0]) |
|
456 | r = repo.file(relpath(repo, [file1])[0]) | |
457 | if rev: |
|
457 | if rev: | |
458 | n = r.lookup(rev) |
|
458 | try: | |
|
459 | # assume all revision numbers are for changesets | |||
|
460 | n = repo.lookup(rev) | |||
|
461 | change = repo.changelog.read(n) | |||
|
462 | m = repo.manifest.read(change[0]) | |||
|
463 | n = m[relpath(repo, [file1])[0]] | |||
|
464 | except hg.RepoError, KeyError: | |||
|
465 | n = r.lookup(rev) | |||
459 | else: |
|
466 | else: | |
460 | n = r.tip() |
|
467 | n = r.tip() | |
461 | fp = make_file(repo, r, opts['output'], node=n) |
|
468 | fp = make_file(repo, r, opts['output'], node=n) |
General Comments 0
You need to be logged in to leave comments.
Login now