summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOswald Buddenhagen <oswald.buddenhagen@gmx.de>2020-12-23 22:33:23 +0100
committerOswald Buddenhagen <oswald.buddenhagen@gmx.de>2021-05-18 11:04:48 +0000
commitc1accae53e7c52dcc522664608cbc1fe60609b54 (patch)
treeb932984d8e156f49976e497b6fee7feedfeb7abd
parentc4b9a0be28bedad16fb16a8ae4ebe89f45fe680b (diff)
downloadqtrepotools-c1accae53e7c52dcc522664608cbc1fe60609b54.tar.gz
gpick: beautify PatchSet fetching debug output somewhat
don't alias the ref when we actually already have the PatchSet. this changes only the debug output, as changing the ref would be simply a noop. we may now try to visit already visited commits, for which we'll get corresponding debug output as well. also sort the keys in the surrounding loop. Change-Id: I096b69f32964038b20bd1b0e8ca4ec1c33f4725d Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rwxr-xr-xbin/git-gpick10
1 files changed, 5 insertions, 5 deletions
diff --git a/bin/git-gpick b/bin/git-gpick
index b983f62..08735c3 100755
--- a/bin/git-gpick
+++ b/bin/git-gpick
@@ -1050,17 +1050,17 @@ sub fetch_patchsets($$;$)
add_patchset($ginfo, 'pick', \%idxes);
add_patchset($ginfo, 'push', \%idxes);
my $revs = $$ginfo{revs};
- foreach my $idx (keys %idxes) {
+ foreach my $idx (sort keys %idxes) {
my $rev = $$revs[$idx];
my ($rev_id, $rev_ps) = ($$rev{id}, $$rev{ps});
- if ($commit_by_id{$rev_id}) {
+ if (defined($$ginfo{fetched}{$rev_ps})) {
+ print "Already have PatchSet $rev_ps for $$ginfo{id}.\n" if ($debug);
+ $$visits{$rev_id} = 1;
+ } elsif ($commit_by_id{$rev_id}) {
# When we are fetching the dependencies of Changes we already fetched,
# it is quite likely that we already have the corresponding commits.
print "Already have PatchSet $rev_ps for $$ginfo{id} (aliasing).\n" if ($debug);
$$ginfo{fetched}{$rev_ps} = $rev_id;
- } elsif (defined($$ginfo{fetched}{$rev_ps})) {
- print "Already have PatchSet $rev_ps for $$ginfo{id}.\n" if ($debug);
- $$visits{$rev_id} = 1;
} else {
push @refs, "+$$rev{ref}:refs/gpush/g$$ginfo{key}_$rev_ps";
$$visits{$rev_id} = 1;