[csw-devel] SF.net SVN: gar:[3354] csw/mgar/pkg/git/trunk

bdwalton at users.sourceforge.net bdwalton at users.sourceforge.net
Mon Feb 23 01:43:29 CET 2009


Revision: 3354
          http://gar.svn.sourceforge.net/gar/?rev=3354&view=rev
Author:   bdwalton
Date:     2009-02-23 00:43:29 +0000 (Mon, 23 Feb 2009)

Log Message:
-----------
clean up strftime patch for submission upstream

Modified Paths:
--------------
    csw/mgar/pkg/git/trunk/Makefile
    csw/mgar/pkg/git/trunk/checksums

Added Paths:
-----------
    csw/mgar/pkg/git/trunk/files/0001-git-svn-fix-for-systems-without-strftime-z.patch

Removed Paths:
-------------
    csw/mgar/pkg/git/trunk/files/git-svn-strftime.patch

Modified: csw/mgar/pkg/git/trunk/Makefile
===================================================================
--- csw/mgar/pkg/git/trunk/Makefile	2009-02-22 22:09:33 UTC (rev 3353)
+++ csw/mgar/pkg/git/trunk/Makefile	2009-02-23 00:43:29 UTC (rev 3354)
@@ -47,7 +47,8 @@
 MASTER_SITES = http://kernel.org/pub/software/scm/$(GARNAME)/
 DISTFILES  = $(GARNAME)-$(GARVERSION).tar.bz2
 
-PATCHFILES = doc-makefile.patch git-svn-strftime.patch
+PATCHFILES = doc-makefile.patch
+PATCHFILES += 0001-git-svn-fix-for-systems-without-strftime-z.patch
 
 PKGFILES_CSWgitsvn = .*svn.*
 PKGFILES_CSWgitgui = .*git-gui.* .*git-citool.*
@@ -69,7 +70,7 @@
 
 BUILD_ARGS = MSGFMT=gmsgfmt SHELL_PATH=/opt/csw/bin/bash \
 		ETC_CONFIG=$(sysconfdir)/gitconfig V=1 \
-		all doc
+		all
 
 INSTALL_ARGS = ETC_CONFIG=$(sysconfdir)/gitconfig install-doc
 

Modified: csw/mgar/pkg/git/trunk/checksums
===================================================================
--- csw/mgar/pkg/git/trunk/checksums	2009-02-22 22:09:33 UTC (rev 3353)
+++ csw/mgar/pkg/git/trunk/checksums	2009-02-23 00:43:29 UTC (rev 3354)
@@ -1,3 +1,3 @@
 e31ea5ce9b076f5745056f01465e9602  download/git-1.6.1.3.tar.bz2
 075441ea2a95cfa5fd7aaebb888a93f3  download/doc-makefile.patch
-e8b5e89c38958bbcd5a5dbc29124ebc2  download/git-svn-strftime.patch
+eb302356ce2cfbf076d3e86aa450f97a  download/0001-git-svn-fix-for-systems-without-strftime-z.patch

Added: csw/mgar/pkg/git/trunk/files/0001-git-svn-fix-for-systems-without-strftime-z.patch
===================================================================
--- csw/mgar/pkg/git/trunk/files/0001-git-svn-fix-for-systems-without-strftime-z.patch	                        (rev 0)
+++ csw/mgar/pkg/git/trunk/files/0001-git-svn-fix-for-systems-without-strftime-z.patch	2009-02-23 00:43:29 UTC (rev 3354)
@@ -0,0 +1,47 @@
+From 1f6308edd35dde7e9f4a73c9a446b353020b73c2 Mon Sep 17 00:00:00 2001
+From: Ben Walton <bwalton at artsci.utoronto.ca>
+Date: Sun, 22 Feb 2009 13:53:11 -0500
+Subject: [PATCH] git-svn fix for systems without strftime %z
+
+%z isn't available on all platforms in the date formatting
+routines.  Detect when %z is ignored and insert the
+the proper value if necessary.
+---
+ git-svn.perl |   14 +++++++++++++-
+ 1 files changed, 13 insertions(+), 1 deletions(-)
+
+diff --git a/git-svn.perl b/git-svn.perl
+index cbc5211..66f49b4 100755
+--- a/git-svn.perl
++++ b/git-svn.perl
+@@ -4615,6 +4615,7 @@ package Git::SVN::Log;
+ use strict;
+ use warnings;
+ use POSIX qw/strftime/;
++use Time::Local;
+ use constant commit_log_separator => ('-' x 72) . "\n";
+ use vars qw/$TZ $limit $color $pager $non_recursive $verbose $oneline
+             %rusers $show_commit $incremental/;
+@@ -4721,7 +4722,18 @@ sub run_pager {
+ }
+ 
+ sub format_svn_date {
+-	return strftime("%Y-%m-%d %H:%M:%S %z (%a, %d %b %Y)", localtime(shift));
++	my $timestr = strftime("%Y-%m-%d %H:%M:%S %z (%a, %d %b %Y)", localtime(shift));
++
++	# for systems without %z (solaris 8, 9, etc)
++	if ($timestr =~ /%z/) {
++		my $lt = time;
++		my $gm = timelocal(gmtime($lt));
++		my $sign = qw( + + - )[ $lt <=> $gm ];
++		my $gmoff = sprintf("%s%02d%02d", $sign, (gmtime(abs($lt - $gm)))[2,1]);
++		$timestr =~ s/%z/$gmoff/;
++	}
++
++	return $timestr;
+ }
+ 
+ sub parse_git_date {
+-- 
+1.6.0.4
+

Deleted: csw/mgar/pkg/git/trunk/files/git-svn-strftime.patch
===================================================================
--- csw/mgar/pkg/git/trunk/files/git-svn-strftime.patch	2009-02-22 22:09:33 UTC (rev 3353)
+++ csw/mgar/pkg/git/trunk/files/git-svn-strftime.patch	2009-02-23 00:43:29 UTC (rev 3354)
@@ -1,31 +0,0 @@
---- git-1.6.1.3/git-svn.perl.orig	2009-02-19 22:03:27.303694837 +0100
-+++ git-1.6.1.3/git-svn.perl	2009-02-19 22:05:09.370651606 +0100
-@@ -41,6 +41,8 @@
- use File::Path qw/mkpath/;
- use Getopt::Long qw/:config gnu_getopt no_ignore_case auto_abbrev/;
- use IPC::Open3;
-+use POSIX;
-+use Time::Local;
- use Git;
- 
- BEGIN {
-@@ -4525,7 +4527,18 @@
- }
- 
- sub format_svn_date {
--	return strftime("%Y-%m-%d %H:%M:%S %z (%a, %d %b %Y)", localtime(shift));
-+        my $timestr = strftime("%Y-%m-%d %H:%M:%S %z (%a, %d %b %Y)", localtime(shift));
-+
-+	# for systems without %z (solaris 8, 9, etc)
-+	if ($timestr =~ /%z/) {
-+	    my $localt = time;
-+	    my $gm = Time::Local::timelocal( gmtime $localt );
-+	    my $sign = qw( + + - )[ $localt <=> $gm ];
-+	    my $calc = sprintf "%s%02d%02d", $sign, (gmtime abs( $localt - $gm ))[2,1];
-+	    $timestr =~ s/%z/$calc/;
-+	}
-+
-+	return $timestr;
- }
- 
- sub parse_git_date {


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list