libtool-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Libtool branch, master, updated. v2.2.4-51-g96e199b


From: Gary V. Vaughan
Subject: [SCM] GNU Libtool branch, master, updated. v2.2.4-51-g96e199b
Date: Sun, 07 Sep 2008 11:53:24 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Libtool".

The branch, master has been updated
       via  96e199bd5142ebd542e587d5f3379d1e762b3ff7 (commit)
      from  35bd5f31765013e9e3f22a10874b2014cebc428e (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 96e199bd5142ebd542e587d5f3379d1e762b3ff7
Author: Gary V. Vaughan <address@hidden>
Date:   Sun Sep 7 19:53:16 2008 +0800

    Add untested git push conflict testing to commit script.
    * clcommit.m4sh (func_check_conflicts): Test return status
    of 'git push --dry-run', and display an error on non-zero.
    
    Signed-off-by: Gary V. Vaughan <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog     |    4 ++++
 clcommit.m4sh |   14 +++++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 07b5074..7ac504c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2008-09-07  Gary V. Vaughan  <address@hidden>
 
+       Add untested git push conflict testing to commit script.
+       * clcommit.m4sh (func_check_conflicts): Test return status
+       of 'git push --dry-run', and display an error on non-zero.
+
        Enable release procedure to work with lzma OLDRELEASE file.
        * Makefile.maint (diffs, prev-tarball, new-tarball): If lzma
        tarballs are present use them to generate the diffs, otherwise
diff --git a/clcommit.m4sh b/clcommit.m4sh
index 4eefd07..3394311 100644
--- a/clcommit.m4sh
+++ b/clcommit.m4sh
@@ -110,6 +110,7 @@ fi
 signature_file=
 log_dir="`func_mktempdir`"
 log_file="$log_dir/log"
+push_conflicts="$log_dir/git_push.log"
 
 trap '$RM -r "$log_dir"; exit $EXIT_FAILURE' 1 2 15
 
@@ -289,9 +290,9 @@ set -e
 # func_check_conflicts
 func_check_conflicts ()
 {
-    # HELP?!?  How to check for git push conflicts?
-    if false; then
-      func_fatal_error "some conflicts were found with CVS repository, 
aborting..."
+    if $GIT push --dry-run > "$push_conflicts" 2>&1; then :; else
+      cat "$push_conflicts" >&2
+      func_fatal_error "some conflicts were found with upstream repository, 
aborting..."
     fi
 }
 
@@ -420,8 +421,6 @@ func_mailnotify ()
 ## ----- ##
 
 {
-  $opt_update && func_check_conflicts
-
   test -f "$log_file" || func_check_commit_msg
 
   grep '[^     ]' < "$log_file" > /dev/null ||
@@ -432,15 +431,16 @@ func_mailnotify ()
     func_error "*** They should be used to separate distinct commits."
   fi
 
+  $opt_update && $opt_push && func_check_conflicts
+
   # Do not check for empty $log_file again, even though the user might have
   # zeroed it out.  If s/he did, it was probably intentional.
   if $opt_commit; then
     func_commit ${1+"$@"}
   fi
 
-  subject=`sed -n '1p' "$log_file"`
-
   # Send a copy of the log_file if sendmail_to was set:
+  subject=`sed -n '1p' "$log_file"`
   if test -n "$sendmail_to"; then
     if ! $opt_push; then
       func_warning "Mail notification NOT sent for commit to local repository."


hooks/post-receive
--
GNU Libtool




reply via email to

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