chiark / gitweb /
changelog: start 9.14 master
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 12 Feb 2021 12:49:33 +0000 (12:49 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 12 Feb 2021 12:49:33 +0000 (12:49 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
12 files changed:
Debian/Dgit.pm
debian/changelog
dgit
dgit-maint-debrebase.7.pod
dgit-maint-gbp.7.pod
dgit-maint-merge.7.pod
dgit.1
git-debrebase
git-debrebase.1.pod
infra/dgit-mirror-ssh-wrap
tests/lib
tests/tests/manpages-format

index 5d898ae5f6ab1c33e1f2f043d5c684bd1fe5005b..4059e2b02372388d8c4107beda3a7e757bc9ff00 100644 (file)
@@ -634,12 +634,15 @@ sub git_check_unmodified () {
 sub upstream_commitish_search ($$) {
     my ($upstream_version, $tried) = @_;
     # todo: at some point maybe use git-deborig to do this
+    my @found;
     foreach my $tagpfx ('', 'v', 'upstream/') {
        my $tag = $tagpfx.(dep14_version_mangle $upstream_version);
        my $new_upstream = git_get_ref "refs/tags/$tag";
        push @$tried, $tag;
-       return $new_upstream if length $new_upstream;
+       push @found, [ $tag, $new_upstream ] if $new_upstream;
     }
+    return @{ $found[0] } if @found == 1;
+    return ();
 }
 
 sub resolve_upstream_version ($$) {
@@ -649,7 +652,8 @@ sub resolve_upstream_version ($$) {
     my $message = __ 'using specified upstream commitish';
     if (!defined $new_upstream) {
        my @tried;
-       $new_upstream = upstream_commitish_search $upstream_version, \@tried;
+       ($used, $new_upstream) =
+           upstream_commitish_search $upstream_version, \@tried;
        if (!length $new_upstream) {
            fail f_
                "Could not determine appropriate upstream commitish.\n".
@@ -657,7 +661,6 @@ sub resolve_upstream_version ($$) {
                " Check version, and specify upstream commitish explicitly.",
                "@tried";
        }
-       $used = $tried[-1];
        $message = f_ 'using upstream from git tag %s', $used;
     } elsif ($new_upstream =~ m{^refs/tags/($versiontag_re)$}s) {
        $message = f_ 'using upstream from git tag %s', $1;
index 5c5f7a4fcf07a46089675feffe8e3776f8d5e0c7..660a39ef7d26aa5a11dcfefe4e1137c52a33bc33 100644 (file)
@@ -1,3 +1,52 @@
+dgit (9.14~) unstable; urgency=medium
+
+  * 
+
+ --
+
+dgit (9.13) unstable; urgency=medium
+
+  * gitattributes defuse: work even if .git/info/attributes missing
+    (Closes: #981344)
+  * dgit-maint-*(7): Advice for git-debpush users.
+    Closes:#932520.  [Sean Whitton]
+  * dgit.1: drop remark about sbuild not building arch-independent.
+    Closes:#952442.  [Helmut Grohne]
+
+ -- Ian Jackson <ijackson@chiark.greenend.org.uk>  Fri, 12 Feb 2021 12:48:15 +0000
+
+dgit (9.12) unstable; urgency=medium
+
+  Bugfixes:
+  * dgit-mirror-ssh-wrap: Cope with yet another new rsync rune.
+    Closes:#968635. [Sergio Durigan Junior]
+
+ -- Ian Jackson <ijackson@chiark.greenend.org.uk>  Wed, 19 Aug 2020 17:25:45 +0100
+
+dgit (9.11) unstable; urgency=medium
+
+  Bugfixes:
+  * git-debrebase, git-debpush: fail when looking for upstream tag if
+    there is more than one candidate.  Closes:#961682.  [Sean Whitton]
+  * git-debrebase: Fix error message for wrong use of -i
+  * git-debrebase: new-upstream: Do not treat late options as version
+
+  Documentation:
+  * dgit-maint-debrebase(7): Drop some bad advice about the upstream/ tag
+    case.  Closes:#961683.  [Sean Whitton]
+  * git-debrebase(1): Fix new-upstream -i docs
+
+  dgit-infrastructure:
+  * dgit-mirror-ssh-wrap: Cope with new rsync rune.  Closes:#963489.
+  * dgit-mirror-ssh-wrap: Clarify the error message 
+
+ Test suite:
+  * Cope with buster & eatmydata (ie, work around #963508)
+  * Provide navigation banner in log when exiting nonzero
+  * Print pwd in failure trap to help with diagnosis
+
+ -- Ian Jackson <ijackson@chiark.greenend.org.uk>  Mon, 22 Jun 2020 19:09:17 +0100
+
 dgit (9.10) unstable; urgency=medium
 
   dgit bugfix:
diff --git a/dgit b/dgit
index b035e108ebc9825ceebe58b0acab06228efebf28..145fa9bb044be29d383f8849f7766ff0a72f2eab 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -3608,7 +3608,7 @@ sub is_gitattrs_setup () {
     #     0: there is a dgit-defuse-attrs but it needs fixing
     #     undef: there is none
     my $gai = open_main_gitattrs();
-    return 0 unless $gai;
+    return undef unless $gai;
     while (<$gai>) {
        next unless m{$gitattrs_ourmacro_re};
        return 1 if m{\s-working-tree-encoding\s};
index 373fb2f7aa335456d09aee970e4d4f05b4972021..b3700a467e56463c302cf0173b0673865650a694 100644 (file)
@@ -394,8 +394,6 @@ or if you have a working watch file
 
 =back
 
-replacing I<1.2.3> with I<upstream/1.2.3> if you imported a tarball.
-
 This invocation of git-debrebase(1) involves a git rebase.  You may
 need to resolve conflicts if the Debian delta queue does not apply
 cleanly to the new upstream source.
@@ -488,6 +486,10 @@ fast-forwarding from the history on B<dgit-repos>.  In such cases you
 will have to pass I<--overwrite> to dgit.  git-debrebase will normally
 tell you if this will be needed.
 
+If you want to upload with git-debpush(1), for the first upload you
+should pass the B<--quilt=linear> quilt mode option (see
+git-debpush(1)).
+
 Right before uploading, if you did not just already do so, you might
 want to have git-debrebase(1) shuffle your branch such that the Debian
 delta queue appears right at the tip of the branch you will push:
index b8abd66cb6dcce1713ddc6dcb9b15114f412339b..1988a317345d1a9ab006cb9233d6c62a53c653a1 100644 (file)
@@ -127,6 +127,9 @@ history.  (This origin commit would represent the most recent non-dgit
 upload of the package, but this should already be represented in your
 git history.)
 
+Alternatively, you can use git-debpush(1).  For the first upload you
+should pass the B<--gbp> quilt mode option (see git-debpush(1)).
+
 =head1 INCORPORATING NMUS
 
 B<dgit pull> can't yet incorporate NMUs into patches-unapplied gbp
index 51b6a69dbf4ebc29df23251ef8024b3818d06e71..ddf37aa54402dbde2566338467305667506407fd 100644 (file)
@@ -344,12 +344,16 @@ dgit(1).  If any command fails, dgit will provide a carefully-worded
 error message explaining what you should do.  If it's not clear, file
 a bug against dgit.  Remember to pass I<--new> for the first upload.
 
-As an alternative to B<dgit build> and friends, you can use a tool
-like gitpkg(1).  This works because like dgit, gitpkg(1) enforces that
-HEAD has exactly the contents of the source package.  gitpkg(1) is
-highly configurable, and one dgit user reports using it to produce and
-test multiple source packages, from different branches corresponding
-to each of the current Debian suites.
+If you want to upload with git-debpush(1), for the first upload you
+should pass the B<--quilt=smash> quilt mode option (see
+git-debpush(1)).
+
+As another alternative to B<dgit build> and friends, you can use a
+tool like gitpkg(1).  This works because like dgit, gitpkg(1) enforces
+that HEAD has exactly the contents of the source package.  gitpkg(1)
+is highly configurable, and one dgit user reports using it to produce
+and test multiple source packages, from different branches
+corresponding to each of the current Debian suites.
 
 If you want to skip dgit's checks while iterating on a problem with
 the package build (for example, you don't want to commit your changes
diff --git a/dgit.1 b/dgit.1
index f1ead733597f4cd44ec1fbec2ce5e0deae521a08..bec8f975aa5f89f3a0510c83714498a054c5118b 100644 (file)
--- a/dgit.1
+++ b/dgit.1
@@ -192,10 +192,6 @@ passed on to sbuild.
 The output is left in
 .IR package \fB_\fR version \fB_multi.changes\fR.
 .IP
-Note that by default
-sbuild does not build arch-independent packages.
-You probably want to pass \-A, to request those.
-.IP
 Tagging, signing and actually uploading should be left to dgit push.
 .TP
 \fBdgit pbuilder\fR [\fIdebbuildopts\fP]
index 06f56d872abe5bcf98a966ae61bf2d2080a7a49a..781435861ecb05b1c816a440364425746abae6f7 100755 (executable)
@@ -1973,7 +1973,7 @@ sub cmd_new_upstream () {
        $new_version = (new Dpkg::Version "$spec_version-1", check => 1);
     }
 
-    my $new_upstream = shift @ARGV;
+    my $new_upstream = (@ARGV && $ARGV[0] !~ m{^-}) ? shift @ARGV : undef;
     my $new_upstream_version = upstreamversion  $new_version;
     my $new_upstream_used;
     ($new_upstream, $new_upstream_used) =
@@ -2697,10 +2697,11 @@ END
     if (!@upstreams) {
        if ($do_tags) {
            my @tried;
-           my $ups_tag = upstream_commitish_search $version, \@tried;
-           if ($ups_tag) {
-               my $this = f_ "git tag %s", $tried[-1];
-               push @upstreams, { Commit => $ups_tag,
+           my ($ups_tag, $ups_rev) =
+               upstream_commitish_search $version, \@tried;
+           if ($ups_rev) {
+               my $this = f_ "git tag %s", $ups_tag;
+               push @upstreams, { Commit => $ups_rev,
                                   Source => $this,
                                 };
            } else {
@@ -2949,7 +2950,7 @@ getoptions_main
           'experimental-merge-resolution!', \$opt_merges,
           '-i:s' => sub {
               my ($opt,$val) = @_;
-              badusage f_ "%s: no cuddling to -i for git-rebase", $us
+              badusage f_ "%s: with git-debrebase, get-rebase -i option may only be followed by more options (as separate arguments)", $us
                   if length $val;
               confess if $opt_defaultcmd_interactive; # should not happen
               $opt_defaultcmd_interactive = [ qw(-i) ];
index bc1fdd646d6dbf3ccee1334db593f5efbb7d8301..639b07d2e6af4feb4b17a0b9720d6e08a222a774 100644 (file)
@@ -14,7 +14,7 @@ These are most of the commands you will regularly need:
  git debrebase -i                           # edit the patch queue
  git debrebase conclude && git push         # push to eg salsa
  git debrebase conclude && dgit push-source # source-only upload
- git debrebase [-i] new-upstream 1.2.3-1    # uses tag, eg "v1.2.3"
+ git debrebase new-upstream 1.2.3-1 [-i]    # uses tag, eg "v1.2.3"
  dpkg-buildpackage -uc -b                   # get test debs, at any time
 
 To add patches, or edit the packaging, just make git commits.
@@ -134,7 +134,7 @@ and discarding all working tree changes.
 
 If you are in the middle of a git-rebase, will abort that too.
 
-=item git-debrebase new-upstream <new-version> [<upstream-details>...]
+=item git-debrebase new-upstream <new-version> [<upstream-details>...] [--|-i <git-rebase options...>]
 
 Rebases the delta queue
 onto a new upstream version.  In detail:
index 3feb6dcbd9ecfbd46df893a22e77a8ff9732920e..afbbbbfe40c5934444eca3d32ec68cb3e96385ed 100755 (executable)
@@ -24,14 +24,19 @@ my $command = $ENV{SSH_ORIGINAL_COMMAND}
 
 #print STDERR ">$d<\n";
 
-$command =~
+$_ = $command;
 
 m{^rsync --server -lHtre\.iLsfxC --timeout=\d+ --delete --safe-links \. $d$}
+||
+m{^rsync --server -lHtre\.iLsfxCIv --timeout=\d+ --delete --safe-links \. $d$}
+||
+m{^rsync --server -lHtre\.iLsfxCIvu --timeout=\d+ --delete --safe-links \. $d$}
 
 # To add a new command pattern, add || m{^ ... $} above.
 # The pattern should contain $d where the per-package destination
 # directory would go.
 
-or die "unexpected command $command\n";
+or die "dgit-mirror-ssh-wrap: unexpected command (rsync upgraded?):
+ $command\n";
 
 exec $& or die $!;
index c03f34a721c6a92c1873e18f33e4d1bcdb6d7ba3..749509c4fc240d301d77cb56c8d33adbb263362d 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -24,7 +24,16 @@ END
 
 trap '
        rc=$?
+       set +x
+       test $rc = 0 || echo "
+%%%%%%%%%%%%%%%%%%%% EXITING $rc %%%%%%%%%%%%%%%%%%%%
+
+               Most relevant logs are just before assignment rc=$rc
+               Will now do cleanup etc.
+"
+       set -x
        set +e
+       pwd
        [ "x$DGIT_TEST_KEEP_MUSTCLEAN" != x ] || \
        [ "x$DGIT_TEST_TMP" = x ] || rm -rf $DGIT_TEST_TMP/must-clean
        set -e
index ce9d4dc36e030e79b7a0879e9b672c36eb27ec61..2649a313490d22a1aa941c262e0a68742c983576 100755 (executable)
@@ -22,14 +22,18 @@ run_man () {
        eval "$cmd 2>&1 >/dev/null |tee $errs"
 }
 
+cat >$tmp/always-expected <<'END'
+ERROR.*
+END
+
 for roff in $manpages; do
        for fmt in txt ps; do
-               >$tmp/$roff.$fmt-expected
+               cat $tmp/always-expected >$tmp/$roff.$fmt-expected
        done
 done
 
 expected () {
-       cat >$tmp/$2.$1-expected
+       cat >>$tmp/$2.$1-expected
 }
 
 not_egrep_vxPf () {