diff test/org/tmatesoft/hg/test/StatusOutputParser.java @ 88:61eedab3eb3e

Status between two revisions to recognize copy/rename
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Wed, 26 Jan 2011 05:46:47 +0100
parents e62f9638fb27
children d55d4eedfc57
line wrap: on
line diff
--- a/test/org/tmatesoft/hg/test/StatusOutputParser.java	Wed Jan 26 01:07:26 2011 +0100
+++ b/test/org/tmatesoft/hg/test/StatusOutputParser.java	Wed Jan 26 05:46:47 2011 +0100
@@ -87,7 +87,7 @@
 				}
 				// last added is copy destination
 				// to get or to remove it - depends on what StatusCollector does in this case
-				copied.put(added.get(added.size() - 1), fname);
+				copied.put(added.get(added.size() - 1), toJavaImplConvention(fname));
 				break;
 			}
 			}
@@ -141,11 +141,15 @@
 		if (l == null) {
 			l = new LinkedList<String>();
 		}
+		l.add(toJavaImplConvention(s));
+		return l;
+	}
+
+	private String toJavaImplConvention(String s) {
 		if (winPathSeparator) {
 			// Java impl always give slashed path, while Hg uses local, os-specific convention
 			s = s.replace('\\', '/'); 
 		}
-		l.add(s);
-		return l;
+		return s;
 	}
 }