comparison mainwindow.cpp @ 104:af314dd436d5

* Slightly more useful commit dialog
author Chris Cannam
date Thu, 25 Nov 2010 14:30:40 +0000
parents 0bd32aedc6f6
children 729438d70af8
comparison
equal deleted inserted replaced
103:0bd32aedc6f6 104:af314dd436d5
334 if (ConfirmCommentDialog::confirmAndComment(this, 334 if (ConfirmCommentDialog::confirmAndComment(this,
335 tr("Commit files"), 335 tr("Commit files"),
336 tr("About to commit the following files:"), 336 tr("About to commit the following files:"),
337 tr("About to commit %1 files."), 337 tr("About to commit %1 files."),
338 files, 338 files,
339 comment)) { 339 comment,
340 true)) {
340 341
341 //!!! do something more sensible when the comment is empty 342 //!!! do something more sensible when the comment is empty
342 // (i.e. tell the user about it?) 343 // (i.e. tell the user about it?)
343 344
344 if ((justMerged == false) && //!!! review usage of justMerged 345 if ((justMerged == false) && //!!! review usage of justMerged
381 QString tag; 382 QString tag;
382 383
383 if (ConfirmCommentDialog::confirmAndComment(this, 384 if (ConfirmCommentDialog::confirmAndComment(this,
384 tr("Tag"), 385 tr("Tag"),
385 tr("Enter tag:"), 386 tr("Enter tag:"),
386 tag)) { 387 tag,
388 false)) {
387 if (!tag.isEmpty()) //!!! do something better if it is empty 389 if (!tag.isEmpty()) //!!! do something better if it is empty
388 { 390 {
389 params << "tag" << "--user" << getUserInfo() << filterTag(tag); 391 params << "tag" << "--user" << getUserInfo() << filterTag(tag);
390 392
391 runner -> startHgCommand(workFolderPath, params); 393 runner -> startHgCommand(workFolderPath, params);
575 { 577 {
576 if (runningAction == ACT_NONE) 578 if (runningAction == ACT_NONE)
577 { 579 {
578 QStringList params; 580 QStringList params;
579 581
582 if (!QDir(workFolderPath).exists()) {
583 if (!QDir().mkpath(workFolderPath)) {
584 DEBUG << "hgCloneFromRemote: Failed to create target path "
585 << workFolderPath << endl;
586 //!!! report error
587 return;
588 }
589 }
590
580 params << "clone" << remoteRepoPath << workFolderPath; 591 params << "clone" << remoteRepoPath << workFolderPath;
592
593 hgTabs->setWorkFolderAndRepoNames(workFolderPath, remoteRepoPath);
581 594
582 runner -> startHgCommand(workFolderPath, params); 595 runner -> startHgCommand(workFolderPath, params);
583 runningAction = ACT_CLONEFROMREMOTE; 596 runningAction = ACT_CLONEFROMREMOTE;
584 } 597 }
585 } 598 }