Better `hg` command configuration handling and validation.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 21 Feb 2014 10:47:49 +0000
changeset 378 5c36325d6f60
parent 377 b2123fd2888b
child 391 f05648d15add
child 392 be5b0421297e
Better `hg` command configuration handling and validation. `hg` command preference had to be a full path to `hg` binary, though not explicitly stated anywhere. Moreover, settings dialog did not check for this which lead to error later when a command was about execute. `HGCommand` now does a proper validation of configured binary and raises more descriptive errors - see `HGCommand class>>hgCommandValidate:` HGSourceCodeManagementSettingsAppl` also performs these checks and warn user if something's wrong. Thanks to Frank Urbach for spotting this.
mercurial/HGCommand.st
mercurial/HGInvalidExecutableError.st
mercurial/HGInvalidVersionError.st
mercurial/HGSourceCodeManagementSettingsAppl.st
mercurial/HGTests.st
mercurial/Make.proto
mercurial/Make.spec
mercurial/abbrev.stc
mercurial/bc.mak
mercurial/extensions.st
mercurial/libInit.cc
mercurial/mercurial.rc
mercurial/stx_libscm_mercurial.st
--- a/mercurial/HGCommand.st	Tue Feb 18 21:56:01 2014 +0000
+++ b/mercurial/HGCommand.st	Fri Feb 21 10:47:49 2014 +0000
@@ -220,36 +220,38 @@
 !HGCommand class methodsFor:'accessing'!
 
 hgCommand
-    | h |
+    "Returns absolute path to hg executable to use"
 
-    HGExecutable notNil ifTrue:[
-        ^ HGExecutable
-    ].
-    HGExecutable := UserPreferences current hgCommand.
     HGExecutable isNil ifTrue:[
-        OperatingSystem isMSWINDOWSlike ifTrue:[
-            "/        h := Win32OperatingSystem registryEntry
-            "/                key:'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\svn.exe'.
-            "/        h notNil ifTrue:[HGExecutable := h valueNamed:''].
-            "/        HGExecutable notEmptyOrNil ifTrue:[^HGExecutable]
-            HGExecutable := OperatingSystem pathOfCommand:'hg'.
-        ] ifFalse:[
-            OperatingSystem isUNIXlike ifTrue:[
-                HGExecutable := OperatingSystem pathOfCommand:'hg'.
-            ]
+        | executable |
+        executable :=  UserPreferences current hgCommand.
+        executable isNil ifTrue:[ 
+            OperatingSystem isMSWINDOWSlike ifTrue:[
+                "/        | h |
+                "/ 
+                "/        h := Win32OperatingSystem registryEntry
+                "/                key:'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\svn.exe'.
+                "/        h notNil ifTrue:[HGExecutable := h valueNamed:''].
+                "/        HGExecutable notEmptyOrNil ifTrue:[^HGExecutable]
+                executable := OperatingSystem pathOfCommand:'hg'.
+            ] ifFalse:[
+                OperatingSystem isUNIXlike ifTrue:[
+                    executable := OperatingSystem pathOfCommand:'hg'.
+                ]
+            ].
         ].
-    ].
-    HGExecutable isNil ifTrue:[
-        self error:'''hg'' executable not found!!'.
+        executable := self hgCommandValidate: executable.            
+        HGExecutable := executable. 
     ].
     ^ HGExecutable
 
     "
      HGExecutable := nil.
-     self basicNew executable"
+     self basicNew executable
+    "
 
     "Created: / 19-11-2012 / 21:48:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 19-11-2012 / 23:21:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-02-2014 / 08:54:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 hgCommand: command
@@ -264,6 +266,64 @@
     "Modified (comment): / 03-03-2013 / 12:24:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+hgCommandValidate: executable
+    "/ Given a `executable`, checks whether it is a valid hg binary.
+    "/ Returns absolute path to hg binary or raise an
+    "/ HGInvalidExecutableError or HGInvalidVersionError 
+    "/ if `executable` is not valid hg binary.
+    "/ 
+    | path version |
+
+    path := executable asFilename.
+    path isAbsolute ifFalse:[ 
+        path := path asAbsoluteFilename.
+        path exists ifFalse:[ 
+            "/ Also try to find specified command along PATH, maybe somebody
+            "/ just typed 'hg' in...
+            (executable includes: Filename separator) ifFalse:[
+                path  := (OperatingSystem pathOfCommand: executable).
+                path isNil ifTrue:[
+                    HGInvalidExecutableError raiseErrorString:('''hg'' executable (%1) not found!!' bindWith: executable).
+                    ^ nil
+                ].
+                ^ path
+            ].
+        ].
+    ].
+    path exists ifFalse:[
+        HGInvalidExecutableError raiseErrorString:('Specified ''hg'' executable (%1) does not exists!!' bindWith: path pathName).
+        ^ nil
+    ].
+    path isDirectory ifTrue:[ 
+        HGInvalidExecutableError raiseErrorString:('Specified ''hg'' executable (%1) is actually a directory!!' bindWith: path pathName).
+        ^ nil
+    ].
+    path isExecutable ifFalse:[ 
+        HGInvalidExecutableError raiseErrorString:('Specified ''hg'' executable (%1) is cannot be executed!!' bindWith: path pathName).
+        ^ nil
+    ].
+    [ 
+        version := self hgVersionOf: path pathName.  
+    ] on: Error do:[:ex |
+        HGInvalidExecutableError newException
+            parameter: ex;
+            messageText: 'Failed to check version: ', ex description;
+            raise.
+        ^ nil
+    ].
+    (self hgVersionIsSupported: version) ifFalse:[ 
+        HGInvalidVersionError newException
+            parameter: version;
+            messageText: ('Unsuported Mercurial version (%1)' bindWith: (version asStringWith:$.));
+            raise.
+        ^ nil
+    ].
+    ^ path pathName
+
+    "Created: / 21-02-2014 / 08:50:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-02-2014 / 10:31:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 hgVersion
     "Return mercurial version installed on this compiter"
 
@@ -1802,9 +1862,10 @@
 
 arguments
 
-    ^ Array with: HGExecutable with: '--version'
+    ^ Array with: self executable with: '--version'
 
     "Created: / 19-11-2012 / 20:01:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-02-2014 / 00:20:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 parseOutput:stream
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/HGInvalidExecutableError.st	Fri Feb 21 10:47:49 2014 +0000
@@ -0,0 +1,50 @@
+"
+stx:libscm - a new source code management library for Smalltalk/X
+Copyright (C) 2012-2013 Jan Vrany
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License. 
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"
+"{ Package: 'stx:libscm/mercurial' }"
+
+HGCommandError subclass:#HGInvalidExecutableError
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'SCM-Mercurial-Exceptions'
+!
+
+!HGInvalidExecutableError class methodsFor:'documentation'!
+
+copyright
+"
+stx:libscm - a new source code management library for Smalltalk/X
+Copyright (C) 2012-2013 Jan Vrany
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License. 
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"
+! !
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mercurial/HGInvalidVersionError.st	Fri Feb 21 10:47:49 2014 +0000
@@ -0,0 +1,50 @@
+"
+stx:libscm - a new source code management library for Smalltalk/X
+Copyright (C) 2012-2013 Jan Vrany
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License. 
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"
+"{ Package: 'stx:libscm/mercurial' }"
+
+HGCommandError subclass:#HGInvalidVersionError
+	instanceVariableNames:''
+	classVariableNames:''
+	poolDictionaries:''
+	category:'SCM-Mercurial-Exceptions'
+!
+
+!HGInvalidVersionError class methodsFor:'documentation'!
+
+copyright
+"
+stx:libscm - a new source code management library for Smalltalk/X
+Copyright (C) 2012-2013 Jan Vrany
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License. 
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+"
+! !
+
--- a/mercurial/HGSourceCodeManagementSettingsAppl.st	Tue Feb 18 21:56:01 2014 +0000
+++ b/mercurial/HGSourceCodeManagementSettingsAppl.st	Fri Feb 21 10:47:49 2014 +0000
@@ -267,6 +267,7 @@
                                         (FilenameInputFieldSpec
                                            name: 'HGCommand'
                                            layout: (LayoutFrame 125 0 0 0 -100 1 0 1)
+                                           enableChannel: hgEnabled
                                            model: hgCommand
                                            acceptOnPointerLeave: true
                                            emptyFieldReplacementText: 'Autodetect'
@@ -275,9 +276,17 @@
                                            label: 'Test'
                                            name: 'HGCommandTest'
                                            layout: (LayoutFrame -100 1 0 0 -8 1 0 1)
+                                           visibilityChannel: false
                                            translateLabel: true
                                            model: doTestHGCommand
-                                           enableChannel: svnEnabled
+                                         )
+                                        (ActionButtonSpec
+                                           label: 'Browse'
+                                           name: 'BrowseButton'
+                                           layout: (LayoutFrame -100 1 0 0 -8 1 0 1)
+                                           translateLabel: true
+                                           model: doSelectHGCommand
+                                           enableChannel: hgEnabled
                                          )
                                         )
                                       
@@ -291,6 +300,7 @@
                                   (CheckBoxSpec
                                      label: 'Automatically push changes to upstream repository'
                                      name: 'CheckBox2'
+                                     enableChannel: hgEnabled
                                      model: hgAutopush
                                      translateLabel: true
                                      extent: (Point 695 22)
@@ -320,6 +330,7 @@
                                            labelChannel: hgrcAspect
                                            adjust: left
                                            model: doEditHGRC
+                                           enableChannel: hgEnabled
                                          )
                                         (ActionButtonSpec
                                            label: 'Edit'
@@ -327,6 +338,7 @@
                                            layout: (LayoutFrame -106 1 -17 0.5 -6 1 8 0.5)
                                            translateLabel: true
                                            model: doEditHGRC
+                                           enableChannel: hgEnabled
                                          )
                                         )
                                       
@@ -353,8 +365,6 @@
         
        )
      )
-
-    "Modified: / 18-02-2014 / 11:14:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGSourceCodeManagementSettingsAppl class methodsFor:'queries'!
@@ -375,10 +385,11 @@
 
     self doCheckUsername ifFalse:[ ^ self ].
     self doCheckMenuLayout ifFalse:[ ^ self ].    
+    self doCheckCommand ifFalse:[ ^ self ].    
      self infoPanel hide.
 
     "Created: / 18-02-2014 / 10:04:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 18-02-2014 / 11:57:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-02-2014 / 10:32:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 doEditHGRC
@@ -402,6 +413,16 @@
     "Modified: / 18-02-2014 / 10:43:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+doSelectHGCommand
+    | guess executable |
+
+    guess := OperatingSystem pathOfCommand: 'hg'.
+    executable := Dialog requestFileName:(resources string:'Select hg command') default: guess ifFail:[ ^ self ].
+    self hgCommand value: executable
+
+    "Created: / 21-02-2014 / 10:13:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 doTestHGCommand
 
     self hgCommand value isEmptyOrNil ifTrue:[
@@ -441,6 +462,49 @@
 
 !HGSourceCodeManagementSettingsAppl methodsFor:'actions-checks'!
 
+doCheckCommand
+    "Check `hg` command. Return true if `hg` command exists
+     and of supported version, false otherwise."
+
+    | executable |
+
+    executable := self hgCommand value.
+    executable isEmptyOrNil ifTrue:[         
+        executable := OperatingSystem pathOfCommand:'hg'.
+        executable isNil ifTrue:[ 
+            self infoPanel 
+                reset;
+                beWarning;
+                message: (resources string:'Cannot find path to `hg` command');
+                addButtonWithLabel: (self resources string:'Browse') action: [self infoPanel hide. self doSelectHGCommand ];
+                show.            
+            ^ false                
+        ].
+    ].
+    [
+        HGCommand hgCommandValidate: executable 
+    ] on: HGInvalidVersionError do:[:ex | 
+        self infoPanel 
+            reset;
+            beWarning;
+            message: (resources string:'Unssuported Mercurial version %1' with: (ex parameter asStringWith: $.));
+            addButtonWithLabel: (self resources string:'Browse') action: [self infoPanel hide. self doSelectHGCommand ];
+            show.            
+        ^ false                            
+    ] on: HGCommandError do:[:ex |
+        self infoPanel 
+            reset;
+            beWarning;
+            message: (resources string:ex description);
+            addButtonWithLabel: (self resources string:'Browse') action: [self infoPanel hide. self doSelectHGCommand ];
+            show.            
+        ^ false                            
+    ].
+    ^ true.
+
+    "Created: / 21-02-2014 / 09:58:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 doCheckMenuLayout
     "Check if browser SCM menu layouyt is not #old. Return true, if yes,
      false otherwise. As a sideffect, show message in info panel"
@@ -456,14 +520,14 @@
                 (Dialog confirm: (resources string: 'Settings changed to ''Compact''\\Save settings?') withCRs) ifTrue:[ 
                     SettingsDialog saveSettingsWithoutAskingForFile
                 ].
-                self infoPanel hide.
+                self doCheckCommand
             ];
             addButtonWithLabel: (self resources string:'Use ''Inline''') action: [
                 UserPreferences current sourceCodeManagementMenuLayout: #inline.
                 (Dialog confirm: (resources string: 'Settings changed to ''Compact''\\Save settings?') withCRs) ifTrue:[ 
                     SettingsDialog saveSettingsWithoutAskingForFile
                 ].
-                self infoPanel hide.
+                self doCheckCommand
             ];
             addButtonWithLabel: (resources string:'Ignore') action: [IgnoreCheckUsername := true.  self infoPanel hide.];
             show.
@@ -472,6 +536,7 @@
     ^ true.
 
     "Created: / 18-02-2014 / 11:46:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-02-2014 / 10:32:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 doCheckUsername
@@ -515,11 +580,12 @@
 hgCommand
 
     hgCommand isNil ifTrue:[
-        hgCommand := self settingsAspectFor: #hgCommand
+        hgCommand := self settingsAspectFor: #hgCommand.
+        hgCommand onChangeSend: #doCheckCommand to: self.
     ].
     ^ hgCommand
 
-    "Modified: / 19-11-2012 / 21:30:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-02-2014 / 10:33:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 hgDiff2Command
@@ -584,6 +650,14 @@
     "Created: / 18-02-2014 / 10:05:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!HGSourceCodeManagementSettingsAppl methodsFor:'aspects-queries'!
+
+hgEnabled
+    ^ self shownInBrowserMenusHolder
+
+    "Created: / 21-02-2014 / 10:37:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !HGSourceCodeManagementSettingsAppl methodsFor:'helpers'!
 
 settingsAspectFor: settingName
--- a/mercurial/HGTests.st	Tue Feb 18 21:56:01 2014 +0000
+++ b/mercurial/HGTests.st	Fri Feb 21 10:47:49 2014 +0000
@@ -605,6 +605,58 @@
     "Created: / 08-03-2013 / 19:33:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+test_hgCommand
+    "
+    Check whether hg executable is correctly set/found
+    in different setups
+    "
+    | savedHgCommand pathOfHgCommand |
+
+    savedHgCommand := UserPreferences current hgCommand.
+    pathOfHgCommand := OperatingSystem pathOfCommand:'hg'.  
+    [ 
+        HGCommand hgCommand: nil.
+        UserPreferences current hgCommand: '**some**rubbish**'.
+        self should: [ HGCommand new executable ] raise: HGCommandError.
+
+        HGCommand hgCommand: nil.
+        UserPreferences current hgCommand: Filename newTemporary.
+        self should: [ HGCommand new executable ] raise: HGCommandError.
+
+        HGCommand hgCommand: nil.
+        UserPreferences current hgCommand: Filename newTemporaryDirectory.
+        self should: [ HGCommand new executable ] raise: HGCommandError.
+
+        OperatingSystem isUNIXlike ifTrue:[
+            HGCommand hgCommand: nil.
+            UserPreferences current hgCommand: '/bin/ls'.
+            self should: [ HGCommand new executable ] raise: HGCommandError.
+        ].
+
+
+        pathOfHgCommand notNil ifTrue:[
+            HGCommand hgCommand: nil.
+            UserPreferences current hgCommand: pathOfHgCommand.
+            self assert: (HGCommand new executable = pathOfHgCommand).
+
+            HGCommand hgCommand: nil.
+            UserPreferences current hgCommand: pathOfHgCommand asFilename baseName .
+            self assert: (HGCommand new executable = pathOfHgCommand).
+
+            HGCommand hgCommand: nil.
+            UserPreferences current hgCommand: nil.
+            self assert: (HGCommand new executable = pathOfHgCommand).
+        ]
+
+    ] ensure:[ 
+        UserPreferences current hgCommand: savedHgCommand. 
+        HGCommand hgCommand: nil.
+    ].
+
+    "Created: / 20-02-2014 / 23:51:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-02-2014 / 09:49:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 test_remotes_01
     "
     Tests listing og repository remotes (upstream repos)
@@ -637,13 +689,14 @@
 
 test_version
     "
-    Checks for hg version (just that it does not fail
+    Checks for hg version (just that it does not fail)
     "
 
     HGCommand hgVersion.
     HGCommand hgVersionOf: nil
 
     "Created: / 21-01-2013 / 05:22:36 / jv"
+    "Modified (comment): / 20-02-2014 / 23:47:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGTests methodsFor:'tests - node id'!
--- a/mercurial/Make.proto	Tue Feb 18 21:56:01 2014 +0000
+++ b/mercurial/Make.proto	Fri Feb 21 10:47:49 2014 +0000
@@ -204,6 +204,8 @@
 $(OUTDIR)HGRepositoryError.$(O) HGRepositoryError.$(H): HGRepositoryError.st $(INCLUDE_TOP)/stx/libscm/mercurial/HGError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)HGWorkingCopy.$(O) HGWorkingCopy.$(H): HGWorkingCopy.st $(INCLUDE_TOP)/stx/libscm/mercurial/HGRepositoryObject.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)HGCommandParseError.$(O) HGCommandParseError.$(H): HGCommandParseError.st $(INCLUDE_TOP)/stx/libscm/mercurial/HGCommandError.$(H) $(INCLUDE_TOP)/stx/libscm/mercurial/HGError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)HGInvalidExecutableError.$(O) HGInvalidExecutableError.$(H): HGInvalidExecutableError.st $(INCLUDE_TOP)/stx/libscm/mercurial/HGCommandError.$(H) $(INCLUDE_TOP)/stx/libscm/mercurial/HGError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
+$(OUTDIR)HGInvalidVersionError.$(O) HGInvalidVersionError.$(H): HGInvalidVersionError.st $(INCLUDE_TOP)/stx/libscm/mercurial/HGCommandError.$(H) $(INCLUDE_TOP)/stx/libscm/mercurial/HGError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)HGPushError.$(O) HGPushError.$(H): HGPushError.st $(INCLUDE_TOP)/stx/libscm/mercurial/HGRepositoryError.$(H) $(INCLUDE_TOP)/stx/libscm/mercurial/HGError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)HGPushWouldCreateNewHeadError.$(O) HGPushWouldCreateNewHeadError.$(H): HGPushWouldCreateNewHeadError.st $(INCLUDE_TOP)/stx/libscm/mercurial/HGPushError.$(H) $(INCLUDE_TOP)/stx/libscm/mercurial/HGRepositoryError.$(H) $(INCLUDE_TOP)/stx/libscm/mercurial/HGError.$(H) $(INCLUDE_TOP)/stx/libbasic/Error.$(H) $(INCLUDE_TOP)/stx/libbasic/Exception.$(H) $(INCLUDE_TOP)/stx/libbasic/GenericException.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)/stx/libbasic/ByteArray.$(H) $(INCLUDE_TOP)/stx/libbasic/UninterpretedBytes.$(H) $(INCLUDE_TOP)/stx/libbasic/ArrayedCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/SequenceableCollection.$(H) $(INCLUDE_TOP)/stx/libbasic/Collection.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/Integer.$(H) $(INCLUDE_TOP)/stx/libbasic/Number.$(H) $(INCLUDE_TOP)/stx/libbasic/ArithmeticValue.$(H) $(INCLUDE_TOP)/stx/libbasic/Magnitude.$(H) $(INCLUDE_TOP)/stx/libbasic/String.$(H) $(INCLUDE_TOP)/stx/libbasic/CharacterArray.$(H) $(INCLUDE_TOP)/stx/libbasic/UserPreferences.$(H) $(INCLUDE_TOP)/stx/libbasic/IdentityDictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Dictionary.$(H) $(INCLUDE_TOP)/stx/libbasic/Set.$(H) $(INCLUDE_TOP)/stx/libbasic/Annotation.$(H) $(INCLUDE_TOP)/stx/libbasic/ProjectDefinition.$(H) $(INCLUDE_TOP)/stx/libtool/Tools__NewSystemBrowser.$(H) $(INCLUDE_TOP)/stx/libtool/SystemBrowser.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libtool/AbstractFileBrowser.$(H) $(INCLUDE_TOP)/stx/libbasic/ConfigurableFeatures.$(H) $(STCHDR)
--- a/mercurial/Make.spec	Tue Feb 18 21:56:01 2014 +0000
+++ b/mercurial/Make.spec	Fri Feb 21 10:47:49 2014 +0000
@@ -90,6 +90,8 @@
 	HGRepositoryError \
 	HGWorkingCopy \
 	HGCommandParseError \
+	HGInvalidExecutableError \
+	HGInvalidVersionError \
 	HGPushError \
 	HGPushWouldCreateNewHeadError \
 
@@ -137,6 +139,8 @@
     $(OUTDIR_SLASH)HGRepositoryError.$(O) \
     $(OUTDIR_SLASH)HGWorkingCopy.$(O) \
     $(OUTDIR_SLASH)HGCommandParseError.$(O) \
+    $(OUTDIR_SLASH)HGInvalidExecutableError.$(O) \
+    $(OUTDIR_SLASH)HGInvalidVersionError.$(O) \
     $(OUTDIR_SLASH)HGPushError.$(O) \
     $(OUTDIR_SLASH)HGPushWouldCreateNewHeadError.$(O) \
     $(OUTDIR_SLASH)extensions.$(O) \
--- a/mercurial/abbrev.stc	Tue Feb 18 21:56:01 2014 +0000
+++ b/mercurial/abbrev.stc	Fri Feb 21 10:47:49 2014 +0000
@@ -47,5 +47,7 @@
 HGTests HGTests stx:libscm/mercurial 'SCM-Mercurial-Tests' 1
 HGWorkingCopy HGWorkingCopy stx:libscm/mercurial 'SCM-Mercurial-Core' 0
 HGCommandParseError HGCommandParseError stx:libscm/mercurial 'SCM-Mercurial-Exceptions' 1
+HGInvalidExecutableError HGInvalidExecutableError stx:libscm/mercurial 'SCM-Mercurial-Exceptions' 1
+HGInvalidVersionError HGInvalidVersionError stx:libscm/mercurial 'SCM-Mercurial-Exceptions' 1
 HGPushError HGPushError stx:libscm/mercurial 'SCM-Mercurial-Exceptions' 1
 HGPushWouldCreateNewHeadError HGPushWouldCreateNewHeadError stx:libscm/mercurial 'SCM-Mercurial-Exceptions' 1
--- a/mercurial/bc.mak	Tue Feb 18 21:56:01 2014 +0000
+++ b/mercurial/bc.mak	Fri Feb 21 10:47:49 2014 +0000
@@ -135,6 +135,8 @@
 $(OUTDIR)HGRepositoryError.$(O) HGRepositoryError.$(H): HGRepositoryError.st $(INCLUDE_TOP)\stx\libscm\mercurial\HGError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)HGWorkingCopy.$(O) HGWorkingCopy.$(H): HGWorkingCopy.st $(INCLUDE_TOP)\stx\libscm\mercurial\HGRepositoryObject.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)HGCommandParseError.$(O) HGCommandParseError.$(H): HGCommandParseError.st $(INCLUDE_TOP)\stx\libscm\mercurial\HGCommandError.$(H) $(INCLUDE_TOP)\stx\libscm\mercurial\HGError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)HGInvalidExecutableError.$(O) HGInvalidExecutableError.$(H): HGInvalidExecutableError.st $(INCLUDE_TOP)\stx\libscm\mercurial\HGCommandError.$(H) $(INCLUDE_TOP)\stx\libscm\mercurial\HGError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
+$(OUTDIR)HGInvalidVersionError.$(O) HGInvalidVersionError.$(H): HGInvalidVersionError.st $(INCLUDE_TOP)\stx\libscm\mercurial\HGCommandError.$(H) $(INCLUDE_TOP)\stx\libscm\mercurial\HGError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)HGPushError.$(O) HGPushError.$(H): HGPushError.st $(INCLUDE_TOP)\stx\libscm\mercurial\HGRepositoryError.$(H) $(INCLUDE_TOP)\stx\libscm\mercurial\HGError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)HGPushWouldCreateNewHeadError.$(O) HGPushWouldCreateNewHeadError.$(H): HGPushWouldCreateNewHeadError.st $(INCLUDE_TOP)\stx\libscm\mercurial\HGPushError.$(H) $(INCLUDE_TOP)\stx\libscm\mercurial\HGRepositoryError.$(H) $(INCLUDE_TOP)\stx\libscm\mercurial\HGError.$(H) $(INCLUDE_TOP)\stx\libbasic\Error.$(H) $(INCLUDE_TOP)\stx\libbasic\Exception.$(H) $(INCLUDE_TOP)\stx\libbasic\GenericException.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)extensions.$(O): extensions.st $(INCLUDE_TOP)\stx\libbasic\ByteArray.$(H) $(INCLUDE_TOP)\stx\libbasic\UninterpretedBytes.$(H) $(INCLUDE_TOP)\stx\libbasic\ArrayedCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\SequenceableCollection.$(H) $(INCLUDE_TOP)\stx\libbasic\Collection.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\Integer.$(H) $(INCLUDE_TOP)\stx\libbasic\Number.$(H) $(INCLUDE_TOP)\stx\libbasic\ArithmeticValue.$(H) $(INCLUDE_TOP)\stx\libbasic\Magnitude.$(H) $(INCLUDE_TOP)\stx\libbasic\String.$(H) $(INCLUDE_TOP)\stx\libbasic\CharacterArray.$(H) $(INCLUDE_TOP)\stx\libbasic\UserPreferences.$(H) $(INCLUDE_TOP)\stx\libbasic\IdentityDictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Dictionary.$(H) $(INCLUDE_TOP)\stx\libbasic\Set.$(H) $(INCLUDE_TOP)\stx\libbasic\Annotation.$(H) $(INCLUDE_TOP)\stx\libbasic\ProjectDefinition.$(H) $(INCLUDE_TOP)\stx\libtool\Tools__NewSystemBrowser.$(H) $(INCLUDE_TOP)\stx\libtool\SystemBrowser.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libtool\AbstractFileBrowser.$(H) $(INCLUDE_TOP)\stx\libbasic\ConfigurableFeatures.$(H) $(STCHDR)
--- a/mercurial/extensions.st	Tue Feb 18 21:56:01 2014 +0000
+++ b/mercurial/extensions.st	Fri Feb 21 10:47:49 2014 +0000
@@ -1212,7 +1212,7 @@
     "Set the command to 'hg' executable"
 
     self at:#hgCommand put: aString.
-    HGCommand hgCommand: aString.
+    HGCommand hgCommand: nil.
 
     "
         UserPreferences current hgCommand
@@ -1221,6 +1221,7 @@
     "
 
     "Created: / 19-11-2012 / 21:39:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-02-2014 / 00:10:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !stx_libscm_mercurial class methodsFor:'documentation'!
--- a/mercurial/libInit.cc	Tue Feb 18 21:56:01 2014 +0000
+++ b/mercurial/libInit.cc	Fri Feb 21 10:47:49 2014 +0000
@@ -67,6 +67,8 @@
 _HGRepositoryError_Init(pass,__pRT__,snd);
 _HGWorkingCopy_Init(pass,__pRT__,snd);
 _HGCommandParseError_Init(pass,__pRT__,snd);
+_HGInvalidExecutableError_Init(pass,__pRT__,snd);
+_HGInvalidVersionError_Init(pass,__pRT__,snd);
 _HGPushError_Init(pass,__pRT__,snd);
 _HGPushWouldCreateNewHeadError_Init(pass,__pRT__,snd);
 
--- a/mercurial/mercurial.rc	Tue Feb 18 21:56:01 2014 +0000
+++ b/mercurial/mercurial.rc	Fri Feb 21 10:47:49 2014 +0000
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "Copyright Jan Vrany 2012\0"
       VALUE "ProductName", "Smalltalk/X Mercurial Integration\0"
       VALUE "ProductVersion", "6.2.3.0\0"
-      VALUE "ProductDate", "Fri, 29 Nov 2013 20:40:37 GMT\0"
+      VALUE "ProductDate", "Fri, 21 Feb 2014 10:40:58 GMT\0"
     END
 
   END
--- a/mercurial/stx_libscm_mercurial.st	Tue Feb 18 21:56:01 2014 +0000
+++ b/mercurial/stx_libscm_mercurial.st	Fri Feb 21 10:47:49 2014 +0000
@@ -223,6 +223,8 @@
         (HGTests autoload)
         HGWorkingCopy
         HGCommandParseError
+        HGInvalidExecutableError
+        HGInvalidVersionError
         HGPushError
         HGPushWouldCreateNewHeadError
     )