threads / patch / 7014

patchgit-cvsexportcommit: don't cleanup .msg if not yet committed to cvs.

Subject: [PATCH] git-cvsexportcommit: don't cleanup .msg if not yet committed to cvs.

## tl;dr

3 messages between Feb 28, 2007 and Mar 1, 2007. Diffs are folded; open one to read it.

replies: 2people: 3as markdown or json

Gerrit Pape· Feb 28, 2007, 12:35 UTC · lore

Unless the -c option is given, and the commit to cvs was successful, .msg shouldn't be deleted to be able to run the command suggested by git-cvsexportcommit.

See http://bugs.debian.org/412732
Signed-off-by: Gerrit Pape <pape@smarden.org>
---
 git-cvsexportcommit.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
Show changes to git-cvsexportcommit.perl +2 −1
diff --git a/git-cvsexportcommit.perl b/git-cvsexportcommit.perl
index d08216c..67224b4 100755
--- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -248,13 +248,14 @@ if ($opt_c) {
 	die "Exiting: The commit did not succeed";
     }
     print "Committed successfully to CVS\n";
+    # clean up
+    unlink(".msg");
 } else {
     print "Ready for you to commit, just run:\n\n   $cmd\n";
 }
 
 # clean up
 unlink(".cvsexportcommit.diff");
-unlink(".msg");
 
 sub usage {
 	print STDERR <<END;
-- 
1.5.0.1
Simon 'corecode' Schubert· Mar 1, 2007, 01:17 UTC · re: Gerrit Pape · lore

Re: [PATCH] git-cvsexportcommit: don't cleanup .msg if not yet committed to cvs.

Gerrit Pape wrote:
> Unless the -c option is given, and the commit to cvs was successful,
> .msg shouldn't be deleted to be able to run the command suggested by
> git-cvsexportcommit.
thanks, i've been meaning to search for the cause of this.
cheers
  simon
-- 
Serve - BSD     +++  RENT this banner advert  +++    ASCII Ribbon   /"\
Work - Mac      +++  space for low €€€ NOW!1  +++      Campaign     \ /
Party Enjoy Relax   |   http://dragonflybsd.org      Against  HTML   \
Dude 2c 2 the max   !   http://golden-apple.biz       Mail + News   / \
Martin Langhoff· Mar 1, 2007, 01:29 UTC · re: Gerrit Pape · lore

Re: [PATCH] git-cvsexportcommit: don't cleanup .msg if not yet committed to cvs.

Ack. I though I had sent this same fix about a month ago as

"cvsexportcommit: do not delete .msg when performing manual commits" 461cc1944cf17210149c20bafa7dbbc467b2e89f

but it looks like I didn't. Shame on me.
martin

← back to recent threads