Package: devscripts
Version: 2.10.9
Severity: wishlist
Tags: patch
Hello,
since Oct 4th [1], Alioth supports darcs repositories in the same way
as the other VCSs. debchekcout already supports retrieveing a darcs
repository. The attached patches adds authentication mode support for
darcs repositories, for both group and personal repositories.
About the latters, two different solution can be implemented.
1) the first one is to keep the darcs.d.o status quo, i.e. the
personal repositories are linked as
http://darcs.debian.org/~$USER/$REPO
and debcheckout applies the attached patch, which optionally check
for write authorization on the remote repository. This means that
the local user is the one that owns the remote repository.
--8<---------------cut here---------------start------------->8---
Index: scripts/debcheckout.pl
===================================================================
--- scripts/debcheckout.pl (revision 811)
+++ scripts/debcheckout.pl (working copy)
@@ -154,6 +154,19 @@
$user .= "@" if length $user;
switch ($repo_type) {
case "bzr" { $url =~
s|^\w+://(bzr\.debian\.org)/(.*)|sftp://$user$1/bzr/$2|; }
+ case "darcs" {
+ if ($url =~ m|(~)|) {
+ my $user_local = $user;
+ $user_local =~ s|(.*)(@)|$1|;
+ my $user_url = $url;
+ $user_url =~ s|^\w+://(darcs\.debian\.org)/(~)(.*)/.*|$3|;
+ die "the local user '$user_local' doesn't own the personal
repository '$url'\n"
+ if $user_local ne $user_url;
+ $url =~
s|^\w+://(darcs\.debian\.org)/(~)(.*)/(.*)|$user$1:~/public_darcs/$4|;
+ } else {
+ $url =~ s|^\w+://(darcs\.debian\.org)/(.*)|$user$1:/darcs/$2|;
+ }
+ }
case "git" { $url =~ s|^\w+://(git\.debian\.org/.*)|git+ssh://$user$1|;
}
case "hg" { $url =~ s|^\w+://(hg\.debian\.org/.*)|ssh://$user$1|; }
case "svn" { $url =~
s|^\w+://(svn\.debian\.org)/(.*)|svn+ssh://$user$1/svn/$2|; }
--8<---------------cut here---------------end--------------->8---
2) the second solution implies a change in the way darcs.d.o handles
personal repositories, moving to something similar to git.d.o, i.e.
http://darcs.debian.org/users/$USER/$REPO
In this case, the substitution is very simple, but I think that at
least the local/remote user check is necessary.
--8<---------------cut here---------------start------------->8---
Index: scripts/debcheckout.pl
===================================================================
--- scripts/debcheckout.pl (revision 811)
+++ scripts/debcheckout.pl (working copy)
@@ -154,6 +154,7 @@
$user .= "@" if length $user;
switch ($repo_type) {
case "bzr" { $url =~
s|^\w+://(bzr\.debian\.org)/(.*)|sftp://$user$1/bzr/$2|; }
+ case "darcs" { $url =~
s|^\w+://(darcs\.debian\.org)/(.*)|$user$1:/darcs/$2|; }
case "git" { $url =~ s|^\w+://(git\.debian\.org/.*)|git+ssh://$user$1|;
}
case "hg" { $url =~ s|^\w+://(hg\.debian\.org/.*)|ssh://$user$1|; }
case "svn" { $url =~
s|^\w+://(svn\.debian\.org)/(.*)|svn+ssh://$user$1/svn/$2|; }
--8<---------------cut here---------------end--------------->8---
Thx, bye,
Gismo / Luca
Footnotes:
[1] http://lists.debian.org/debian-devel-announce/2007/10/msg00002.html
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.22-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages devscripts depends on:
ii debianutils 2.25.1 Miscellaneous utilities specific t
ii dpkg-dev 1.14.6 package building tools for Debian
ii libc6 2.6.1-5 GNU C Library: Shared libraries
ii perl 5.8.8-11 Larry Wall's Practical Extraction
ii sed 4.1.5-4 The GNU sed stream editor
Versions of packages devscripts recommends:
ii fakeroot 1.8 Gives a fake root environment
-- no debconf information
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]