[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdesdk/scripts
From:       Thiago Macieira <thiago () kde ! org>
Date:       2006-01-31 22:19:45
Message-ID: 1138745985.844675.2444.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 504381 by thiago:

Avoid this one error message
Allow one to quit before committing.


 M  +23 -8     svnintegrate  


--- trunk/KDE/kdesdk/scripts/svnintegrate #504380:504381
@@ -224,7 +224,7 @@
     run("svn", "switch", "-r", $revision, "$svnroot$dirname/$file", $file);
   }
   
-  run("rm", "svn-commit.tmp");
+  run("rm", "svn-commit.tmp") if (-e "svn-commit.tmp");
 }
 
 sub switchAllFiles()
@@ -389,13 +389,28 @@
 
 sub editLogMessage()
 {
-  print "Press Enter to accept default log or anything else to modify it\n";
-  
-  my $answer = <STDIN>;
-  $answer =~ s/\r?\n$//;
-  if (length($answer))
+  while (1)
   {
-    run($EDITOR, "svn-commit.tmp");
+    print "Press Enter to accept the log message and commit\n";
+    print "Press 'Q' to revert and quit\n";
+    print "Press any other key to edit the log message\n";
+    
+    my $answer = <STDIN>;
+    $answer =~ s/\r?\n$//;
+    $answer =~ tr/Q/q/;
+    if ($answer eq "q")
+    {
+      rollback();
+      exit(0);
+    }  
+    elsif (length($answer))
+    {
+      run($EDITOR, "svn-commit.tmp");
+    }
+    else
+    {
+      return;
+    }
   }
 }
 
@@ -458,4 +473,4 @@
 showDiff();
 createLogMessage();
 editLogMessage();
-commit();
\ No newline at end of file
+commit();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic