diff src/org/tmatesoft/hg/core/HgChangesetTreeHandler.java @ 515:e6c8b9b654b2

Provide access to HgDataFile being iterated into HgChangesetTreeHandler.TreeElement to give context for renamed files
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Mon, 17 Dec 2012 20:51:12 +0100
parents a6435c1a42d0
children 6526d8adbc0f
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/HgChangesetTreeHandler.java	Mon Dec 17 19:06:07 2012 +0100
+++ b/src/org/tmatesoft/hg/core/HgChangesetTreeHandler.java	Mon Dec 17 20:51:12 2012 +0100
@@ -19,6 +19,7 @@
 import java.util.Collection;
 
 import org.tmatesoft.hg.internal.Callback;
+import org.tmatesoft.hg.repo.HgDataFile;
 import org.tmatesoft.hg.util.Pair;
 
 /**
@@ -45,6 +46,17 @@
 		 * @return revision of the revlog being iterated.
 		 */
 		public Nodeid fileRevision();
+		
+		/**
+		 * File node, provided revlog being iterated is a {@link HgDataFile}; {@link #fileRevision()} 
+		 * references revision from the history of this very {@link HgDataFile file}.
+		 * 
+		 * Comes handy when file history with renames is being followed to find out 
+		 * file name for particular revision in the history.
+		 * 
+		 * @return instance of the file being walked, or <code>null</code> if it's not a file but other revlog.
+		 */
+		public HgDataFile file();
 
 		/**
 		 * @return changeset associated with the current file revision