Commits

Anton Afanasyev  committed ef728b7

less string concatenation when build status-getting script

  • Participants
  • Parent commits a1eaf62

Comments (0)

Files changed (1)

 }
 
 function Get-Status-Script( $branch ) {
-  $status    = "sg.to_json(sg.pending_tree.status())"
-  $lastChset = "sg.to_json(sg.pending_tree.history(['branch=" + $branch + "','max=1']))"
-  $curChset  = "sg.to_json(sg.pending_tree.history(['rev='+sg.pending_tree.parents()]))"
+  $status    = "sg.pending_tree.status()"
+  $lastChset = "sg.pending_tree.history(['branch=" + $branch + "','max=1'])"
+  $curChset  = "sg.pending_tree.history(['rev='+sg.pending_tree.parents()])"
 
-  return "print('{ status: ' + $status + ', lastChset: ' + $lastChset + ', curChset: ' + $curChset + ' }');"
+  return "print(sg.to_json({status: $status, lastChset: $lastChset, curChset: $curChset}));"
 }