chiark / gitweb /
support _multi.changes
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 22 Aug 2013 13:00:12 +0000 (14:00 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Thu, 22 Aug 2013 13:00:12 +0000 (14:00 +0100)
dgit
dgit.1

diff --git a/dgit b/dgit
index eb263b10f188f58a0ffcfb61ee09fa8e5208cb97..d61cea731d4a56a819c95104c77fd82a59514cf1 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -772,12 +772,18 @@ sub dopush () {
     $dsc->{$ourdscfield} = rev_parse('HEAD');
     $dsc->save("../$dscfn.tmp") or die $!;
     if (!$changesfile) {
-       my $pat = "${package}_c$version_*.changes";
-       my @cs = glob "../$pat";
-       fail "failed to find unique changes file".
-           " (looked for $pat in ..); perhaps you need to use dgit -C"
-           unless @cs==1;
-       ($changesfile) = @cs;
+       my $multi = "${package}_${cversion}_multi.changes";
+       if (stat $multi) {
+           $changesfile = $multi;
+       } else {
+           $!==&ENOENT or die "$multi: $!";
+           my $pat = "${package}_${cversion}_*.changes";
+           my @cs = glob "../$pat";
+           fail "failed to find unique changes file".
+               " (looked for $pat in ..); perhaps you need to use dgit -C"
+               unless @cs==1;
+           ($changesfile) = @cs;
+       }
     }
     my $tag = debiantag($dversion);
     if (!check_for_git()) {
diff --git a/dgit.1 b/dgit.1
index e0a10ef96c42bda3d0ba06764e5c972c88ce23ad..1f5fd84fca843e47075c10bb2c4a71fc1d530276 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -321,7 +321,8 @@ Can be repeated as necessary.
 .BI -C changesfile
 Specifies the .changes file which is to be uploaded.  By default
 dgit push looks for single .changes file in the parent directory whose
-filename suggests it is for the right package and version.
+filename suggests it is for the right package and version - or,
+if there is a _multi.changes file, dgit uses that.
 .TP
 .BI --existing-package= package
 dgit push needs to canonicalise the suite name.  But currently