Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

reporegistry: add push

TODO: add confirmation dialog

Changeset 1096ecb3869d

Parent 768fcd1fcf9f

by André Sintzoff

Changes to 2 files · Browse files at 1096ecb3869d Showing diff from parent 768fcd1fcf9f Diff from another changeset...

 
100
101
102
 
 
103
104
105
 
160
161
162
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
163
164
165
 
100
101
102
103
104
105
106
107
 
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
@@ -100,6 +100,8 @@
  _("Delete the node and all its subnodes"), None, self.removeSelected),   ("pull", _("Pull"), None,   _("Pull from remote"), None, self.pull), + ("push", _("Push"), None, + _("Push to remote"), None, self.push),   ("editpath", _("Edit URL..."), None,   _("Edit Repository URL"), None, self.editPath),   ("clone", _("Clone..."), None, @@ -160,6 +162,22 @@
  cmd.show_output(False)   cmd.exec_()   + def push(self): + if not self.selitem: + return + pathitem = self.selitem.internalPointer() + url_ = pathitem.url() + reporoot = pathitem.parent().parent().rootpath() + + # TODO: add confirmation dialog + args = ['push', '-R', reporoot, url_] + cmd = cmdui.Dialog(args, parent=self) + what = _('Pushing to %s') % url.hidepassword(url_) + self.workbench.showMessage(what) + cmd.setWindowTitle(what) + cmd.show_output(False) + cmd.exec_() +   def editPath(self):   if not self.selitem:   return
 
258
259
260
261
 
262
263
264
 
258
259
260
 
261
262
263
264
@@ -258,7 +258,7 @@
  return False     def menulist(self): - return ['pull', None, 'editpath', 'rename', None, 'remove' ] + return ['pull', 'push', None, 'editpath', 'rename', None, 'remove' ]     def flags(self):   return Qt.ItemIsEnabled | Qt.ItemIsSelectable | Qt.ItemIsEditable