Command server is now used by default. hg-command-server-support
authorJan Vrany <jan.vrany@fit.cvut.cz>
Sun, 03 Mar 2013 23:58:51 +0000
branchhg-command-server-support
changeset 235 3d8ef499d7d9
parent 234 a9ef61b902ae
child 236 24c5758b489f
Command server is now used by default. All HGTests exept 2 passes. Further invesitgation on those two is required.
mercurial/HGChangeset.st
mercurial/HGCommand.st
mercurial/HGCommandServer.st
mercurial/HGCommitDialog.st
mercurial/HGMergeTool.st
mercurial/HGRepository.st
mercurial/HGTests.st
mercurial/HGWorkingCopy.st
mercurial/HGWorkingCopyFile.st
mercurial/Make.proto
mercurial/bc.mak
mercurial/mercurial.rc
--- a/mercurial/HGChangeset.st	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/HGChangeset.st	Sun Mar 03 23:58:51 2013 +0000
@@ -143,17 +143,19 @@
     | ids |
 
     self ensureNotLazy.
-    ids := HGCommand log
-            workingDirectory: repository pathName;
-            childrenOnly: true;
-            revset: id revno printString;
-            executeOnRepository: self repository.
+    ids := self repository execute:
+            (HGCommand log
+                workingDirectory: repository pathName;
+                childrenOnly: true;
+                revset: id revno printString;
+                yourself).
+
     self assert: ids size == 1.
     self assert: ids first first = id.
     ^ids first second collect:[:e|repository changesetWithId: e].
 
     "Created: / 05-12-2012 / 17:31:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:36:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:09:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 construct: name
--- a/mercurial/HGCommand.st	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/HGCommand.st	Sun Mar 03 23:58:51 2013 +0000
@@ -459,12 +459,12 @@
 
 !HGCommand methodsFor:'accessing'!
 
-blocker
-    ^ blocker
-!
+repository: anHGRepository
+    workingDirectory isNil ifTrue:[
+        workingDirectory := anHGRepository pathName
+    ].
 
-errors
-    ^ errors
+    "Created: / 03-03-2013 / 23:10:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 result
@@ -493,6 +493,24 @@
     "Modified: / 01-10-2012 / 14:38:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!HGCommand methodsFor:'accessing-internal'!
+
+blocker
+    ^ blocker
+!
+
+errorReader
+    ^ errorReader
+!
+
+errors
+    ^ errors
+!
+
+outputReader
+    ^ outputReader
+! !
+
 !HGCommand methodsFor:'error reporting'!
 
 propagate: anException
--- a/mercurial/HGCommandServer.st	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/HGCommandServer.st	Sun Mar 03 23:58:51 2013 +0000
@@ -99,19 +99,23 @@
     anHGCommand initialize.
     blocker := command blocker.
 
+    anHGCommand repository: repository.
     self runcommand: command.
 
     anHGCommand spawn: [ 
         status := OperatingSystem osProcessStatusClass pid:nil status: #exit code: channel_r nextLongNet core:false.
-        Tracing ifTrue:[
-            Logger log: 'cmdserver: result code reader finished' severity: #trace facility: 'HG'.
-        ].
+
         channel_e close.
         channel_o close.
+        command outputReader isNil ifTrue:[
+            blocker signal
+        ].
+        command errorReader isNil ifTrue:[
+            blocker signal
+        ].
         Tracing ifTrue:[
-            Logger log: 'cmdserver: result code reader finished' severity: #trace facility: 'HG'.
+            Logger log: 'cmdsrv: command finished' severity: #trace facility: 'HG'.
         ].
-        blocker signal.
     ] name: 'command server result reader'.
     spin := SemaphoreSet with: blocker with: anHGCommand errors readSemaphore.
 
@@ -127,7 +131,7 @@
     ^anHGCommand status: status result: anHGCommand result
 
     "Created: / 24-02-2013 / 15:10:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 19:50:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:51:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGCommandServer methodsFor:'initialization'!
@@ -161,14 +165,14 @@
     ^{
         HGCommand hgCommand .
 "/        '--debug' . '--verbose'.
-        '--repository' . repository pathName .
+        '--cwd' . repository pathName .
         '--config' . 'ui.interactive=True' .
         'serve' .
         '--cmdserver' . 'pipe' .
     }
 
     "Created: / 24-02-2013 / 12:02:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 12:21:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:12:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 channelWithId: channelId
@@ -205,7 +209,7 @@
 
     state := #connecting.
     Tracing ifTrue:[
-        Logger log: 'cmdserver: connecting...' severity: #trace facility: 'HG'.
+        Logger log: 'cmdsrv: connecting...' severity: #trace facility: 'HG'.
     ].
     label := channel_o next: 13.
     label = 'capabilities:' ifFalse:[
@@ -219,11 +223,11 @@
     encoder := CharacterEncoder encoderFor: (channel_o nextAvailable: 1000).
     state := #connected.
     Tracing ifTrue:[
-        Logger log: 'cmdserver: connected...' severity: #trace facility: 'HG'.
+        Logger log: 'cmdsrv: connected...' severity: #trace facility: 'HG'.
     ].
 
     "Created: / 24-02-2013 / 12:19:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 12:10:43 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:25:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 runcommand: anHGCommand
@@ -232,6 +236,9 @@
     | args argslen |
 
     args := OrderedCollection streamContents:[:s|
+        anHGCommand workingDirectory notNil ifTrue:[
+            s nextPut: '--cwd'; nextPut: anHGCommand workingDirectory.
+        ].
         anHGCommand argumentsGlobalOn:s.
         s nextPut:anHGCommand command.
         anHGCommand argumentsCommandOn:s.
@@ -241,11 +248,16 @@
     output 
         nextPutLine:'runcommand';
         nextPutLongNet: argslen.
+
+    Tracing ifTrue:[
+            Logger log: 'cmdsrv: runcommand: ' , (args asStringWith:Character space)  severity: #trace facility: 'HG'.
+    ].
     args 
         do:[:e|output nextPutAll: (encoder encodeString: e)]
         separatedBy:[output nextPut: (Character codePoint: 0)].
 
     "Created: / 03-03-2013 / 16:38:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:46:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 startReaderWriter
@@ -348,12 +360,12 @@
                 newPgrp:false
                 inDirectory: Filename currentDirectory pathName.
         Tracing ifTrue:[
-            Logger log: 'cmdserver: server started' severity: #trace facility: 'HG'.
+            Logger log: 'cmdsrv: server started' severity: #trace facility: 'HG'.
         ].
         pid.
     ] action:[:stat |
         Tracing ifTrue:[
-            Logger log: 'cmdserver: server terminated' severity: #trace facility: 'HG'.
+            Logger log: 'cmdsrv: server terminated' severity: #trace facility: 'HG'.
         ].
     ].
 
@@ -372,7 +384,7 @@
     self connect.
 
     "Created: / 24-02-2013 / 11:40:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 14:15:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:25:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 stop
@@ -505,11 +517,11 @@
 
 trace: message
     HGCommandServer trace ifTrue:[
-        Logger log: ('cmserver-ichannel[', id, '] {', Processor activeProcess id printString, '}: ', message) severity: #trace facility: 'HG'.
+        Logger log: ('cmdsrv-ichannel[', id, '] {', Processor activeProcess id printString, '}: ', message) severity: #trace facility: 'HG'.
     ]
 
     "Created: / 03-03-2013 / 18:06:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 19:34:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:19:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGCommandServer::InputChannel methodsFor:'reading'!
--- a/mercurial/HGCommitDialog.st	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/HGCommitDialog.st	Sun Mar 03 23:58:51 2013 +0000
@@ -569,9 +569,11 @@
     wcrootPathNameRelative := wcroot pathNameRelative.
     wcrootPathNameRelativeLen := wcrootPathNameRelative size.
 
-    statuses := HGCommand status
-                    workingDirectory: wcroot pathName;
-                    execute.
+    statuses := self task temporaryWorkingCopy repository execute:
+                    (HGCommand status
+                        workingDirectory: wcroot pathName;
+                        yourself).
+
     entries := OrderedCollection new: statuses size.
     statuses do:[:statusAndPath|
         (fileListShowOnlyModifiedHolder value not
@@ -591,7 +593,7 @@
     self fileListHolder value: entries
 
     "Created: / 08-02-2012 / 18:05:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 12-01-2013 / 13:58:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:08:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGCommitDialog methodsFor:'private'!
--- a/mercurial/HGMergeTool.st	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/HGMergeTool.st	Sun Mar 03 23:58:51 2013 +0000
@@ -179,12 +179,13 @@
     "Runs a merge on file. Return true, if file conflicts had been
      resolved, false otherwise"
 
-    ^HGCommand resolve
-        workingDirectory: file directory pathName;
-        files: (Array with: file baseName);
-        execute
+    ^file workingCopy repository execute: 
+        (HGCommand resolve
+            workingDirectory: file directory pathName;
+            files: (Array with: file baseName);
+            yourself)
 
-    "Modified: / 14-01-2013 / 20:57:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:06:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGMergeTool::Smalltalk class methodsFor:'documentation'!
@@ -236,11 +237,12 @@
 
     | dinfo merged |
 
-    HGCommand resolve
-        workingDirectory: file directory pathName;
-        tool: 'internal:dump';
-        files: (Array with: file baseName);
-        execute.
+    file workingCopy repository execute:
+        (HGCommand resolve
+            workingDirectory: file directory pathName;
+            tool: 'internal:dump';
+            files: (Array with: file baseName);
+            yourself).
 
     dinfo := self changesetDiffInfo.
     dinfo read.
@@ -255,6 +257,7 @@
     ]
 
     "Created: / 14-01-2013 / 21:15:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:07:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGMergeTool::Smalltalk methodsFor:'private'!
--- a/mercurial/HGRepository.st	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/HGRepository.st	Sun Mar 03 23:58:51 2013 +0000
@@ -12,8 +12,8 @@
 "{ Package: 'stx:libscm/mercurial' }"
 
 Object subclass:#HGRepository
-	instanceVariableNames:'uuid path wc changesets branches heads config lock'
-	classVariableNames:'Cache'
+	instanceVariableNames:'uuid path wc changesets branches heads config lock server'
+	classVariableNames:'Cache UseCommandServer'
 	poolDictionaries:''
 	category:'SCM-Mercurial-Core'
 !
@@ -56,9 +56,10 @@
 
     "/ please change as required (and remove this comment)
 
-    Cache := CacheDictionary new: 8
+    Cache := CacheDictionary new: 8.
+    UseCommandServer := true.
 
-    "Modified: / 14-12-2012 / 19:31:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 22:57:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGRepository class methodsFor:'instance creation'!
@@ -164,11 +165,12 @@
                         reader:[:old |
                             | rbranches current names |
                             rbranches := old.
-                            current := HGCommand branches
-                                    workingDirectory: path pathName;
-                                    active: false;
-                                    closed: true;
-                                    executeOnRepository: self.
+                            current := self execute:
+                                        (HGCommand branches
+                                            workingDirectory: path pathName;
+                                            active: false;
+                                            closed: true;
+                                            yourself).
                             names := rbranches collect:[:b|b name].
                             current := current reject:[:b|names includes: b name].
                             current do:[:b|b setRepository: self].
@@ -183,7 +185,7 @@
     ^branches value
 
     "Created: / 27-11-2012 / 19:57:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:37:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 22:52:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 config
@@ -201,16 +203,14 @@
                         reader:[
                             | ids |
 
-                            ids := HGCommand heads
-                                        workingDirectory: path pathName;
-                                        executeOnRepository: self.
+                            ids := self execute: HGCommand heads.
                             ids collect:[:id|self changesetWithId: id].
                         ].                                
     ].
     ^heads value.
 
     "Created: / 27-11-2012 / 21:33:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:38:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 22:53:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 path
@@ -334,7 +334,13 @@
     "Created: / 16-12-2012 / 00:39:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
-!HGRepository methodsFor:'initialization'!
+!HGRepository methodsFor:'initialize & release'!
+
+finalize
+    server notNil ifTrue:[ server stop ].
+
+    "Created: / 03-03-2013 / 23:15:04 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
 
 initializeOn: aStringOrFilename
     | p |
@@ -384,6 +390,21 @@
     "Created: / 21-11-2012 / 00:21:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+execute: anHGCommand
+    ^UseCommandServer ifTrue:[
+        server isNil ifTrue:[
+            server := HGCommandServer new repository: self.
+            server start.
+            self registerForFinalization.
+        ].
+        server execute: anHGCommand
+    ] ifFalse:[
+        anHGCommand execute
+    ]
+
+    "Created: / 03-03-2013 / 22:52:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 pull
     "Pulls changesets from default upstream repository.
      See .hg/hgrc, section path"
@@ -401,13 +422,13 @@
 
     See .hg/hgrc, section for configured aliases"
 
-    ^HGCommand pull
-        workingDirectory: path pathName;
-        url: (remote ? 'default') asString;
-        executeOnRepository: self.
+    ^self execute: 
+        (HGCommand pull
+            url: (remote ? 'default') asString;
+            yourself)
 
     "Created: / 04-02-2013 / 15:30:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:38:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 22:53:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 push
@@ -442,14 +463,15 @@
 
      See .hg/hgrc, section path"
 
-    ^HGCommand push
-        workingDirectory: path pathName;
-        url: (remote ? 'default') asString;
-        force: force;
-        executeOnRepository: self.
+    ^self execute:
+        (HGCommand push
+            workingDirectory: path pathName;
+            url: (remote ? 'default') asString;
+            force: force;
+            yourself)
 
     "Created: / 27-11-2012 / 21:58:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:38:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 22:54:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGRepository methodsFor:'synchronized evaluation'!
@@ -558,10 +580,11 @@
      non-lazy"
 
      | csets cs |
-     csets := HGCommand log
-                    workingDirectory: repository path asString;
-                    revsets: (self loadRevsetsForLoad: id);
-                    executeOnRepository: self.
+     csets := self repository execute:
+                    (HGCommand log
+                        workingDirectory: repository path asString;
+                        revsets: (self loadRevsetsForLoad: id);
+                        yourself).
      "/just to be defensive...
      csets do:[:each| 
         | existing |
@@ -583,7 +606,7 @@
     ^cs
 
     "Created: / 16-12-2012 / 00:57:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:38:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 22:58:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 loadRevsetsForLoad: id
--- a/mercurial/HGTests.st	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/HGTests.st	Sun Mar 03 23:58:51 2013 +0000
@@ -739,7 +739,10 @@
     repoCDir := HGRepositoriesResource current directoryForRepositoryNamed: 'test_push_01_C' init: false.
     repoC := repoA cloneTo: repoCDir.
 
-    self should: [ repoA push: '/some/funny/directory' ] raise: HGError suchThat:[:ex|ex description startsWith: 'repository'].
+    self should: [ repoA push: '/some/funny/directory' ] raise: HGError 
+        suchThat:[:ex|
+            ex description startsWith: 'repository'
+    ].
 
 
     log := OrderedCollection new.
@@ -764,6 +767,7 @@
 
     "Created: / 04-02-2013 / 13:30:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 04-02-2013 / 23:37:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (format): / 03-03-2013 / 23:55:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGTests methodsFor:'tests - wc'!
--- a/mercurial/HGWorkingCopy.st	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/HGWorkingCopy.st	Sun Mar 03 23:58:51 2013 +0000
@@ -250,16 +250,17 @@
         ].
     ].
 
-    ^ (HGCommand commit)
-        workingDirectory:root pathName;
-        message:message;
-        files:files;
-        author: author;
-        date: dateSpecOrNil;
-        executeOnRepository: self repository
+    ^self repository execute:
+        (HGCommand commit
+            workingDirectory:root pathName;
+            message:message;
+            files:files;
+            author: author;
+            date: dateSpecOrNil;
+            yourself).
 
     "Created: / 01-02-2013 / 14:28:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:38:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 22:58:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 commit:message files:files date: dateSpecOrNil
@@ -274,14 +275,15 @@
 merge: aChangesetOrChangesetId
     "Merge given changeset into workinf copy."
 
-    ^HGCommand merge
-        workingDirectory: self path;
-        revision: aChangesetOrChangesetId asHGChangesetId asString;
-        tool: 'internal:dump';
-        executeOnRepository: self repository
+    ^self repository execute:
+        (HGCommand merge
+            workingDirectory: self path;
+            revision: aChangesetOrChangesetId asHGChangesetId asString;
+            tool: 'internal:dump';
+            yourself)
 
     "Created: / 14-01-2013 / 15:14:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:38:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 22:59:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 update
@@ -296,13 +298,14 @@
 
     self changeset id = revisionOrBranch ifTrue:[ ^ self ].
 
-    ^HGCommand update
-        workingDirectory: self path;
-        revision: revisionOrBranch asString;
-        executeOnRepository: self repository
+    ^self repository execute:
+        (HGCommand update
+            workingDirectory: self path;
+            revision: revisionOrBranch asString;
+            yourself)
 
     "Created: / 21-11-2012 / 00:21:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:39:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:00:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGWorkingCopy methodsFor:'initialization'!
@@ -373,14 +376,15 @@
 
 states
     states isNil ifTrue:[
-        states := HGCommand resolve__list
-                    workingDirectory: wc pathName;
-                    executeOnRepository: wc repository.
+        states := wc repository execute:
+                    (HGCommand resolve__list
+                        workingDirectory: wc pathName;
+                        yourself) .
     ].
     ^states
 
     "Created: / 14-01-2013 / 16:47:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:39:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:00:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGWorkingCopy class methodsFor:'documentation'!
--- a/mercurial/HGWorkingCopyFile.st	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/HGWorkingCopyFile.st	Sun Mar 03 23:58:51 2013 +0000
@@ -120,10 +120,11 @@
 
     revisions isNil ifTrue:[
         | old oldIds |
-        oldIds := HGCommand log
+        oldIds := self repository execute:
+                    (HGCommand log
                         workingDirectory: wc pathName;
                         path: path;
-                        executeOnRepository: self repository.
+                        yourself).
         pathS.
         old := OrderedCollection new.
         oldIds withIndexDo: [:id :index|
@@ -151,7 +152,7 @@
 
     "Created: / 05-12-2012 / 19:09:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
     "Modified: / 06-12-2012 / 03:50:58 / jv"
-    "Modified: / 03-03-2013 / 20:40:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:03:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 status
@@ -160,13 +161,13 @@
     cmd := HGCommand status.
     cmd workingDirectory: filename directory.
     cmd path: filename pathName.
-    statuses := cmd executeOnRepository: self repository.
+    statuses := self repository execute: cmd.
     self assert: statuses size == 1.
     self assert: statuses first second = filename baseName.
     ^statuses first first.
 
     "Created: / 24-09-2012 / 22:27:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:40:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:04:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGWorkingCopyFile methodsFor:'delegating'!
@@ -272,72 +273,77 @@
 !HGWorkingCopyFile methodsFor:'operations'!
 
 markResolved
-    HGCommand resolve
-        workingDirectory: filename directory;
-        mark: true;
-        files: (Array with: filename baseName);
-        executeOnRepository: self repository.
+    self repository execute:
+        (HGCommand resolve
+            workingDirectory: filename directory;
+            mark: true;
+            files: (Array with: filename baseName);
+            yourself)
 
     "Created: / 15-01-2013 / 10:22:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:40:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:01:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 markUnresolved
-    HGCommand resolve
-        workingDirectory: filename directory;
-        unmark: true;
-        files: (Array with: filename baseName);
-        executeOnRepository: self repository.
+    self repository execute:
+        (HGCommand resolve
+            workingDirectory: filename directory;
+            unmark: true;
+            files: (Array with: filename baseName);
+            yourself).
 
     "Created: / 15-01-2013 / 10:22:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:40:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:02:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 moveTo: destination
     "Make sure that this entry is tracked by Mercurial"
 
     self isTracked ifTrue:[
-        HGCommand mv
-            workingDirectory: filename directory;
-            source: filename pathName;
-            destination: destination pathName;
-            executeOnRepository: self repository.
+        self repository execute:
+            (HGCommand mv
+                workingDirectory: filename directory;
+                source: filename pathName;
+                destination: destination pathName;
+                yourself)
     ].
     filename exists ifTrue:[
         filename moveTo: destination pathName
     ].
 
     "Created: / 15-11-2012 / 00:23:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:40:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:02:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 remove
     "Make sure that this entry is tracked by Mercurial"
 
     self isTracked ifTrue:[
-        HGCommand remove
-            workingDirectory: filename directory;
-            paths: { filename baseName };
-            executeOnRepository: self repository
+        self repository execute:
+            (HGCommand remove
+               workingDirectory: filename directory;
+               paths: { filename baseName };
+               yourself)
     ].
     filename remove
 
     "Created: / 15-11-2012 / 00:08:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:40:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:03:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 track
     "Make sure that this entry is tracked by Mercurial"
 
     self isUntracked ifTrue:[
-        HGCommand add
-            workingDirectory: filename directory;
-            paths: { filename baseName };
-            executeOnRepository: self repository.
+        self repository execute:
+            (HGCommand add
+                workingDirectory: filename directory;
+                paths: { filename baseName };
+                yourself)
     ]
 
     "Created: / 15-11-2012 / 00:08:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 03-03-2013 / 20:40:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 03-03-2013 / 23:04:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !HGWorkingCopyFile methodsFor:'printing & storing'!
--- a/mercurial/Make.proto	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/Make.proto	Sun Mar 03 23:58:51 2013 +0000
@@ -169,7 +169,7 @@
 $(OUTDIR)HGChangesetId.$(O) HGChangesetId.$(H): HGChangesetId.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) $(STCHDR)
 $(OUTDIR)HGCommand.$(O) HGCommand.$(H): HGCommand.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)HGCommandParser.$(O) HGCommandParser.$(H): HGCommandParser.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
-$(OUTDIR)HGCommandServer.$(O) HGCommandServer.$(H): HGCommandServer.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/ReadStream.$(H) $(INCLUDE_TOP)/stx/libbasic/PositionableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/PeekableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Stream.$(H) $(INCLUDE_TOP)/stx/libbasic/WriteStream.$(H) $(STCHDR)
+$(OUTDIR)HGCommandServer.$(O) HGCommandServer.$(H): HGCommandServer.st $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(INCLUDE_TOP)/stx/libbasic/WriteStream.$(H) $(INCLUDE_TOP)/stx/libbasic/PositionableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/PeekableStream.$(H) $(INCLUDE_TOP)/stx/libbasic/Stream.$(H) $(INCLUDE_TOP)/stx/libbasic/ReadStream.$(H) $(STCHDR)
 $(OUTDIR)HGCommitDialog.$(O) HGCommitDialog.$(H): HGCommitDialog.st $(INCLUDE_TOP)/stx/libscm/common/SCMAbstractCommitDialog.$(H) $(INCLUDE_TOP)/stx/libscm/common/SCMAbstractDialog.$(H) $(INCLUDE_TOP)/stx/libview2/SimpleDialog.$(H) $(INCLUDE_TOP)/stx/libview2/ApplicationModel.$(H) $(INCLUDE_TOP)/stx/libview2/Model.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)HGCommitTask.$(O) HGCommitTask.$(H): HGCommitTask.st $(INCLUDE_TOP)/stx/libscm/common/SCMAbstractCommitTask.$(H) $(INCLUDE_TOP)/stx/libscm/common/SCMAbstractFileoutLikeTask.$(H) $(INCLUDE_TOP)/stx/libscm/common/SCMAbstractTask.$(H) $(INCLUDE_TOP)/stx/libbasic/Object.$(H) $(STCHDR)
 $(OUTDIR)HGError.$(O) HGError.$(H): HGError.st $(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)
