chiark / gitweb /
When cloning, set up a remote `vcs-git' from the package's Vcs-Git (and put an approp...
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 4 Aug 2014 00:31:23 +0000 (01:31 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 4 Aug 2014 00:31:23 +0000 (01:31 +0100)
debian/changelog
dgit
dgit.1

index 9666ca0197499ce19647955b13ee268b45b1be9d..f5f7b38782aa4ba7b510517bb38b55a4da7c1fcd 100644 (file)
@@ -31,6 +31,8 @@ dgit (0.22~experimental1) experimental; urgency=low
     regression test scripts to use.
   * Print better message for unknown operations.
   * Provide `dgit clean'.  Closes:#736527.
+  * When cloning, set up a remote `vcs-git' from the package's Vcs-Git
+    (and put an appropriate caveat in the manpage).  Closes:#740687.
 
   Major new feature, currently stalled awaiting server infrastructure:
   * dgit-repos-server: New program for receiving signed-tag-based
diff --git a/dgit b/dgit
index 5f1ef2e59bc3864faf7f5d4abcd27409018ee9f3..c8907cf6eb48739a2f53854c46cf54cb641ba79c 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -1261,6 +1261,10 @@ sub clone ($) {
        progress "starting new git history";
     }
     fetch_from_archive() or no_such_package;
+    my $vcsgiturl = $dsc->{'Vcs-Git'};
+    if (length $vcsgiturl) {
+       runcmd @git, qw(remote add vcs-git), $vcsgiturl;
+    }
     runcmd @git, qw(reset --hard), lrref();
     printdone "ready for work in $dstdir";
 }
diff --git a/dgit.1 b/dgit.1
index 5a00dd77521076410db662f3f69b31b19f9caf7b..9f9440f9faa508ab07d74605bbf861d97a604729 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -59,12 +59,18 @@ The suite's git tip is
 left on the local branch
 .BI dgit/ suite
 ready for work, and on the corresponding dgit remote tracking branch.
-Also, the
+The
 .B origin
 remote will be set up to point to the package's dgit-repos tree
 for the distro to which
 .I suite
 belongs.
+
+For your convenience, the
+.B vcs-git
+remote will be set up from the package's Vcs-Git field, if there is
+one - but note that in the general case the history found there may be
+different to or even disjoint from dgit's view.
 .TP
 \fBdgit fetch\fR [\fIsuite\fP]
 Consults the archive and git-repos to update the git view of