changeset 125:26ad21b250e4

Explicit op to tell merge revisions
author Artem Tikhomirov <tikhomirov.artem@gmail.com>
date Tue, 15 Feb 2011 06:40:36 +0100
parents cea84c5995e6
children b92a638764be
files src/org/tmatesoft/hg/core/Cset.java src/org/tmatesoft/hg/core/Nodeid.java
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/org/tmatesoft/hg/core/Cset.java	Tue Feb 15 06:30:05 2011 +0100
+++ b/src/org/tmatesoft/hg/core/Cset.java	Tue Feb 15 06:40:36 2011 +0100
@@ -117,7 +117,9 @@
 		return deletedFiles;
 	}
 
-	// XXX do I need boolean isMergeRevision()?
+	public boolean isMerge() {
+		return !Nodeid.NULL.equals(getSecondParentRevision());
+	}
 	
 	public Nodeid getFirstParentRevision() {
 		// XXX may read once for both p1 and p2 
--- a/src/org/tmatesoft/hg/core/Nodeid.java	Tue Feb 15 06:30:05 2011 +0100
+++ b/src/org/tmatesoft/hg/core/Nodeid.java	Tue Feb 15 06:40:36 2011 +0100
@@ -62,7 +62,7 @@
 	@Override
 	public boolean equals(Object o) {
 		if (o instanceof Nodeid) {
-			return Arrays.equals(this.binaryData, ((Nodeid) o).binaryData);
+			return this == o || equalsTo(((Nodeid) o).binaryData);
 		}
 		return false;
 	}