chiark
/
gitweb
/
~ianmdlvl
/
dgit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Properly look for .origs etc. in .., fetching them less often.
[dgit.git]
/
dgit
diff --git
a/dgit
b/dgit
index 79618d90400f0a834ddd78a2d92a5005c4102aed..2e700813d7829368f8318a99ebe0795f95af9e90 100755
(executable)
--- a/
dgit
+++ b/
dgit
@@
-76,7
+76,7
@@
our $tagformatfn;
our %forceopts = map { $_=>0 }
qw(unrepresentable unsupported-source-format
our %forceopts = map { $_=>0 }
qw(unrepresentable unsupported-source-format
- dsc-changes-mismatch
+ dsc-changes-mismatch
changes-origs-exactly
import-gitapply-absurd
import-gitapply-no-absurd);
import-gitapply-absurd
import-gitapply-no-absurd);
@@
-960,6
+960,13
@@
sub must_getcwd () {
return $d;
}
return $d;
}
+sub parse_dscdata () {
+ my $dscfh = new IO::File \$dscdata, '<' or die $!;
+ printdebug Dumper($dscdata) if $debuglevel>1;
+ $dsc = parsecontrolfh($dscfh,$dscurl,1);
+ printdebug Dumper($dsc) if $debuglevel>1;
+}
+
our %rmad;
sub archive_query ($;@) {
our %rmad;
sub archive_query ($;@) {
@@
-1358,10
+1365,7
@@
sub get_archive_dsc () {
fail "$dscurl has hash $got but".
" archive told us to expect $digest";
}
fail "$dscurl has hash $got but".
" archive told us to expect $digest";
}
- my $dscfh = new IO::File \$dscdata, '<' or die $!;
- printdebug Dumper($dscdata) if $debuglevel>1;
- $dsc = parsecontrolfh($dscfh,$dscurl,1);
- printdebug Dumper($dsc) if $debuglevel>1;
+ parse_dscdata();
my $fmt = getfield $dsc, 'Format';
$format_ok{$fmt} or forceable_fail [qw(unsupported-source-format)],
"unsupported source format $fmt, sorry";
my $fmt = getfield $dsc, 'Format';
$format_ok{$fmt} or forceable_fail [qw(unsupported-source-format)],
"unsupported source format $fmt, sorry";
@@
-1824,10
+1828,15
@@
sub generate_commits_from_dsc () {
my $f = $fi->{Filename};
die "$f ?" if $f =~ m#/|^\.|\.dsc$|\.tmp$#;
my $f = $fi->{Filename};
die "$f ?" if $f =~ m#/|^\.|\.dsc$|\.tmp$#;
- link_ltarget "../../../$f", $f
+ printdebug "considering linking $f: ";
+
+ link_ltarget "../../../../$f", $f
+ or ((printdebug "($!) "), 0)
or $!==&ENOENT
or die "$f $!";
or $!==&ENOENT
or die "$f $!";
+ printdebug "linked.\n";
+
complete_file_from_dsc('.', $fi)
or next;
complete_file_from_dsc('.', $fi)
or next;
@@
-2206,6
+2215,7
@@
sub complete_file_from_dsc ($$) {
if (stat_exists $tf) {
progress "using existing $f";
} else {
if (stat_exists $tf) {
progress "using existing $f";
} else {
+ printdebug "$tf does not exist, need to fetch\n";
my $furl = $dscurl;
$furl =~ s{/[^/]+$}{};
$furl .= "/$f";
my $furl = $dscurl;
$furl =~ s{/[^/]+$}{};
$furl .= "/$f";
@@
-3453,7
+3463,8
@@
END
# Perhaps adjust .dsc to contain right set of origs
changes_update_origs_from_dsc($dsc, $changes, $upstreamversion,
# Perhaps adjust .dsc to contain right set of origs
changes_update_origs_from_dsc($dsc, $changes, $upstreamversion,
- $changesfile);
+ $changesfile)
+ unless forceing [qw(changes-origs-exactly)];
# Checks complete, we're going to try and go ahead:
# Checks complete, we're going to try and go ahead: