comparison hgrunner.cpp @ 340:bb189827f6d1

Disable "Show All Files" when there's no repo; refuse to run Hg commands without working dir; increase first-start window size a bit
author Chris Cannam
date Tue, 15 Mar 2011 12:00:31 +0000
parents dff8ec43c86d
children
comparison
equal deleted inserted replaced
339:8b244f3b3111 340:bb189827f6d1
379 { 379 {
380 QString executable = action.executable; 380 QString executable = action.executable;
381 bool interactive = false; 381 bool interactive = false;
382 QStringList params = action.params; 382 QStringList params = action.params;
383 383
384 if (action.workingDir.isEmpty()) {
385 // We require a working directory, never just operate in pwd
386 emit commandFailed(action, "EasyMercurial: No working directory supplied, will not run Mercurial command without one");
387 return;
388 }
389
384 QSettings settings; 390 QSettings settings;
385 settings.beginGroup("General"); 391 settings.beginGroup("General");
386 392
387 if (executable == "") { 393 if (executable == "") {
388 // This is a Hg command 394 // This is a Hg command
441 connect(m_proc, SIGNAL(readyReadStandardOutput()), 447 connect(m_proc, SIGNAL(readyReadStandardOutput()),
442 this, SLOT(dataReadyStdout())); 448 this, SLOT(dataReadyStdout()));
443 connect(m_proc, SIGNAL(readyReadStandardError()), 449 connect(m_proc, SIGNAL(readyReadStandardError()),
444 this, SLOT(dataReadyStderr())); 450 this, SLOT(dataReadyStderr()));
445 451
446 if (!action.workingDir.isEmpty()) { 452 m_proc->setWorkingDirectory(action.workingDir);
447 m_proc->setWorkingDirectory(action.workingDir);
448 }
449 453
450 if (interactive) { 454 if (interactive) {
451 openTerminal(); 455 openTerminal();
452 if (m_ptySlaveFilename != "") { 456 if (m_ptySlaveFilename != "") {
453 DEBUG << "HgRunner: connecting to pseudoterminal" << endl; 457 DEBUG << "HgRunner: connecting to pseudoterminal" << endl;