void BazaarPlugin::logCurrentFile() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasFile(), return); m_client->log(state.currentFileTopLevel(), QStringList(state.relativeCurrentFile()), QStringList(), true); }
void GerritPlugin::updateActions(const VcsBase::VcsBasePluginState &state) { const bool hasTopLevel = state.hasTopLevel(); m_gerritCommand->action()->setEnabled(hasTopLevel); m_pushToGerritCommand->action()->setEnabled(hasTopLevel); if (m_dialog && m_dialog->isVisible()) m_dialog->setCurrentPath(state.topLevel()); }
void BazaarPlugin::logRepository() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); QStringList extraOptions; extraOptions += QLatin1String("--limit=") + QString::number(settings().intValue(BazaarSettings::logCountKey)); m_client->log(state.topLevel(), QStringList(), extraOptions); }
void BazaarPlugin::uncommit() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); UnCommitDialog dialog(Core::ICore::dialogParent()); if (dialog.exec() == QDialog::Accepted) m_client->synchronousUncommit(state.topLevel(), dialog.revision(), dialog.extraOptions()); }
void BazaarPlugin::revertAll() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); QDialog dialog(Core::ICore::dialogParent()); Ui::RevertDialog revertUi; revertUi.setupUi(&dialog); if (dialog.exec() != QDialog::Accepted) return; m_client->revertAll(state.topLevel(), revertUi.revisionLineEdit->text()); }
void BazaarPlugin::update() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); QDialog dialog; Ui::RevertDialog revertUi; revertUi.setupUi(&dialog); dialog.setWindowTitle(tr("Update")); if (dialog.exec() != QDialog::Accepted) return; m_client->update(state.topLevel(), revertUi.revisionLineEdit->text()); }
void BazaarPlugin::revertCurrentFile() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasFile(), return); QDialog dialog; Ui::RevertDialog revertUi; revertUi.setupUi(&dialog); if (dialog.exec() != QDialog::Accepted) return; m_client->revertFile(state.currentFileTopLevel(), state.relativeCurrentFile(), revertUi.revisionLineEdit->text()); }
void BazaarPlugin::commit() { if (raiseSubmitEditor()) return; const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); m_submitRepository = state.topLevel(); connect(m_client, SIGNAL(parsedStatus(QList<VcsBase::VcsBaseClient::StatusItem>)), this, SLOT(showCommitWidget(QList<VcsBase::VcsBaseClient::StatusItem>))); // The "--short" option allows to easily parse status output m_client->emitParsedStatus(m_submitRepository, QStringList(QLatin1String("--short"))); }
void BazaarPlugin::pull() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); PullOrPushDialog dialog(PullOrPushDialog::PullMode, Core::ICore::dialogParent()); if (dialog.exec() != QDialog::Accepted) return; QStringList extraOptions; if (dialog.isRememberOptionEnabled()) extraOptions += QLatin1String("--remember"); if (dialog.isOverwriteOptionEnabled()) extraOptions += QLatin1String("--overwrite"); if (dialog.isLocalOptionEnabled()) extraOptions += QLatin1String("--local"); if (!dialog.revision().isEmpty()) extraOptions << QLatin1String("-r") << dialog.revision(); m_client->synchronousPull(state.topLevel(), dialog.branchLocation(), extraOptions); }
void BazaarPlugin::push() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); PullOrPushDialog dialog(PullOrPushDialog::PushMode); if (dialog.exec() != QDialog::Accepted) return; QStringList extraOptions; if (dialog.isRememberOptionEnabled()) extraOptions += QLatin1String("--remember"); if (dialog.isOverwriteOptionEnabled()) extraOptions += QLatin1String("--overwrite"); if (dialog.isUseExistingDirectoryOptionEnabled()) extraOptions += QLatin1String("--use-existing-dir"); if (dialog.isCreatePrefixOptionEnabled()) extraOptions += QLatin1String("--create-prefix"); if (!dialog.revision().isEmpty()) extraOptions << QLatin1String("-r") << dialog.revision(); m_client->synchronousPush(state.topLevel(), dialog.branchLocation(), extraOptions); }
void BazaarPlugin::statusMulti() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); m_client->status(state.topLevel()); }
void BazaarPlugin::diffRepository() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasTopLevel(), return); m_client->diff(state.topLevel()); }
void BazaarPlugin::statusCurrentFile() { const VcsBase::VcsBasePluginState state = currentState(); QTC_ASSERT(state.hasFile(), return); m_client->status(state.currentFileTopLevel(), state.relativeCurrentFile()); }