Mercurial > jhg
diff src/org/tmatesoft/hg/core/HgCatCommand.java @ 248:3fbfce107f94
Issue 8: Means to find out information about given file at specific changeset. Inner ManifestRevisionInspector got promoted to ManifestRevision
author | Artem Tikhomirov <tikhomirov.artem@gmail.com> |
---|---|
date | Fri, 12 Aug 2011 18:48:57 +0200 |
parents | 6e1373b54e9b |
children | d68dcb3b5f49 |
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgCatCommand.java Fri Aug 12 17:17:37 2011 +0200 +++ b/src/org/tmatesoft/hg/core/HgCatCommand.java Fri Aug 12 18:48:57 2011 +0200 @@ -98,6 +98,16 @@ cset = null; return this; } + + /** + * Parameterize the command from file revision object. + * + * @param fileRev file revision to cat + * @return <code>this</code> for convenience + */ + public HgCatCommand revision(HgFileRevision fileRev) { + return file(fileRev.getPath()).revision(fileRev.getRevision()); + } /** * Select whatever revision of the file that was actual at the time of the specified changeset. Unlike {@link #revision(int)} or {@link #revision(Nodeid)}, this method @@ -152,7 +162,7 @@ } } while (toExtract == null); if (toExtract == null) { - throw new HgBadStateException(String.format("File %s not its origins were not known at repository %s revision", file, cset.shortNotation())); + throw new HgBadStateException(String.format("File %s nor its origins were not known at repository %s revision", file, cset.shortNotation())); } revToExtract = dataFile.getLocalRevision(toExtract); } else if (revision != null) {