void ShowLog::on_actionDiff_to_HEAD_triggered() { SvnClient::instance()->diff(m_repos + getSelectedPath(), m_repos + getSelectedPath(), getSelectedRevision(), svn::Revision::HEAD); }
void ShowLog::on_actionDiff_to_START_triggered() { SvnClient::instance()->diff(m_repos + getSelectedPath(), m_repos + getSelectedPath(), getSelectedRevision(), getSelectedStartRevision()); }
void ShowLog::on_actionDiff_triggered() { SvnClient::instance()->diff(m_repos + getSelectedPath(), m_repos + getSelectedPath(), svn::Revision(getSelectedRevision().revnum() - 1), getSelectedRevision()); }
void ShowLog::on_actionRevertPath_triggered() { if (checkLocatedInWc()) { QString _url = m_repos + getSelectedPath(); QString _path = m_path + QString(getSelectedPath()).remove(m_repos_path); svn::Revision _rev = getSelectedRevision(); revertChanges(_url, _path, _rev); } }
void ShowLog::on_actionDiff_to_BASE_triggered() { if (checkLocatedInWc()) { SvnClient::instance()->diff(m_repos + getSelectedPath(), m_path + QString(getSelectedPath()).remove(m_repos_path), getSelectedRevision(), svn::Revision::BASE); } }
void ShowLog::on_actionDiff_to_Revision_triggered( ) { int revision = QInputDialog::getInteger(this, tr("Revision Number"), tr("Revision Number"), getSelectedRevision().revnum() - 1); SvnClient::instance()->diff(m_repos + getSelectedPath(), m_repos + getSelectedPath(), getSelectedRevision(), svn::Revision(revision)); }
bool ShowLog::checkLocatedInWc() { if (getSelectedPath().startsWith(m_repos_path)) return true; else { StatusText::out(tr("This file is not located in the working copy.")); return false; } }
MyVideoList::MyVideoList(QWidget *parent) : QWidget(parent) { qDebug() << "building the videoList..."; this->_layout = new QVBoxLayout; this->_list = new QListWidget; this->_layout->addWidget(this->_list); setLayout( this->_layout); connect(this->_list, SIGNAL(itemSelectionChanged()), this, SLOT(getSelectedPath())); qDebug() << "done."; }
svn_revnum_t ShowLog::getSelectedStartRevision() { svn::LogEntriesMap _logs;; if (SvnClient::instance()->log(svn::Wc(0).getRepos(m_path) + getSelectedPath(), getSelectedRevision(), svn::Revision::START, svn::Revision::HEAD, true, true, 0, _logs)) { _logs.values().first().revision; } return svn::Revision::UNDEFINED; }