by
Changes to 5 files · Browse files at a801a826a50a Showing diff from parent 0278bb1d3cd7 aa23bf637b70 Diff from another changeset...
@@ -414,7 +414,8 @@ self.lastCommitMsg = self.msgte.text()
self.setMessage(hglib.tounicode(pctx.description()))
else:
- self.setMessage(self.lastCommitMsg)
+ if self.lastAction == 'qref':
+ self.setMessage(self.lastCommitMsg)
if refreshwctx:
self.stwidget.refreshWctx()
self.mqtb.setText(curraction._text)
@@ -858,6 +859,7 @@ self.branchop = None
umsg = self.msgte.text()
if self.currentAction != 'qref':
+ self.lastCommitMsg = ''
if self.currentAction == 'commit':
# capture last message for BugTraq plugin
self.lastmessage = self.getMessage()
|
@@ -567,10 +567,9 @@ def openAll(self):
for root in self.selitem.internalPointer().childRoots():
self.openRepo.emit(hglib.tounicode(root), False)
-
def open(self, root=None):
'open context menu action, open repowidget unconditionally'
- if root is None:
+ if not root:
root = self.selitem.internalPointer().rootpath()
repotype = self.selitem.internalPointer().repotype()
else:
|
@@ -1076,6 +1076,14 @@ entry(menu, None, isrev, _('Update...'), 'hg-update',
self.updateToRevision)
entry(menu)
+ submenu = menu.addMenu(_('Push'))
+ entry(submenu, None, isrev, _('Push all'), 'hg-push',
+ self.pushToRevision)
+ entry(submenu, None, isrev, _('Push to here'), '',
+ self.pushToRevision)
+ entry(submenu, None, isrev, _('Push selected branch'), '',
+ self.pushBranch)
+ entry(menu)
entry(menu, None, isctx, _('Visual diff...'), 'visualdiff',
self.visualDiffRevision)
entry(menu, None, isrev, _('Diff to local...'), 'ldiff',
@@ -1429,6 +1437,18 @@ dlg.finished.connect(dlg.deleteLater)
dlg.exec_()
+ def pushAll(self):
+ self.syncDemand.forward('push', True)
+
+ def pushToRevision(self):
+ # Do not ask for confirmation
+ self.syncDemand.forward('push', False, rev=self.rev)
+
+ def pushBranch(self):
+ # Do not ask for confirmation
+ self.syncDemand.forward('push', False,
+ branch=self.repo[self.rev].branch())
+
def manifestRevision(self):
run.manifest(self.repo.ui, repo=self.repo, rev=self.rev)
|
@@ -214,8 +214,11 @@ self.refreshWctx()
def setPatchContext(self, pctx):
+ if pctx != self.pctx:
+ self.savechecks = False
+ else:
+ self.savechecks = True
self.pctx = pctx
- self.savechecks = False
def refreshWctx(self, synchronous=False):
if self.refthread:
|
@@ -677,11 +677,11 @@ else:
self.outclicked()
- def push(self, confirm):
+ def push(self, confirm, rev=None, branch=None):
if self.cmd.core.running():
self.showMessage.emit(_('sync command already running'))
else:
- self.pushclicked(confirm)
+ self.pushclicked(confirm, rev, branch)
def pullBundle(self, bundle, rev):
'accept bundle changesets'
@@ -847,7 +847,7 @@ self.showMessage.emit(_('Perforce pending...'))
self.run(['--repository', self.repo.root, 'p4pending', '--verbose'], ())
- def pushclicked(self, confirm):
+ def pushclicked(self, confirm, rev=None, branch=None):
url = self.currentUrl(True)
urlu = hglib.tounicode(url)
if (not hg.islocal(self.currentUrl(False)) and confirm
@@ -869,6 +869,10 @@ self.pushCompleted.emit()
self.finishfunc = finished
cmdline = ['--repository', self.repo.root, 'push']
+ if rev:
+ cmdline.extend(['--rev', str(rev)])
+ if branch:
+ cmdline.extend(['--branch', branch])
self.run(cmdline, ('force', 'new-branch', 'branch', 'rev'))
def postpullclicked(self):
|
Loading...