[devscripts] 01/01: debcheckout: Support salsa.debian.org.
Christoph Berg
myon at debian.org
Tue Dec 26 11:13:45 UTC 2017
This is an automated email from the git hooks/post-receive script.
myon pushed a commit to branch master
in repository devscripts.
commit e528a83c9280713427022ce67286a353b35b1100
Author: Christoph Berg <myon at debian.org>
Date: Tue Dec 26 12:13:41 2017 +0100
debcheckout: Support salsa.debian.org.
---
debian/changelog | 3 +++
scripts/debcheckout.pl | 25 +++++++++++++------------
2 files changed, 16 insertions(+), 12 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 9b14db9..e29f231 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -32,6 +32,9 @@ devscripts (2.17.12) UNRELEASED; urgency=medium
+ decode HTTP responses, to support pages that are served encoded with
gzip (`Content-Encoding: gzip`)
+ [ Christoph Berg ]
+ * debcheckout: Support salsa.debian.org.
+
-- Mattia Rizzolo <mattia at debian.org> Mon, 30 Oct 2017 07:48:10 +0100
devscripts (2.17.11) unstable; urgency=medium
diff --git a/scripts/debcheckout.pl b/scripts/debcheckout.pl
index 35c9bda..799fb21 100755
--- a/scripts/debcheckout.pl
+++ b/scripts/debcheckout.pl
@@ -74,13 +74,13 @@ B<GENERAL OPTIONS>
=item B<-a>, B<--auth>
Work in authenticated mode; this means that for known repositories (mainly those
-hosted on S<I<https://alioth.debian.org>>) URL rewriting is attempted before
+hosted on S<I<https://salsa.debian.org>>) URL rewriting is attempted before
checking out, to ensure that the repository can be committed to. For example,
-for Subversion repositories hosted on alioth this means that
-S<I<svn+ssh://svn.debian.org/...>> will be used instead of
-S<I<svn://svn.debian.org/...>>.
+for Git repositories hosted on Salsa this means that
+S<I<git at salsa.debian.org:...git>> will be used instead of
+S<I<https://salsa.debian.org/...git>>.
-There are built-in rules for alioth.debian.org and github.com. Other hosts
+There are built-in rules for salsa.debian.org, alioth.debian.org and github.com. Other hosts
can be configured using B<DEBCHECKOUT_AUTH_URLS>.
=item B<-d>, B<--details>
@@ -198,9 +198,9 @@ for authenticated mode (see B<-a>) have failed.
References to matching substrings in the replacement texts are
allowed as usual in Perl by the means of B<$1>, B<$2>, ... and so on.
-This setting can be used to enable authenticated mode for most repositories
-out there. Note that the Debian repositories on S<alioth.debian.org>
-(S<$vcs.debian.org>) are implicitly defined.
+This setting is used to configure the "authenticated mode" location for
+repositories. The Debian repositories on S<salsa.debian.org> are implicitly
+defined, as is S<github.com>.
Here is a sample snippet suitable for the configuration files:
@@ -439,7 +439,7 @@ sub user_set_auth($$) {
}
# Patch a given repository URL to ensure that the checked out out repository
-# can be committed to. Only works for well known repositories (mainly Alioth's).
+# can be committed to. Only works for well known repositories (mainly Salsa's).
sub set_auth($$$$) {
my ($repo_type, $url, $user, $dont_act) = @_;
@@ -450,7 +450,7 @@ sub set_auth($$$$) {
$user_local =~ s|(.*)(@)|$1|;
my $user_url = $url;
- # Adjust urls from new-style anonymous access to old-style and then deal
+ # Adjust alioth urls from new-style anonymous access to old-style and then deal
# with adjusting for authentication on alioth
$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@;
@@ -478,7 +478,8 @@ sub set_auth($$$$) {
}
}
when ("git") {
- if ($url =~ m%(/users/|~)%) {
+ if ($url =~ s!^https://salsa.debian.org/!git\@salsa.debian.org:!) {
+ } elsif ($url =~ m%(/users/|~)%) {
$user_url =~ s|^\w+://(git\.debian\.org)/git/users/(.*?)/.*|$2|;
$user_url =~ s|^\w+://(git\.debian\.org)/~(.*?)/.*|$2|;
@@ -505,7 +506,7 @@ sub set_auth($$$$) {
if ($url eq $old_url) { # last attempt: try with user-defined rules
$url = user_set_auth($repo_type, $url);
}
- die "can't use authenticated mode on repository '$url' since it is not a known repository (e.g. alioth)\n"
+ die "can't use authenticated mode on repository '$url' since it is not a known repository (e.g. salsa.debian.org)\n"
if $url eq $old_url;
return $url;
}
--
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