--- a/mercurial/bc.mak	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/bc.mak	Sun Mar 03 23:58:51 2013 +0000
@@ -96,7 +96,7 @@
 $(OUTDIR)HGChangesetId.$(O) HGChangesetId.$(H): HGChangesetId.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) $(STCHDR)
 $(OUTDIR)HGCommand.$(O) HGCommand.$(H): HGCommand.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)HGCommandParser.$(O) HGCommandParser.$(H): HGCommandParser.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
-$(OUTDIR)HGCommandServer.$(O) HGCommandServer.$(H): HGCommandServer.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\ReadStream.$(H) $(INCLUDE_TOP)\stx\libbasic\PositionableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\PeekableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Stream.$(H) $(INCLUDE_TOP)\stx\libbasic\WriteStream.$(H) $(STCHDR)
+$(OUTDIR)HGCommandServer.$(O) HGCommandServer.$(H): HGCommandServer.st $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(INCLUDE_TOP)\stx\libbasic\WriteStream.$(H) $(INCLUDE_TOP)\stx\libbasic\PositionableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\PeekableStream.$(H) $(INCLUDE_TOP)\stx\libbasic\Stream.$(H) $(INCLUDE_TOP)\stx\libbasic\ReadStream.$(H) $(STCHDR)
 $(OUTDIR)HGCommitDialog.$(O) HGCommitDialog.$(H): HGCommitDialog.st $(INCLUDE_TOP)\stx\libscm\common\SCMAbstractCommitDialog.$(H) $(INCLUDE_TOP)\stx\libscm\common\SCMAbstractDialog.$(H) $(INCLUDE_TOP)\stx\libview2\SimpleDialog.$(H) $(INCLUDE_TOP)\stx\libview2\ApplicationModel.$(H) $(INCLUDE_TOP)\stx\libview2\Model.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)HGCommitTask.$(O) HGCommitTask.$(H): HGCommitTask.st $(INCLUDE_TOP)\stx\libscm\common\SCMAbstractCommitTask.$(H) $(INCLUDE_TOP)\stx\libscm\common\SCMAbstractFileoutLikeTask.$(H) $(INCLUDE_TOP)\stx\libscm\common\SCMAbstractTask.$(H) $(INCLUDE_TOP)\stx\libbasic\Object.$(H) $(STCHDR)
 $(OUTDIR)HGError.$(O) HGError.$(H): HGError.st $(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)
--- a/mercurial/mercurial.rc	Sun Mar 03 20:45:13 2013 +0000
+++ b/mercurial/mercurial.rc	Sun Mar 03 23:58:51 2013 +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", "Sun, 03 Mar 2013 20:42:36 GMT\0"
+      VALUE "ProductDate", "Sun, 03 Mar 2013 23:57:52 GMT\0"
     END
 
   END