#1110088 dep-14-convert-git-branch-names: sometimes fails to find upstream branch

Package:
devscripts
Source:
devscripts
Description:
scripts to make the life of a Debian Package maintainer easier
Submitter:
gregor herrmann
Date:
2025-07-29 19:51:01 UTC
Severity:
normal
#1110088#5
Date:
2025-07-29 16:22:46 UTC
From:
To:
Hi Otto!

Thanks for writing dep-14-convert-git-branch-names. I played around
with it a bit, and I found an issue with two repositories of my
random selection:
- - https://salsa.debian.org/perl-team/modules/packages/libwiki-toolkit-plugin-diff-perl
- - https://salsa.debian.org/perl-team/modules/packages/libmemory-usage-perl

In both repos, it doesn't find the upstream branch.
I notice that both repos only have 1 commit on the upstream branch
(the original import), maybe that's related?

No patch or MR as I don't really understand the algorithm of the
find_upstream_branch() function (with parent1 and parent2); I'm just
wondering if a fallback/default name would help, i.e. "if no branch
is found, and there is a branch called 'upstream' then take it.


Cheers,
gregor
-----BEGIN PGP SIGNATURE-----

iQKTBAEBCgB9FiEE0eExbpOnYKgQTYX6uzpoAYZJqgYFAmiI9VZfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEQx
RTEzMTZFOTNBNzYwQTgxMDREODVGQUJCM0E2ODAxODY0OUFBMDYACgkQuzpoAYZJ
qgb3+hAAujFl205oIL8h3uNx7HpkYmhh+IScVNbrpsA4B12vXLPXg1Jv2BPiTMEN
hjUOIU40mKhfX4CO6osOBArPMAU7U04zASCfp3yWL0D7ArV6xcq0CvKWFI4VJeDD
HMmZ7hFbI/N34kMfPHiRZpX5Ws2v+Bf82B4KD3hKkGMqxe1J/cgpan7ct1wCcD6M
WTBJsJsycz8ZUbQdSvOruSQWohTFkKcb7vgxg0VoDiJeSS/BWUKYRYMJcRPZh1rs
+rxOH4UbBNGyNoqNjqsbeViS2XinYYi9lkGxuEqWDhqkCe/PRugIp79VREIJqvig
OBCNZphRvaDRKTJnVhXDeNDGcFsEEFria+I3D9GF+cGe28aNuIRfGjw13uHQ84+U
Fz1PN/9EloJe3BY2Oqa5cqnvdM46mc5uE4tbYXPfxkqBj0tM3C/Lqi6ws2Bl2N6F
0e5H+TisGsR5BkR+e7i+L1LBzixI49GmkJCOq1kstKaQu8MyUth0HTYyPFF3judE
ao03DxqjVBP3YM3nE0IonTvJ6ArPiURvxNGEdh5ZETB09RAcpgF1PQXabU879BPD
XZga5GJ/xnRuZvn/o9khTy1QsDCm8spp6r9ZrI/V3QjodrXVjX8zk6IiF81atdhU
BVipBrvVHLgx/oKgqDzuCtudAL1Vdn4drwZ2XvYWk8mXVCEBWV4=
=uPQH
-----END PGP SIGNATURE-----

#1110088#10
Date:
2025-07-29 17:40:19 UTC
From:
To:
Hi!

This yields 404 but from
https://tracker.debian.org/pkg/libwiki-toolkit-plugin-diff-perl I
found tps://salsa.debian.org/dom/libwiki-toolkit-plugin-diff-perl/-/tree/upstream
which has last commit 17 years ago.

I see https://salsa.debian.org/perl-team/modules/packages/libmemory-usage-perl/-/commits/upstream
has last commit 10 years ago.

It expects to find a merge on the upstream branch. In the case of
libmemory-usage-perl/ there are zero merges in the history, as the
package never updated anything from upstream.  For
https://salsa.debian.org/dom/libwiki-toolkit-plugin-diff-perl/-/network/upstream
there are multiple merge commits, but none of them was merging from
'upstream', which actually never changed in package history.


Potential fix posted at
https://salsa.debian.org/debian/devscripts/-/merge_requests/532

#1110088#17
Date:
2025-07-29 19:29:10 UTC
From:
To:
Weird, and sorry for that. It indeed 404s for me now but:

% git remote -v
origin	git@salsa.debian.org:perl-team/modules/packages/libwiki-toolkit-plugin-diff-perl.git (fetch)
origin	git@salsa.debian.org:perl-team/modules/packages/libwiki-toolkit-plugin-diff-perl.git (push)

OTOH:

% gbp pull
gbp:info: Fetching from default remote for each branch
gbp:error: Error running git fetch: remote:
remote: ========================================================================
remote:
remote: The project you were looking for could not be found or you don't have permission to view it.
remote:
remote: ========================================================================
remote:
fatal: Could not read from remote repository.

Whatever happend to this salvaging attempt …
(Anyway, stale local clone removed.)

Ack.

Thanks, I suspected something like this :)

Thanks!


Cheers,
gregor

#1110088#22
Date:
2025-07-29 19:43:18 UTC
From:
To:
Are you logged into Salsa? Is the repository private? Try making it public
#1110088#27
Date:
2025-07-29 19:48:02 UTC
From:
To:
Yes, I'm logged in, and the repo was automatically configured at some
point, also git on the commandline must have worked at some point
because otherwise I wouldn't have found it on my laptop :)


Cheers,
gregor