ソースを参照

not specialcasing missing _source mapping

Herbert Vojčík 10 年 前
コミット
19f7825002
3 ファイル変更11 行追加26 行削除
  1. 4 11
      js/Importer-Exporter.deploy.js
  2. 5 12
      js/Importer-Exporter.js
  3. 2 3
      st/Importer-Exporter.st

+ 4 - 11
js/Importer-Exporter.deploy.js

@@ -926,19 +926,12 @@ smalltalk.method({
 selector: "commitPathStFor:",
 fn: function (aPackage){
 var self=this;
-var result;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-result=self._toUrl_(_st(self._namespaceFor_(aPackage)).__comma("/_source"));
-$2=_st(result)._match_("/_source$");
-if(smalltalk.assert($2)){
-$1=nil;
-} else {
-$1=result;
-};
+var $1;
+$1=self._toUrl_(_st(self._namespaceFor_(aPackage)).__comma("/_source"));
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"commitPathStFor:",{aPackage:aPackage,result:result},smalltalk.AmdPackageHandler)})},
-messageSends: ["toUrl:", ",", "namespaceFor:", "ifTrue:ifFalse:", "match:"]}),
+}, function($ctx1) {$ctx1.fill(self,"commitPathStFor:",{aPackage:aPackage},smalltalk.AmdPackageHandler)})},
+messageSends: ["toUrl:", ",", "namespaceFor:"]}),
 smalltalk.AmdPackageHandler);
 
 smalltalk.addMethod(

+ 5 - 12
js/Importer-Exporter.js

@@ -1149,21 +1149,14 @@ selector: "commitPathStFor:",
 category: 'committing',
 fn: function (aPackage){
 var self=this;
-var result;
 return smalltalk.withContext(function($ctx1) { 
-var $2,$1;
-result=self._toUrl_(_st(self._namespaceFor_(aPackage)).__comma("/_source"));
-$2=_st(result)._match_("/_source$");
-if(smalltalk.assert($2)){
-$1=nil;
-} else {
-$1=result;
-};
+var $1;
+$1=self._toUrl_(_st(self._namespaceFor_(aPackage)).__comma("/_source"));
 return $1;
-}, function($ctx1) {$ctx1.fill(self,"commitPathStFor:",{aPackage:aPackage,result:result},smalltalk.AmdPackageHandler)})},
+}, function($ctx1) {$ctx1.fill(self,"commitPathStFor:",{aPackage:aPackage},smalltalk.AmdPackageHandler)})},
 args: ["aPackage"],
-source: "commitPathStFor: aPackage\x0a\x09| result |\x0a\x09result := self toUrl: (self namespaceFor: aPackage), '/_source'.\x0a\x09^ (result match: '/_source$') ifTrue: [ nil ] ifFalse: [ result ]",
-messageSends: ["toUrl:", ",", "namespaceFor:", "ifTrue:ifFalse:", "match:"],
+source: "commitPathStFor: aPackage\x0a\x09\x22if _source is not mapped, .st commit will likely fail\x22\x0a\x09^self toUrl: (self namespaceFor: aPackage), '/_source'.",
+messageSends: ["toUrl:", ",", "namespaceFor:"],
 referencedClasses: []
 }),
 smalltalk.AmdPackageHandler);

+ 2 - 3
st/Importer-Exporter.st

@@ -551,9 +551,8 @@ commitPathJsFor: aPackage
 !
 
 commitPathStFor: aPackage
-	| result |
-	result := self toUrl: (self namespaceFor: aPackage), '/_source'.
-	^ (result match: '/_source$') ifTrue: [ nil ] ifFalse: [ result ]
+	"if _source is not mapped, .st commit will likely fail"
+	^self toUrl: (self namespaceFor: aPackage), '/_source'.
 !
 
 namespaceFor: aPackage