Changeset 887df993fc7d…
Parent a70c6d8b89fa…
by
Changes to 2 files · Browse files at 887df993fc7d Showing diff from parent a70c6d8b89fa Diff from another changeset...
@@ -452,7 +452,7 @@ _('%d outgoing changesets') % len(nodes))
assert w
w.acceptButton.setText(_('Push'))
- w.accepted.connect(self.push) # TODO: to the same URL
+ w.accepted.connect(lambda: self.push(False)) # TODO: to the same URL
w.rejected.connect(self.clearRevisionSet)
def createGrepWidget(self):
@@ -946,8 +946,13 @@ def outgoing(self):
self.syncDemand.get().outgoing()
- def push(self):
- self.syncDemand.get().push()
+ def push(self, confirm=True):
+ """Call sync push.
+
+ If confirm is False, the user will not be prompted for
+ confirmation. If confirm is True, the prompt might be used.
+ """
+ self.syncDemand.get().push(confirm)
##
## Repoview context menu
|
@@ -119,7 +119,7 @@ 'hg-outgoing', self.outclicked)
self.pushAction = \
newaction(_('Push outgoing changesets to remote repository'),
- 'hg-push', self.pushclicked)
+ 'hg-push', lambda: self.pushclicked(True))
newaction(_('Email outgoing changesets for remote repository'),
'mail-forward', self.emailclicked)
@@ -674,11 +674,11 @@ else:
self.outclicked()
- def push(self):
+ def push(self, confirm):
if self.cmd.core.running():
self.showMessage.emit(_('sync command already running'))
else:
- self.pushclicked()
+ self.pushclicked(confirm)
def pullBundle(self, bundle, rev):
'accept bundle changesets'
@@ -844,10 +844,11 @@ self.showMessage.emit(_('Perforce pending...'))
self.run(['--repository', self.repo.root, 'p4pending', '--verbose'], ())
- def pushclicked(self):
+ def pushclicked(self, confirm):
url = self.currentUrl(True)
urlu = hglib.tounicode(url)
- if not hg.islocal(self.currentUrl(False)):
+ if (not hg.islocal(self.currentUrl(False)) and confirm
+ and not self.targetcheckbox.isChecked()):
r = qtlib.QuestionMsgBox(_('Confirm Push to remote Repository'),
_('Push to remote repository\n%s\n?')
% urlu)
|
Loading...