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 ($$) {
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".
" 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;
+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:
# 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};
=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.
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:
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
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
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]
$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) =
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 {
'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) ];
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.
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:
#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 $!;
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
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 () {