[SCM] Git repository for devscripts branch, jessie, updated. v2.12.4-105-gdf54cb4

James McCoy jamessan at debian.org
Sun Nov 25 17:40:51 UTC 2012


The following commit has been merged in the jessie branch:
commit df54cb4a92afe1686e5acffc9cc8aac83f45ca46
Author: James McCoy <jamessan at debian.org>
Date:   Sun Nov 25 12:40:43 2012 -0500

    debcommit: Add changelog info support for bzr
    
    Signed-off-by: James McCoy <jamessan at debian.org>

diff --git a/README b/README
index 1d08fc9..8b25760 100644
--- a/README
+++ b/README
@@ -80,7 +80,7 @@ And now, in mostly alphabetical order, the scripts:
 - debcommit: Commits changes to cvs, darcs, svn, svk, tla, bzr, git, or hg,
   using new entries in debian/changelog as the commit message. Also supports
   tagging Debian package releases. [cvs | darcs | subversion | svk | tla |
-  bzr | git-core | mercurial]
+  bzr | git-core | mercurial, libtimedate-perl]
 
 - debdiff: A program which examines two .deb files or two .changes files and
   reports on any difference found in their file lists.  Useful for ensuring
diff --git a/debian/changelog b/debian/changelog
index 841aab6..afae779 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,7 +13,7 @@ devscripts (2.12.6+exp1) UNRELEASED; urgency=low
     + Drop checks for old dpkg versions and always use the necessary Perl
       modules (Dpkg::Changelog::Parse, Dpkg::Vendor::Ubuntu,
       Dpkg::Changelog::Entry::Debian).
-    + Add changelog info support for hg.
+    + Add changelog info support for hg and bzr.
 
   [ Dmitry Smirnov ]
   * licensecheck: Remove any regular comments pattern. (Closes: #526698)
diff --git a/debian/control b/debian/control
index 24e6165..fbf74f7 100644
--- a/debian/control
+++ b/debian/control
@@ -125,7 +125,8 @@ Description: scripts to make the life of a Debian Package maintainer easier
   - debclean: purge a Debian source tree [fakeroot]
   - debcommit: commit changes to cvs, darcs, svn, svk, tla, bzr, git, or hg,
     basing commit message on changelog
-    [cvs | darcs | subversion | svk | tla | bzr | git-core | mercurial]
+    [cvs | darcs | subversion | svk | tla | bzr | git-core | mercurial,
+    libtimedate-perl]
   - debdiff: compare two versions of a Debian package to check for
     added and removed files [wdiff, patchutils]
   - debi: install a just-built package
diff --git a/scripts/debcommit.pl b/scripts/debcommit.pl
index 563d221..12ffdd3 100755
--- a/scripts/debcommit.pl
+++ b/scripts/debcommit.pl
@@ -559,9 +559,27 @@ sub commit {
 	if ($diffmode) {
 	    $action_rc = action($prog, "diff", @files_to_commit);
 	} else {
-	    my @fixes_arg = bzr_find_fixes($message);
+	    my @extra_args = bzr_find_fixes($message);
+	    if ($changelog_info) {
+		eval {
+		    require Date::Format;
+		    require Date::Parse;
+		};
+		if ($@) {
+		    my $error = "$progname: Couldn't format the changelog date: ";
+		    if ($@ =~ m%^Can\'t locate Date%) {
+			$error .= "the libtimedate-perl package is not installed";
+		    } else {
+			$error .= "couldn't load Date::Format/Date::Parse: $@";
+		    }
+		    die "$error\n";
+		}
+		my @time = Date::Parse::strptime($date);
+		my $time = Date::Format::strftime('%Y-%m-%d %H:%M:%S %z', \@time);
+		push(@extra_args, "--author=$maintainer", "--commit-time=$time");
+	    }
 	    $action_rc = action($prog, "commit", "-m", $message,
-		@fixes_arg, @files_to_commit);
+		@extra_args, @files_to_commit);
 	}
     }
     elsif ($prog eq 'darcs') {

-- 
Git repository for devscripts



More information about the devscripts-devel mailing list