You are not logged in.

#1 2021-03-09 19:10:49

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,926

How to create merge request for mesa/gitlab from CLI ?

@Moderators :
while this topic would probably fit in creating and modifying packages board, there's very little archlinux specific in it.
I felt the gnu/linux board was a better choice.



llvm trunk recently got changes that broke building mesa trunk.
I filed an issue[1] and with help of others was able to create a patch[2].

The patch does work and has been tested. (It does need some comments and possibly some reformatting)

I would like to create a merge request from this patch so it can be reviewed and hopefully added to mesa trunk master but for me this is unexplored terrain with low visibility.


https://git-scm.com/docs/git-push#Docum … ltoptiongt & https://docs.gitlab.com/ce/user/project … tions.html indicate creating a merge request should be possible from CLI.

I do have a gitlab.freedesktop.org user account and uploaded an ssh key but am not a member of any project nor do I have commit rights.

Most doc wrt MR / PR suggest you have to fork a repo , create a new branch,  add changes and then submit the request.

I do use basic git functionality for aur packages, but have several questions.

- what is the difference between cloning and forking a repo ?
- how to add a branch to a fork
- can the fork be local or does it need to be public ?
- what push options would work
- do I need more access to upstream repo for this to work ?
Please help.


[1] https://gitlab.freedesktop.org/mesa/mesa/-/issues/4200
[2] https://gitlab.freedesktop.org/mesa/mes … Type.patch


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#2 2021-03-09 21:25:18

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: How to create merge request for mesa/gitlab from CLI ?

Not sure what this has to do with creating merge requests via the CLI, but...


Lone_Wolf wrote:

- what is the difference between cloning and forking a repo ?

Forking a repo means to clone it, but instead of cloning it to your PC, you clone it to your github/gitlab account.

In all respects, it acts like you're the owner of the repo. Because you are.

Lone_Wolf wrote:

- do I need more access to upstream repo for this to work ?

No, you do not. In fact, this is the entire reason forking exists, so you don't need (write) access to the upstream repo but still have somewhere you own to push your commits to.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2021-03-15 18:53:05

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,926

Re: How to create merge request for mesa/gitlab from CLI ?

Thanks, Eschwartz . Your answer helped me further.
Slowly i'm making progress.

Couldn't find a fork command for git, so decided to use the gitlab UI to setup the fork .

- git clone gave me a local copy of the forked repo
- git remote add upstream url-of-upstream-repo to make things easier
- git pull upstream master   updated my local copy
- git push updated the fork

Next I have to figure out how to add a branch.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#4 2021-03-15 19:12:41

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: How to create merge request for mesa/gitlab from CLI ?

There is a fork command for 'hub', which is a github.com wrapper program that enhances git to integrate with github.

alias git=hub
git clone user/repo # automatically uses https://github.com/
cd repo
git fork # API call to github.com to fork to your account, then does 'git remote add'
git remote add otheruser # add the "otheruser" remote pointing to https://github.com/otheruser/repo

It's possible someone could write a similar wrapper program, but targeted at GitLab rather than Github. I haven't investigated if such offerings exist.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#5 2021-03-15 19:19:46

dmerej
Member
From: Paris
Registered: 2016-04-09
Posts: 101
Website

Re: How to create merge request for mesa/gitlab from CLI ?

Well, there's one called lab: https://github.com/zaquestion/lab


Responsible Coder, Python Fan, Rust enthusiast

Offline

#6 2021-03-16 03:07:11

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: How to create merge request for mesa/gitlab from CLI ?

That looks pretty nice, maybe I'll add it to the official repos.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

Board footer

Powered by FluxBB