Re: src.fedoraproject.org branch conversion to rawhide/main tomorrow

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




----- Original Message -----
> From: "Todd Zullinger" <tmz@xxxxxxxxx>
> To: devel@xxxxxxxxxxxxxxxxxxxxxxx
> Sent: Saturday, February 6, 2021 5:40:06 PM
> Subject: Re: src.fedoraproject.org branch conversion to rawhide/main tomorrow
> 
> Pierre-Yves Chibon wrote:
> > On Fri, Feb 05, 2021 at 12:11:45PM +0100, Florian Weimer wrote:
> >> Would it be possible to add the sequence of commands to the proposal to
> >> convert an existing clone with unpushed changes?
> >> 
> >> I think it is something along the lines of (for src.fedoraproject.org):
> >> 
> >> git checkout master
> >> git branch --move rawhide
> >> git branch --set-upstream-to=origin/rawhide
> >> 
> >> I'm not entire sure if “rawhide“ is the correct branch to use, and if
> >> the sequence of commands is the right one.
> > 
> > All of the above is correct.
> > 
> > I'll add it to the wiki page, thanks for the suggestion!
> 
> The `git checkout master` (or `git switch master`) can be
> omitted (at the slight cost of being more verbose with the
> `git branch` commands).
> 
>     git fetch # optionally with -p / --prune
>     git branch -m master rawhide
>     git branch -u origin/rawhide rawhide
> 
> For folks that might have a different branch checked out
> with changes on it, the attempt to switch branches will just
> get in the way.
> 
> I had some clones which were on branches other than master
> and which contained changes.  I ran this in my Fedora git
> tree:
> 
> for i in /path/to/dist/fedora/*/; do
>     (
>         pushd $i && git fetch -p &&
>         git branch -m master rawhide &&
>         git branch -u origin/rawhide rawhide
>     )
> done |& tee /path/to/output
> 
> Anyone who has used a remote name other than 'origin' will
> have to adjust that part of the command, of course.

An alternative one-liner, if you like :)

ls -d */.git/ | cut -d'/' -f1 | xargs -ri bash -c "echo; set -xe; cd '{}'; git fetch origin; git branch -m master rawhide; git branch -u origin/rawhide rawhide"

Pavel

> 
> --
> Todd
>
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux