comparison mainwindow.cpp @ 301:3bb6b63420ad status_outside_tabs

Merge from the default branch
author Chris Cannam
date Tue, 22 Feb 2011 15:52:22 +0000
parents d40294e164da 5e4a10af7945
children 031dddcd967f
comparison
equal deleted inserted replaced
297:e4284fab6962 301:3bb6b63420ad
860 860
861 void MainWindow::hgPull() 861 void MainWindow::hgPull()
862 { 862 {
863 if (ConfirmCommentDialog::confirm 863 if (ConfirmCommentDialog::confirm
864 (this, tr("Confirm pull"), 864 (this, tr("Confirm pull"),
865 format3(tr("Pull from remote repository?"), 865 tr("<qt><h3>Pull from remote repository?</h3></qt>"),
866 tr("You are about to pull changes from the following remote repository:"), 866 tr("<qt><p>You are about to pull changes from the remote repository at <code>%1</code>.</p></qt>").arg(xmlEncode(m_remoteRepoPath)),
867 m_remoteRepoPath),
868 tr("Pull"))) { 867 tr("Pull"))) {
869 868
870 QStringList params; 869 QStringList params;
871 params << "pull" << m_remoteRepoPath; 870 params << "pull" << m_remoteRepoPath;
872 m_runner->requestAction(HgAction(ACT_PULL, m_workFolderPath, params)); 871 m_runner->requestAction(HgAction(ACT_PULL, m_workFolderPath, params));
875 874
876 void MainWindow::hgPush() 875 void MainWindow::hgPush()
877 { 876 {
878 if (ConfirmCommentDialog::confirm 877 if (ConfirmCommentDialog::confirm
879 (this, tr("Confirm push"), 878 (this, tr("Confirm push"),
880 format3(tr("Push to remote repository?"), 879 tr("<qt><h3>Push to remote repository?</h3></qt>"),
881 tr("You are about to push your changes to the following remote repository:"), 880 tr("<qt><p>You are about to push your changes to the remote repository at <code>%1</code>.</p></qt>").arg(xmlEncode(m_remoteRepoPath)),
882 m_remoteRepoPath),
883 tr("Push"))) { 881 tr("Push"))) {
884 882
885 QStringList params; 883 QStringList params;
886 params << "push" << "--new-branch" << m_remoteRepoPath; 884 params << "push" << "--new-branch" << m_remoteRepoPath;
887 m_runner->requestAction(HgAction(ACT_PUSH, m_workFolderPath, params)); 885 m_runner->requestAction(HgAction(ACT_PUSH, m_workFolderPath, params));
1596 QString head; 1594 QString head;
1597 QString report; 1595 QString report;
1598 int n = extractChangeCount(output); 1596 int n = extractChangeCount(output);
1599 if (n > 0) { 1597 if (n > 0) {
1600 head = tr("Pushed %n changeset(s)", "", n); 1598 head = tr("Pushed %n changeset(s)", "", n);
1599 report = tr("<qt>Successfully pushed to the remote repository at <code>%1</code>.</qt>").arg(xmlEncode(m_remoteRepoPath));
1601 } else if (n == 0) { 1600 } else if (n == 0) {
1602 head = tr("No changes to push"); 1601 head = tr("No changes to push");
1603 report = tr("The remote repository already contains all changes that have been committed locally."); 1602 report = tr("The remote repository already contains all changes that have been committed locally.");
1604 if (m_hgTabs->canCommit()) { 1603 if (m_hgTabs->canCommit()) {
1605 report = tr("%1<p>You do have some uncommitted changes. If you wish to push those to the remote repository, commit them locally first.").arg(report); 1604 report = tr("%1<p>You do have some uncommitted changes. If you wish to push those to the remote repository, commit them locally first.").arg(report);