Bug#343694: devscripts: debcommit doesn't support git

2005-12-17 Thread Panagiotis Issaris
Package: devscripts
Version: 2.9.10
Severity: wishlist
Tags: patch

There's no support in debcommit for maintainers using GIT.

The accompanying patch adds GIT support to debcommit.


diff -Naur devscripts-2.9.10-orig/debcommit.pl devscripts-2.9.10/debcommit.pl
--- devscripts-2.9.10-orig/debcommit.pl 2005-12-17 10:53:36.0 +0100
+++ devscripts-2.9.10/debcommit.pl  2005-12-17 11:19:01.0 +0100
@@ -11,8 +11,8 @@
 =head1 DESCRIPTION
 
 debcommit generates a commit message based on new text in debian/changelog,
-and commits the change to a package's cvs, svn, svk, arch, or bzr
-repository. It must be run in a cvs, svn, svk, arch, or bzr working copy for
+and commits the change to a package's cvs, svn, svk, arch, bzr or git
+repository. It must be run in a cvs, svn, svk, arch, bzr or git working copy 
for
 the package.
 
 =head1 OPTIONS
@@ -22,7 +22,7 @@
 =item -r --release
 
 Commit a release of the package. The version number is determined from
-debian/changelog, and is used to tag the package in cvs, svn, svk, or arch.
+debian/changelog, and is used to tag the package in cvs, svn, svk, arch or git.
 bzr does not yet support symbolic tags, so you will only get a normal
 commit.
 
@@ -106,6 +106,9 @@
 elsif (-d .bzr) {
return bzr;
 }
+elsif (-d .git) {
+   return git;
+}
 else {
# svk has no useful directories so try to run it.
my $svkpath=`svk info . 2/dev/null| grep -i '^Depot Path:' | cut -d ' 
' -f 2`;
@@ -133,6 +136,11 @@
die commit failed\n;
}
 }
+elsif ($prog eq 'git') {
+   if (! action($prog, commit, -a, -m, $message)) {
+   die commit failed\n;
+   }
+}
 elsif ($prog eq 'tla' || $prog eq 'baz') {
my $summary=$message;
$summary=~s/^((?:\* )?[^\n]{1,72})(?:(?:\s|\n).*|$)/$1/ms;
@@ -199,17 +207,24 @@
 elsif ($prog eq 'bzr') {
warn No support for symbolic tags in bzr yet.\n;
 }
+elsif ($prog eq 'git') {
+   $tag=~s/^[0-9]+://; # strip epoch
+   $tag=debian_version_$tag;
+   if (! action($prog, tag, $tag)) {
+   die failed tagging with $tag\n;
+   }
+}
 }
 
 sub getmessage {
 my $ret;
 
 if ($prog eq 'cvs' || $prog eq 'svn' || $prog eq 'svk' ||
-   $prog eq 'tla' || $prog eq 'baz' || $prog eq 'bzr') {
+   $prog eq 'tla' || $prog eq 'baz' || $prog eq 'bzr' || $prog eq 'git') {
$ret='';
my $subcommand;
if ($prog eq 'cvs' || $prog eq 'svn' || $prog eq 'svk' ||
-   $prog eq 'bzr') {
+   $prog eq 'bzr' || $prog eq 'git' ) {
$subcommand = 'diff';
} else {
$subcommand = 'file-diff';
diff -Naur devscripts-2.9.10-orig/README devscripts-2.9.10/README
--- devscripts-2.9.10-orig/README   2005-12-17 10:53:36.0 +0100
+++ devscripts-2.9.10/README2005-12-17 11:21:53.0 +0100
@@ -59,8 +59,8 @@
   the .diffs and original files, though, so that the binaries and
   other files can be rebuilt if necessary.
 
-- debcommit [cvs | subversion | tla | bazaar ]: Commits changes to 
-  cvs, svn, or arch, using new entries in debian/changelog as the
+- debcommit [cvs | subversion | tla | bazaar | git]: Commits changes to 
+  cvs, svn, arch or git, using new entries in debian/changelog as the
   commit message. Also supports tagging Debian package releases.
 
 - debdiff [wdiff, patchutils]: A program which examines two .deb files
@@ -175,7 +175,7 @@
 2. Editing of files
 
 3. Log the changes with: dch -i I changed this
-   If desired, use debcommit to commit changes to cvs, svn, or arch.
+   If desired, use debcommit to commit changes to cvs, svn, arch or git.
 
 4. Run debuild to compile it.  If it fails, return to 2.  (You could
also just test the compilation by running the appropriate part of


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#343694: devscripts: debcommit doesn't support git

2005-12-17 Thread Julian Gilbey
On Sat, Dec 17, 2005 at 11:36:27AM +0100, Panagiotis Issaris wrote:
 Package: devscripts
 Version: 2.9.10
 Severity: wishlist
 Tags: patch
 
 There's no support in debcommit for maintainers using GIT.
 
 The accompanying patch adds GIT support to debcommit.

OK, will do on my return from vacation (unless one of the other
maintainers beats me to it).

   Julian


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]