--- a/mercurial/HGRepository.st Tue Mar 01 19:55:28 2016 +0000
+++ b/mercurial/HGRepository.st Tue Mar 22 20:10:39 2016 +0000
@@ -143,6 +143,7 @@
"Created: / 14-11-2012 / 22:46:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
"Modified: / 21-11-2012 / 00:20:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified (comment): / 25-03-2016 / 17:27:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
clone: aFilenameOrUrlOrString to: aStringOrFilename update: update
@@ -862,6 +863,35 @@
!HGRepository methodsFor:'testing'!
+hasExtension: extension
+ "Return true, if the repository has `extension` enabled, false otherwise"
+
+ | extensions value |
+
+ extensions := self config get: 'extensions' default: nil.
+ extensions notNil ifTrue:[
+ value := extensions get: extension default: 0.
+ value ~~ 0 ifTrue:[
+ ^value isEmptyOrNil or:[ value asFilename exists ]
+ ].
+ ].
+ ^ false
+
+ "
+ (HGRepository on: (Smalltalk getPackageDirectoryForPackage: #'stx:libscm')) hasExtension: 'evolve'
+ "
+
+ "Created: / 16-03-2016 / 23:56:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+hasExtensionEvolve
+ "Return true, if evolve extension is enabled on the receiver"
+
+ ^ self hasExtension:'evolve'
+
+ "Created: / 16-03-2016 / 23:57:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
isShared
"Return true, if this repository is shared, i.e., created by means
of `hg share`"
@@ -994,10 +1024,13 @@
non-lazy"
| csets cs |
- csets := self repository execute:
+ csets := repository execute:
(HGCommand log
workingDirectory: repository path asString;
revsets: (self loadRevsetsForLoad: id);
+ hidden: true; "/ Hidden changeset are supported since 2.5, but
+ "/ the HGCommand::log cares of this itself, so it's
+ "/ safe to pass true here.
yourself).
"/just to be defensive...
csets do:[:each|
@@ -1020,7 +1053,7 @@
^cs
"Created: / 16-12-2012 / 00:57:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
- "Modified: / 03-03-2013 / 22:58:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+ "Modified: / 25-03-2016 / 17:26:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
!
loadRevsetsForLoad: id