Changeset 1096ecb3869d…
Parent 768fcd1fcf9f…
by
Changes to 2 files · Browse files at 1096ecb3869d Showing diff from parent 768fcd1fcf9f Diff from another changeset...
@@ -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,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
|
Loading...