Bugfix in file browser menu HG -> Push -> To...
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 18 Mar 2014 12:16:01 +0000
changeset 401 218a20c7e54a
parent 397 579b4fd3e9a9
child 402 5cc256ed28a1
Bugfix in file browser menu HG -> Push -> To... HGRepository>>pull:/push: takes an instance of HGRemote, not String.
mercurial/HGRemote.st
mercurial/extensions.st
--- a/mercurial/HGRemote.st	Sat Mar 08 10:29:38 2014 +0000
+++ b/mercurial/HGRemote.st	Tue Mar 18 12:16:01 2014 +0000
@@ -48,6 +48,20 @@
 "
 ! !
 
+!HGRemote class methodsFor:'instance creation'!
+
+name: name url: url
+    ^ self new setName: name url: url
+
+    "Created: / 18-03-2014 / 12:08:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+url: url
+    ^ self name: url asString url: url
+
+    "Created: / 18-03-2014 / 12:09:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !HGRemote methodsFor:'accessing'!
 
 name
--- a/mercurial/extensions.st	Sat Mar 08 10:29:38 2014 +0000
+++ b/mercurial/extensions.st	Tue Mar 18 12:16:01 2014 +0000
@@ -378,7 +378,7 @@
 
     appl := self openCommandResultApplication.
     stream := appl resultStream.
-    appl changeTabTo:((resources string: 'Pulling from %1') bindWith: remote printString).
+    appl changeTabTo:((resources string: 'Pulling from %1') bindWith: remote asString).
     [
         stream nextPutAll:(resources string: 'Mercurial > hg pull'); space; nextPutLine: remote name.
         [
@@ -393,6 +393,7 @@
     ] forkAt: Processor userBackgroundPriority
 
     "Created: / 04-04-2013 / 19:27:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 18-03-2014 / 12:10:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !AbstractFileBrowser methodsFor:'menu actions-scm-hg'!
@@ -406,10 +407,11 @@
                 initialAnswer:'http://...'  
                 list: options. 
     url notEmptyOrNil ifTrue:[
-        self hgPullFrom: url repository: repo.
+        self hgPullFrom: (HGRemote url: url) repository: repo.
     ]
 
     "Created: / 04-04-2013 / 19:16:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 18-03-2014 / 12:09:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !AbstractFileBrowser methodsFor:'menu actions-scm-hg'!
@@ -419,7 +421,7 @@
 
     appl := self openCommandResultApplication.
     stream := appl resultStream.
-    appl changeTabTo:((resources string: 'Pushing to %1') bindWith: remote printString).
+    appl changeTabTo:((resources string: 'Pushing to %1') bindWith: remote asString).
     [
         stream nextPutAll:(resources string: 'Mercurial > hg push'); space; nextPutLine: remote name.
         [
@@ -434,6 +436,7 @@
     ] forkAt: Processor userBackgroundPriority
 
     "Created: / 04-04-2013 / 19:23:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 18-03-2014 / 12:10:17 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !AbstractFileBrowser methodsFor:'menu actions-scm-hg'!
@@ -447,10 +450,11 @@
                 initialAnswer:'http://...'  
                 list: options. 
     url notEmptyOrNil ifTrue:[
-        self hgPushTo: url repository: repo.
+        self hgPushTo: (HGRemote url: url) repository: repo.
     ]
 
     "Created: / 04-04-2013 / 19:15:41 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 18-03-2014 / 12:09:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !AbstractFileBrowser methodsFor:'menu actions-scm-hg'!