diff 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
line wrap: on
line diff
--- a/mainwindow.cpp	Wed Nov 24 22:44:40 2010 +0000
+++ b/mainwindow.cpp	Thu Nov 25 14:30:40 2010 +0000
@@ -336,7 +336,8 @@
                                                     tr("About to commit the following files:"),
                                                     tr("About to commit %1 files."),
                                                     files,
-                                                    comment)) {
+                                                    comment,
+                                                    true)) {
 
             //!!! do something more sensible when the comment is empty
             // (i.e. tell the user about it?)
@@ -383,7 +384,8 @@
         if (ConfirmCommentDialog::confirmAndComment(this,
                                                     tr("Tag"),
                                                     tr("Enter tag:"),
-                                                    tag)) {
+                                                    tag,
+                                                    false)) {
             if (!tag.isEmpty()) //!!! do something better if it is empty
             {
                 params << "tag" << "--user" << getUserInfo() << filterTag(tag);
@@ -577,8 +579,19 @@
     {
         QStringList params;
 
+        if (!QDir(workFolderPath).exists()) {
+            if (!QDir().mkpath(workFolderPath)) {
+                DEBUG << "hgCloneFromRemote: Failed to create target path "
+                        << workFolderPath << endl;
+                //!!! report error
+                return;
+            }
+        }
+
         params << "clone" << remoteRepoPath << workFolderPath;
 
+        hgTabs->setWorkFolderAndRepoNames(workFolderPath, remoteRepoPath);
+
         runner -> startHgCommand(workFolderPath, params);
         runningAction = ACT_CLONEFROMREMOTE;
     }