chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changelog: Document git- prefix changes
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index 7a4b391a2c1054ee262d04627d34accb01083f4d..0507899b1f9a18ff17ba48b5a2a8426ec726ab28 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-2,7
+2,7
@@
# dgit
# Integration between git and Debian-style archives
#
# dgit
# Integration between git and Debian-style archives
#
-# Copyright (C)2013-201
5
Ian Jackson
+# Copyright (C)2013-201
6
Ian Jackson
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@
-2051,7
+2051,7
@@
sub git_fetch_us () {
push @specs, qw(heads/*) if deliberately_not_fast_forward;
# This is rather miserable:
push @specs, qw(heads/*) if deliberately_not_fast_forward;
# This is rather miserable:
- # When git
-
fetch --prune is passed a fetchspec ending with a *,
+ # When git
fetch --prune is passed a fetchspec ending with a *,
# it does a plausible thing. If there is no * then:
# - it matches subpaths too, even if the supplied refspec
# starts refs, and behaves completely madly if the source
# it does a plausible thing. If there is no * then:
# - it matches subpaths too, even if the supplied refspec
# starts refs, and behaves completely madly if the source
@@
-2061,15
+2061,15
@@
sub git_fetch_us () {
# We want to fetch a fixed ref, and we don't know in advance
# if it exists, so this is not suitable.
#
# We want to fetch a fixed ref, and we don't know in advance
# if it exists, so this is not suitable.
#
- # Our workaround is to use git
-ls-remote. git-
ls-remote has its
+ # Our workaround is to use git
ls-remote. git
ls-remote has its
# own qairks. Notably, it has the absurd multi-tail-matching
# own qairks. Notably, it has the absurd multi-tail-matching
- # behaviour: git
-
ls-remote R refs/foo can report refs/foo AND
+ # behaviour: git
ls-remote R refs/foo can report refs/foo AND
# refs/refs/foo etc.
#
# Also, we want an idempotent snapshot, but we have to make two
# refs/refs/foo etc.
#
# Also, we want an idempotent snapshot, but we have to make two
- # calls to the remote: one to git
-ls-remote and to git-
fetch. The
- # solution is use git
-
ls-remote to obtain a target state, and
- # git
-
fetch to try to generate it. If we don't manage to generate
+ # calls to the remote: one to git
ls-remote and to git
fetch. The
+ # solution is use git
ls-remote to obtain a target state, and
+ # git
fetch to try to generate it. If we don't manage to generate
# the target state, we try again.
my $specre = join '|', map {
# the target state, we try again.
my $specre = join '|', map {
@@
-2103,7
+2103,7
@@
sub git_fetch_us () {
my ($objid,$rrefname) = ($1,$2);
if (!$wanted_rref->($rrefname)) {
print STDERR <<END;
my ($objid,$rrefname) = ($1,$2);
if (!$wanted_rref->($rrefname)) {
print STDERR <<END;
-warning: git
-
ls-remote @look reported $rrefname; this is silly, ignoring it.
+warning: git
ls-remote @look reported $rrefname; this is silly, ignoring it.
END
next;
}
END
next;
}
@@
-2136,11
+2136,11
@@
END
if (!exists $wantr{$rrefname}) {
if ($wanted_rref->($rrefname)) {
printdebug <<END;
if (!exists $wantr{$rrefname}) {
if ($wanted_rref->($rrefname)) {
printdebug <<END;
-git-fetch @fspecs created $lrefname which git
-
ls-remote @look didn't list.
+git-fetch @fspecs created $lrefname which git
ls-remote @look didn't list.
END
} else {
print STDERR <<END
END
} else {
print STDERR <<END
-warning: git
-
fetch @fspecs created $lrefname; this is silly, deleting it.
+warning: git
fetch @fspecs created $lrefname; this is silly, deleting it.
END
}
runcmd_ordryrun_local @git, qw(update-ref -d), $lrefname;
END
}
runcmd_ordryrun_local @git, qw(update-ref -d), $lrefname;
@@
-2155,24
+2155,24
@@
END
next if $got eq $want;
if (!defined $objgot{$want}) {
print STDERR <<END;
next if $got eq $want;
if (!defined $objgot{$want}) {
print STDERR <<END;
-warning: git
-
ls-remote suggests we want $lrefname
+warning: git
ls-remote suggests we want $lrefname
warning: and it should refer to $want
warning: and it should refer to $want
-warning: but git
-
fetch didn't fetch that object to any relevant ref.
+warning: but git
fetch didn't fetch that object to any relevant ref.
warning: This may be due to a race with someone updating the server.
warning: Will try again...
END
next FETCH_ITERATION;
}
printdebug <<END;
warning: This may be due to a race with someone updating the server.
warning: Will try again...
END
next FETCH_ITERATION;
}
printdebug <<END;
-git-fetch @fspecs made $lrefname=$got but want git
-
ls-remote @look says $want
+git-fetch @fspecs made $lrefname=$got but want git
ls-remote @look says $want
END
runcmd_ordryrun_local @git, qw(update-ref -m),
END
runcmd_ordryrun_local @git, qw(update-ref -m),
- "dgit fetch git
-
fetch fixup", $lrefname, $want;
+ "dgit fetch git
fetch fixup", $lrefname, $want;
$lrfetchrefs_f{$lrefname} = $want;
}
last;
}
$lrfetchrefs_f{$lrefname} = $want;
}
last;
}
- printdebug "git_fetch_us: git
-
fetch --no-insane emulation complete\n",
+ printdebug "git_fetch_us: git
fetch --no-insane emulation complete\n",
Dumper(\%lrfetchrefs_f);
my %here;
Dumper(\%lrfetchrefs_f);
my %here;
@@
-4450,10
+4450,10
@@
sub quilt_fixup_multipatch ($$$) {
# 2. Copy .pc from the fake's extraction, if necessary
# 3. Run dpkg-source --commit
# 4. If the result has changes to debian/, then
# 2. Copy .pc from the fake's extraction, if necessary
# 3. Run dpkg-source --commit
# 4. If the result has changes to debian/, then
- # - git
-
add them them
- # - git
-
add .pc if we had a .pc in-tree
- # - git
-
commit
- # 5. If we had a .pc in-tree, delete it, and git
-
commit
+ # - git
add them them
+ # - git
add .pc if we had a .pc in-tree
+ # - git
commit
+ # 5. If we had a .pc in-tree, delete it, and git
commit
# 6. Back in the main tree, fast forward to the new HEAD
# Another situation we may have to cope with is gbp-style
# 6. Back in the main tree, fast forward to the new HEAD
# Another situation we may have to cope with is gbp-style
@@
-4462,7
+4462,7
@@
sub quilt_fixup_multipatch ($$$) {
# We would want to detect these, so we know to escape into
# quilt_fixup_gbp. However, this is in general not possible.
# Consider a package with a one patch which the dgit user reverts
# We would want to detect these, so we know to escape into
# quilt_fixup_gbp. However, this is in general not possible.
# Consider a package with a one patch which the dgit user reverts
- # (with git
-
revert or the moral equivalent).
+ # (with git
revert or the moral equivalent).
#
# That is indistinguishable in contents from a patches-unapplied
# tree. And looking at the history to distinguish them is not
#
# That is indistinguishable in contents from a patches-unapplied
# tree. And looking at the history to distinguish them is not
@@
-4938,9
+4938,10
@@
sub cmd_sbuild {
if (!$rmchanges) {
my @unwanted = map { s#^\.\./##; $_; } glob "../$pat";
@unwanted = grep { $_ ne changespat $version,'source' } @unwanted;
if (!$rmchanges) {
my @unwanted = map { s#^\.\./##; $_; } glob "../$pat";
@unwanted = grep { $_ ne changespat $version,'source' } @unwanted;
- fail "changes files other than source matching $pat".
- " already present (@unwanted);".
- " building would result in ambiguity about the intended results"
+ fail <<END
+changes files other than source matching $pat already present; building would result in ambiguity about the intended results.
+Suggest you delete @unwanted.
+END
if @unwanted;
}
my $wasdir = must_getcwd();
if @unwanted;
}
my $wasdir = must_getcwd();
@@
-4956,6
+4957,11
@@
sub cmd_sbuild {
($b =~ m/_source\.changes$/ <=> $a =~ m/_source\.changes$/)
or $a cmp $b
} @changesfiles;
($b =~ m/_source\.changes$/ <=> $a =~ m/_source\.changes$/)
or $a cmp $b
} @changesfiles;
+ fail <<END if @changesfiles==1;
+only one changes file from sbuild (@changesfiles)
+perhaps you need to pass -A ? (sbuild's default is to build only
+arch-specific binaries; dgit 1.4 used to override that.)
+END
fail "wrong number of different changes files (@changesfiles)"
unless @changesfiles==2;
my $binchanges = parsecontrol($changesfiles[1], "binary changes file");
fail "wrong number of different changes files (@changesfiles)"
unless @changesfiles==2;
my $binchanges = parsecontrol($changesfiles[1], "binary changes file");