Author: adam-guest
Date: 2008-03-25 21:42:38 +0000 (Tue, 25 Mar 2008)
New Revision: 1205

Modified:
   trunk/debian/changelog
   trunk/scripts/debcheckout.pl
Log:
  + Ignore a repository owner mismatch in "print mode"

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog      2008-03-25 21:40:17 UTC (rev 1204)
+++ trunk/debian/changelog      2008-03-25 21:42:38 UTC (rev 1205)
@@ -8,6 +8,7 @@
   * debcheckout:
     + Tighten the "repository owner" regex for darcs.d.o to correctly check
       http://darcs.d.o/~foo/bar/baz against user foo
+    + Ignore a repository owner mismatch in "print mode"
 
  -- Adam D. Barratt <[EMAIL PROTECTED]>  Tue, 25 Mar 2008 18:51:59 +0000
 

Modified: trunk/scripts/debcheckout.pl
===================================================================
--- trunk/scripts/debcheckout.pl        2008-03-25 21:40:17 UTC (rev 1204)
+++ trunk/scripts/debcheckout.pl        2008-03-25 21:42:38 UTC (rev 1205)
@@ -223,8 +223,8 @@
 
 # Patch a given repository URL to ensure that the checkoud out repository can 
be
 # committed to. Only works for well known repositories (mainly Alioth's).
-sub set_auth($$$) {
-  my ($repo_type, $url, $user) = @_;
+sub set_auth($$$$) {
+  my ($repo_type, $url, $user, $print_only) = @_;
 
   my $old_url = $url;
   $user .= "@" if length $user;
@@ -238,7 +238,7 @@
            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;
+               if $user_local ne $user_url and !$print_only;
            $url =~ 
s|^\w+://(darcs\.debian\.org)/(~)(.*?)/(.*)|$user$1:~/public_darcs/$4|;
        } else {
            $url =~ s|^\w+://(darcs\.debian\.org)/(.*)|$user$1:/darcs/$2|;
@@ -564,7 +564,8 @@
     $browse_url = find_browse($pkg) if @files;
   }
 
-  $repo_url = set_auth($repo_type, $repo_url, $user) if $auth and not @files;
+  $repo_url = set_auth($repo_type, $repo_url, $user, $print_only)
+    if $auth and not @files;
   print_repo($repo_type, $repo_url) if $print_only; # ... then quit
   if (length $pkg) {
     print "declared $repo_type repository at $repo_url\n";



-- 
To unsubscribe, send mail to [EMAIL PROTECTED]

Reply via email to