[devscripts] 01/01: debcheckout: handle cgit URLs too

Paul Wise pabs at moszumanska.debian.org
Mon Apr 3 11:55:42 UTC 2017


This is an automated email from the git hooks/post-receive script.

pabs pushed a commit to branch master
in repository devscripts.

commit 4e1867dc132739c5a5c83b3f14e8cfdba6515ba9
Author: Paul Wise <pabs at debian.org>
Date:   Sat Feb 11 10:54:28 2017 +0800

    debcheckout: handle cgit URLs too
    
    Suggested-by: Rhonda
    Suggested-in: #devscripts
---
 debian/changelog       | 2 ++
 scripts/debcheckout.pl | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b406871..4015df8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -12,6 +12,8 @@ devscripts (2.17.6) UNRELEASED; urgency=medium
   [ Paul Wise ]
   * chdist:
     + add support for running aptitude
+  * debcheckout:
+    + handle cgit URLs too. Thanks to Rhonda for the suggestion.
   * Make various scripts work when HOME is unset:
     bts chdist debcommit dscverify grep-excuses
     namecheck rc-alert svnpath wnpp-alert
diff --git a/scripts/debcheckout.pl b/scripts/debcheckout.pl
index 8142385..1f61aa2 100755
--- a/scripts/debcheckout.pl
+++ b/scripts/debcheckout.pl
@@ -455,7 +455,7 @@ sub set_auth($$$$) {
     $url =~ s@(?:alioth\.debian\.org/(?:anonscm/bzr|scm/loggerhead/bzr)|anonscm\.debian\.org/bzr(?:/bzr)?)@bzr.debian.org/bzr@;
     $url =~ s@(?:alioth\.debian\.org/anonscm/darcs|anonscm\.debian\.org/darcs)@darcs.debian.org/darcs@;
     $url =~ s at git://anonscm\.debian\.org at git://git.debian.org@;
-    $url =~ s@(?:alioth\.debian\.org/anonscm/git|anonscm\.debian\.org/git)@git.debian.org/git@;
+    $url =~ s@(?:alioth\.debian\.org/anonscm/c?git|anonscm\.debian\.org/c?git)@git.debian.org/git@;
     $url =~ s@(?:alioth\.debian\.org/anonscm/hg|anonscm\.debian\.org/hg)@hg.debian.org/hg@;
     $url =~ s at svn://(?:scm\.alioth|anonscm)\.debian\.org at svn://svn.debian.org@;
 
@@ -971,8 +971,9 @@ sub guess_repo_type($$) {
 	$repo_type = $1;
     } elsif ($repo_url =~ /^https?:\/\/(svn|git|hg|bzr|darcs)\.debian\.org/) {
 	$repo_type = $1;
-    } elsif ($repo_url =~ m@^https?://anonscm.debian.org/(svn|git|hg|bzr|darcs)/@) {
+    } elsif ($repo_url =~ m@^https?://anonscm.debian.org/(svn|c?git|hg|bzr|darcs)/@) {
 	$repo_type = $1;
+	$repo_type =~ s/cgit/git/;
     }
     return $repo_type;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git



More information about the devscripts-devel mailing list