ChangeSetDiffEntry.st
branchjv
changeset 3074 e38a06f751a5
parent 3069 89d2cfee177f
child 3078 3f5abbdcbde9
--- a/ChangeSetDiffEntry.st	Wed Aug 01 15:21:03 2012 +0100
+++ b/ChangeSetDiffEntry.st	Wed Aug 01 18:38:51 2012 +0100
@@ -338,10 +338,38 @@
 
 !ChangeSetDiffEntry methodsFor:'testing'!
 
+isConflict
+    "Return true, if there is a conflict. For simple two-way diff,
+     conflict is when there are both versionA and versionB and they
+     differ. For three-way diff/merge, conflict is iff the entry is not
+     yet merged"
+
+    ^versionBase isNil ifTrue:[
+        "/two-way diff
+        versionA notNil and:[versionB notNil and:[(versionA sameAs: versionB) not]]
+    ] ifFalse:[
+        self isMerged not
+    ].
+
+    "Created: / 01-08-2012 / 17:10:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 isDiffItem
     ^ true
 !
 
+isForCopyrightMethod
+    "Returns true, if this is an entry for version method"
+
+    | version |
+
+    version := versionA ? versionB.
+    ^version isMethodCodeChange
+        and:[version isForMeta and: [version selector == #copyright]]
+
+    "Created: / 01-08-2012 / 16:39:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 isForVersionMethod
     "Returns true, if this is an entry for version method"
 
@@ -349,7 +377,7 @@
 
     version := versionA ? versionB.
     ^version isMethodCodeChange
-        and:[AbstractSourceCodeManager isVersionMethodSelector: version selector]
+        and:[(AbstractSourceCodeManager isVersionMethodSelector: version selector) or:[AbstractSourceCodeManager isVersionMethodForExtensionsSelector: version selector]]
 
     "Created: / 18-04-2012 / 18:50:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
@@ -371,7 +399,7 @@
 !ChangeSetDiffEntry class methodsFor:'documentation'!
 
 version
-    ^ '$Id: ChangeSetDiffEntry.st 1946 2012-07-31 14:00:47Z vranyj1 $'
+    ^ '$Id: ChangeSetDiffEntry.st 1952 2012-08-01 17:38:51Z vranyj1 $'
 !
 
 version_CVS
@@ -379,5 +407,5 @@
 !
 
 version_SVN
-    ^ '$Id: ChangeSetDiffEntry.st 1946 2012-07-31 14:00:47Z vranyj1 $'
+    ^ '$Id: ChangeSetDiffEntry.st 1952 2012-08-01 17:38:51Z vranyj1 $'
 ! !