diff src/org/tmatesoft/hg/core/HgLogCommand.java @ 253:1874d11054e5

HgLogCommand.changeset(Nodeid) to ease command configuration
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 15 Aug 2011 18:59:05 +0200
parents 9ef71bd26db1
children 6d1804fe0ed7
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgLogCommand.java	Mon Aug 15 18:51:41 2011 +0200
+++ b/src/org/tmatesoft/hg/core/HgLogCommand.java	Mon Aug 15 18:59:05 2011 +0200
@@ -142,6 +142,18 @@
 	}
 	
 	/**
+	 * Select specific changeset
+	 * 
+	 * @param nid changeset revision
+	 * @return <code>this</code> for convenience
+	 */
+	public HgLogCommand changeset(Nodeid nid) {
+		// XXX perhaps, shall support multiple (...) arguments and extend #execute to handle not only range, but also set of revisions.
+		final int csetLocal = repo.getChangelog().getLocalRevision(nid);
+		return range(csetLocal, csetLocal);
+	}
+	
+	/**
 	 * Visit history of a given file only.
 	 * @param file path relative to repository root. Pass <code>null</code> to reset.
 	 * @param followCopyRename true to report changesets of the original file(-s), if copy/rename ever occured to the file.