Re: Switch to DEP-14-ish with an existing "debian" branch
- Date: Mon, 4 Feb 2019 15:49:49 +0100
- From: Xavier <yadd@xxxxxxxxxx>
- Subject: Re: Switch to DEP-14-ish with an existing "debian" branch
Le 04/02/2019 à 14:33, Andreas Ronnquist a écrit :
> On Mon, 4 Feb 2019 15:07:22 +0200,
> Peter Pentchev<roam@xxxxxxxxxxx> wrote:
>> So these days I decided that DEP-14 actually seems to be a Good
>> Thing(tm) and I started thinking about switching my packages' Git
>> repositories to this layout. However, I immediately hit a snag:
>> in some of my repositories the upstream branch is named "master" and
>> the Debian packaging branch is named "debian". Due to a (somewhat
>> understandable, even though a leaky abstraction) limitation of Git,
>> I cannot create a "debian/master" branch if there already is a "debian"
>> branch in the repository.
>> Have others come across this when migrating Debian packaging repos to
>> a DEP-14 layout? How do you deal with this?
>> I'm thinking of prefixing the new branches with, say, "pkg/", so that
>> there would be a DEP-14-ish layout with the upstream branch being
>> named "master", the main Debian branch being "pkg/debian/master",
>> backports in "pkg/debian/buster", "pkg/debian/stretch", etc, and
>> similarly Ubuntu packaging in "pkg/ubuntu/master", "pkg/ubuntu/bionic",
>> etc. Does this sound reasonable, or have other people already done
>> something similar and adopted a prefix other than "pkg/"?
>> Thanks to the people who came up with the idea of a harmonized layout
>> of Debian packaging repositories and then did the work of writing up
>> the DEP itself! And, yeah, well, does what I'm trying to do feel like
>> de-harmonizing the layout by introducing Yet Another Branch Naming
>> Scheme? :) If so, sorry! :)
>>  https://dep-team.pages.debian.net/deps/dep14/
> git branch -m debian debian/master
salsa(1) can do it for you
$ salsa --group xx-team --rename-head --source-branch=debian \
update_safe project1 project2 project3
> which will rename the branch locally - then you should be able to
> remove the remote branch, and then simply push the branch with the
> new name to the remote.
> Remember that you'll need proper permissions on salsa to remove
> branches. (See Settings/Repository) - and you should also change Default
> Branch there.
> -- Andreas Rönnquist