comparison src/mainwindow.cpp @ 608:6f90bb52eee6

Clear history and file states while opening a new remote repo
author Chris Cannam
date Tue, 03 Jul 2012 12:12:42 +0100
parents d35ed7488ccd
children c1451b356097
comparison
equal deleted inserted replaced
607:d35ed7488ccd 608:6f90bb52eee6
1216 DEBUG << "hgCloneFromRemote: Failed to create target path " 1216 DEBUG << "hgCloneFromRemote: Failed to create target path "
1217 << m_workFolderPath << endl; 1217 << m_workFolderPath << endl;
1218 QMessageBox::critical 1218 QMessageBox::critical
1219 (this, tr("Could not create target folder"), 1219 (this, tr("Could not create target folder"),
1220 tr("<qt><b>Could not create target folder</b><br><br>The local target folder \"%1\" does not exist<br>and could not be created.</qt>").arg(xmlEncode(m_workFolderPath))); 1220 tr("<qt><b>Could not create target folder</b><br><br>The local target folder \"%1\" does not exist<br>and could not be created.</qt>").arg(xmlEncode(m_workFolderPath)));
1221 m_workFolderPath = "";
1221 return; 1222 return;
1222 } 1223 }
1223 } 1224 }
1224 1225
1225 params << "clone" << m_remoteRepoPath << m_workFolderPath; 1226 params << "clone" << m_remoteRepoPath << m_workFolderPath;
1226 1227
1227 updateWorkFolderAndRepoNames(); 1228 updateWorkFolderAndRepoNames();
1228 m_hgTabs->updateWorkFolderFileList(""); 1229 m_hgTabs->updateWorkFolderFileList("");
1230 m_hgTabs->clearAll();
1229 1231
1230 m_runner->requestAction(HgAction(ACT_CLONEFROMREMOTE, m_workFolderPath, params)); 1232 m_runner->requestAction(HgAction(ACT_CLONEFROMREMOTE, m_workFolderPath, params));
1231 } 1233 }
1232 1234
1233 void MainWindow::hgInit() 1235 void MainWindow::hgInit()