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

3 messages from 2007-02-28 to 2007-03-01. Participants: Gerrit Pape, Simon 'corecode' Schubert, Martin Langhoff.
Thread: https://gitlist.dev/t/7014

## Gerrit Pape, 2007-02-28 12:35

Subject: [PATCH] git-cvsexportcommit: don't cleanup .msg if not yet committed to cvs.
Message-ID: <20070228123539.23809.qmail@d6daeb0e3466c1.315fe32.mid.smarden.org>
URL: https://gitlist.dev/e/20070228123539.23809.qmail%40d6daeb0e3466c1.315fe32.mid.smarden.org
In-Reply-To: <20070227181721.GA4244@bogon.ms20.nix>

```
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(-)

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, 2007-03-01 01:17

Subject: Re: [PATCH] git-cvsexportcommit: don't cleanup .msg if not yet committed to cvs.
Message-ID: <45E629B1.2050805@fs.ei.tum.de>
URL: https://gitlist.dev/e/45E629B1.2050805%40fs.ei.tum.de
In-Reply-To: <20070228123539.23809.qmail@d6daeb0e3466c1.315fe32.mid.smarden.org>

```
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, 2007-03-01 01:29

Subject: Re: [PATCH] git-cvsexportcommit: don't cleanup .msg if not yet committed to cvs.
Message-ID: <46a038f90702281729r71fd8241t554a3a281d211ecb@mail.gmail.com>
URL: https://gitlist.dev/e/46a038f90702281729r71fd8241t554a3a281d211ecb%40mail.gmail.com
In-Reply-To: <20070228123539.23809.qmail@d6daeb0e3466c1.315fe32.mid.smarden.org>

```
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

```
