chiark / gitweb /
Provide `dgit print-dgit-repos-server-source-url'.
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Jan 2017 01:42:43 +0000 (01:42 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 9 Jan 2017 13:08:32 +0000 (13:08 +0000)
Re:#850521.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
debian/changelog
dgit
dgit.1

index 5d37f96..00b651e 100644 (file)
@@ -17,6 +17,7 @@ dgit (3.0~) unstable; urgency=medium
   Minor new feature:
   * distro alias facility in config space.  (Primarily for testing.)
   * Undocumented --config-lookup-explode= feature.  (For testing.)
+  * Provide `dgit print-dgit-repos-server-source-url'.  Re:#850521.
 
   dgit-badcommit-fixup: 
   * Do not investigate symrefs.  Closes:#850547.
diff --git a/dgit b/dgit
index 3b4313b..d0cbd32 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -6162,13 +6162,22 @@ sub cmd_clone_dgit_repos_server {
     exec @cmd or fail "exec git clone: $!\n";
 }
 
+sub cmd_print_dgit_repos_server_source_url {
+    badusage "no arguments allowed to dgit print-dgit-repos-server-source-url"
+       if @ARGV;
+    $package = '_dgit-repos-server';
+    local $access_forpush = 0;
+    my $url = access_giturl();
+    print $url, "\n" or die $!;
+}
+
 sub cmd_setup_mergechangelogs {
     badusage "no arguments allowed to dgit setup-mergechangelogs" if @ARGV;
     setup_mergechangelogs(1);
 }
 
 sub cmd_setup_useremail {
-    badusage "no arguments allowed to dgit setup-mergechangelogs" if @ARGV;
+    badusage "no arguments allowed to dgit setup-useremail" if @ARGV;
     setup_useremail(1);
 }
 
diff --git a/dgit.1 b/dgit.1
index d0c24ad..56be0dd 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -314,6 +314,11 @@ Prints version information and exits.
 .BI "dgit clone-dgit-repos-server" " destdir"
 Tries to fetch a copy of the source code for the dgit-repos-server,
 as actually being used on the dgit git server, as a git tree.
+.TP
+.BI "dgit print-dgit-repos-server-source-url"
+Prints the url used by dgit clone-dgit-repos-server.
+This is hopefully suitable for use as a git remote url.
+It may not be useable in a browser.
 .SH OPTIONS
 .TP
 .BR --dry-run " | " -n