diff src/org/tmatesoft/hg/repo/HgDataFile.java @ 571:e4ee4bf4c7d0

Let session context control creation of Path instances
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Thu, 11 Apr 2013 16:27:06 +0200
parents abfbe81154b5
children 46f29b73e51e
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/repo/HgDataFile.java	Thu Apr 11 16:07:17 2013 +0200
+++ b/src/org/tmatesoft/hg/repo/HgDataFile.java	Thu Apr 11 16:27:06 2013 +0200
@@ -401,7 +401,8 @@
 	 */
 	public Path getCopySourceName() throws HgRuntimeException {
 		if (isCopy()) {
-			return Path.create(metadata.find(0, "copy"));
+			Path.Source ps = getRepo().getSessionContext().getPathFactory();
+			return ps.path(metadata.find(0, "copy"));
 		}
 		throw new UnsupportedOperationException(); // XXX REVISIT, think over if Exception is good (clients would check isCopy() anyway, perhaps null is sufficient?)
 	}