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 5d37f9616124f79b6ce31daea0d94373e0966c17..00b651e911515495b4d09466576e74e5b34e7c6f 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 3b4313bc39d9f1c70c42ba7e17a860d77a270717..d0cbd327677204e72839bc767a71fc5d8b92a29a 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 d0c24adde4b8af43403def2aa207da86e1e523e3..56be0dd4af4be0e0e9735b2dfaec5969e6dfac4f 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