bug-vc-dwim
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-vc-dwim] [PATCH] vc-dwim: commit symlink'd ChangeLog *after* primar


From: Jim Meyering
Subject: [Bug-vc-dwim] [PATCH] vc-dwim: commit symlink'd ChangeLog *after* primary commit, not before
Date: Fri, 30 Oct 2009 14:33:54 +0100

FYI,


>From da175e0ccbe06740cd9818b1b692944049017d69 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 30 Oct 2009 14:32:57 +0100
Subject: [PATCH] vc-dwim: commit symlink'd ChangeLog *after* primary commit, 
not before

* vc-dwim.pl (do_commit): Set DIE_UPON_FAILURE.
(main): With a symlink'd ChangeLog file, attempt the primary commit
before the ChangeLog commit, since the primary one is far more likely
to fail, e.g., due to a commit hook.  In that case, the ChangeLog
delta is left uncommitted, as you probably require, so that you
can run vc-dwim after correcting the problem with the primary commit.
---
 ChangeLog  |   10 ++++++++++
 vc-dwim.pl |    4 ++--
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c11b93c..b8db0a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2009-10-30  Jim Meyering  <address@hidden>
+
+       vc-dwim: commit symlink'd ChangeLog *after* primary commit, not before
+       * vc-dwim.pl (do_commit): Set DIE_UPON_FAILURE.
+       (main): With a symlink'd ChangeLog file, attempt the primary commit
+       before the ChangeLog commit, since the primary one is far more likely
+       to fail, e.g., due to a commit hook.  In that case, the ChangeLog
+       delta is left uncommitted, as you probably require, so that you
+       can run vc-dwim after correcting the problem with the primary commit.
+
 2009-09-09  Jim Meyering  <address@hidden>

        maint: use correct directory name in generated announcement
diff --git a/vc-dwim.pl b/vc-dwim.pl
index c6668a8..3a77d48 100755
--- a/vc-dwim.pl
+++ b/vc-dwim.pl
@@ -558,7 +558,7 @@ sub do_commit ($$$$)
     {
      DEBUG => $debug,
      VERBOSE => $verbose,
-     DIE_UPON_FAILURE => 0,
+     DIE_UPON_FAILURE => 1,
      INHIBIT_STDOUT => 0,
     };
   run_command ($options, @cmd);
@@ -1051,11 +1051,11 @@ sub main

       if ($symlinked_changelog)
         {
+          do_commit $vc, $author, address@hidden, address@hidden;
           do_at (dirname ($symlinked_changelog),
                  sub { do_commit ($vc_changelog, $author,
                                   ['non-empty-commit-msg'],
                                   [basename ($symlinked_changelog)])});
-          do_commit $vc, $author, address@hidden, address@hidden;
         }
       else
         {
--
1.6.5.2.375.g164f1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]