Open 6543 opened 4 years ago
https://stackoverflow.com/a/6283843 this solution prints out the merge wich can be also displaied in our web editor to resolve this ... ?
I'm new to gitea, but it looks like this button (under GitHub)
has no equivalent under gitea and I must solve PR manually ?
Thanks
@UBowt571 until now ... yes :/
+1
Is there someone already working on it ? I think about trying to implement it (I'm a noob and this would be my very first fork) but I don't want to do the same work as someone else did
@UBowt571 All contributions are welcome! 😄
I'll try to have a go at this other the next ~couple of days~. Sorry for the delay from when I said I would
+1
@maskym @brymut I too may be working on this feature. Have either of you made any progress?
Go on @richmahn, I've lost track of this and won't be able to submit anything anytime soon
@richmahn Ho, go ahead, I surrendered (normal as a French guy lol) and switched to self-hosted gitlab instead I only managed to display a button but as I never worked in Go lang, the project was too big for me
@maskym Haha. Loved the French joke. I've been working on Gitea and with Go since 2016, even the one who added the original web interface for editing files, so I should be able to do it. Thanks for the update!
We are investigating if Geany would be a viable alternative for the huge Gitlab installation we have running now, and the only real blocker we are seeing now is the lack of conflict resolving within the webinterface. This was mentioned in #14477 but lost traction and it never reached the 1.16 milestone.
@richmahn do you have any plans on implementing this? I have zero experience in coding for Gitea or Go, so I can't be of any help.
@MrHaroldA Totally forgot I even mentioned I would work on this. Will put it on my todo list and see if I can take a stab at it in the coming week.
@richmahn Still wish I had this feature sometimes for productivity sake 😆 By now, I had to learn git more in detail, can you imagine?
I have a PR that now says 2 files are in conflic with the recieving repo., but i still see now way to resolve this... How in earths name can I now fix this? Local repo says everything is fine. Won't let me delete the PR either.
@richmahn any news on this?
@ktpx that's off topic ... but: merge target branch locally or rebase and push
PS: conflict detections do not work like merge - as it would be a merge otherwhise ...
@eUgEntOptIc44 Sadly haven't had time to work on it, but have mentioned it to my team how badly it is needed. Hopefully can look at it soon, or if someone else wants to get this done, let me know. Should we do it exactly like Github does it, or have some extra functionality to making merging easier?
@richmahn thank you for your update on this. I'd like to directly support on this by contributing code. Unfortunately my knowledge of go is very limited. However I hope that you or someone else might be able to do so.
@richmahn @eUgEntOptIc44 I am also interested in contributing to this feature that would be extremely helpful for my team's needs as well.
I would also mention that the way Github handles merge conflict would be a great baseline for an initial implementation.
Please let me know if available for collaboration on this much needed feature.
I'm not aware of any draft so I would say go on and it is yours ;) If you need help just ask. for the UI side I would have a look if it can be done in vue ... example: #19650 ...
@jayczech23 I'm still needing this and keep playing around with getting this implemented like Github. Can we collaborate together?
@jayczech23 Are you on the Gitea Discord server? If we could touch base there I would be far more likely to get to work on this and better communication since I do everything with Discord. https://discord.gg/mPWThBne
@richmahn sounds great. I will sign up on the Gitea Discord and send you a message. Thanks!
Would love to get an occasional update on this or even help out. I am on the Gitea Discord as well and tagged you @richmahn
@jayczech23 @Alexander-Zierhut Ok, now I'm more clear on you both wanting to help. Awesome. I won't let this drop now. Would be a cool hack-a-thon. My work pays me to work on Gitea, but usually working on our own fork of it and then I merge in from upstream (Gitea). I have many coworkers who use our copy of Gitea for editing text files (content) rather than code.
A few things we need to figure out is first of all, I often get told when making a PR in Gitea that there is a conflict, due to different lines being edited, I think 2 apart, so the line between them still remains the same. This for some reason makes Gitea think there is a conflict. Yet if I merge master/main into the conflicting branch, it merges with no problem. That's one thing we need to solve....stop Gitea from declaring such a conflict (if it still is happening) as it is confusing.
Next is we need to mark up what a conflict editor UI should look like. Should it be just like Github, or something better?
@jayczech23 @Alexander-Zierhut I have added you to a Github test repo so we can see how Github does it, mock up the Gitea, and implement all the different paths a user might take:
Accept the collaboration and see this PR:
Here's a PR where the file was modified in base branch but deleted in the head branch. Github just says it is too complicated and says to deal with it on your computer. Wonder if there is a way we could deal with it in the UI?
Ditto with a binary file: https://github.com/richmahn/test/pull/5
Large file with conflicts: https://github.com/richmahn/test/pull/6/conflicts
If we make it exactly like Github we can then just copy their help pages:
(Maybe the last one Gitea already has?)
So basically the base branch is being merged into the head branch to get the conflicts and the diff and then when the user submits the changes it updates with head branch with the base branch and fixes the conflicts. I wonder what the caveats are in doing this, such as as what if either branches are edited and pushed while the user is making their conflict resolution changes, if a temporary branch should be made to work from, etc. Thoughts? How do we properly map this out git-wise, gitea-wise and UI-wise? Do we lock the head branch or something? I wonder what Github does to handle conflict resolution and new changes while it is being done.
For simple conflicts, especially for writing documentation or books, this feature is really useful. In these cases, I really don't want to wait until I can open my IDE to solve simple conflicts.
@ richmahn , any news with this issue? Do u need a help
@NatashaCyn Funny, I just thought about the dire need my organization has for this feature, yet I still haven't gotten to it. I really would like there to be a 2-3 of us working on this...not that I couldn't program it, as I even made the file editor/committer for Gogs/Gitea interface (the original anyway, I'm sure it has been refactored), but to make sure we are doing it right, both how Github does, but also maybe in a way that could improve on that, would be great to have others working on it.
@NatashaCyn I'm trying to get my company's fork and codebase up-to-date with Gitea 1.19.3 and release it. Once that is done, hopefully I can look more at the conflict resolver.
Ok, getting my company fork updated from v1.20, lol. Pretty much done.
Just wanted to add that this feature would be fantastic! If implementation hasn't started yet, I'd like to say I love how clear the IntelliJ/PyCharm style of merge conflict resolution is:
The sweet part about this implementation is two-fold:
Unfortunately not a Go coder, but definitely following along in case there's anything minor I can contribute!
@ijustlovemath Yeah, I agree, that looks great. Wonder how well to do it in a web interface though.
The main challenge with any sort of conflict resolution UI will always be horizontal space. As long as there's a synchronized horizontal scrollbar and a minimum about of horizontal space (enough room for 90/150/180/240 columns + surrounding UI), it should be workable!
This type of interface probably leaves mobile users out to dry, but I wonder how many people are trying to do complex merge conflict resolution on their mobile devices to begin with
Another alternative could be to do it in stages, eg "select changes from your version", "select changes from remote version", "final review", which you could do in some kind of tabbed UI, but then you lose the clarity of having the full picture laid out before you.
Interested to hear any thoughts from others!
The main challenge with any sort of conflict resolution UI will always be horizontal space. As long as there's a synchronized horizontal scrollbar and a minimum about of horizontal space (enough room for 90/150/180/240 columns + surrounding UI), it should be workable!
This type of interface probably leaves mobile users out to dry, but I wonder how many people are trying to do complex merge conflict resolution on their mobile devices to begin with
Another alternative could be to do it in stages, eg "select changes from your version", "select changes from remote version", "final review", which you could do in some kind of tabbed UI, but then you lose the clarity of having the full picture laid out before you.
Interested to hear any thoughts from others!
For the mobile users and quick fixes in general: How about a quick "Accept all incoming changes" and "Accept all local changes"
I am excited to see this. @yardenshoham thanks for accepting this.
Just to clarify, I think this is a good idea. I don't plan on implementing it personally.
@yardenshoham It's all yours!
haha. I know that. I don't mind doing it myself. I just need to find time as it is on my comapny's time the work I put into Gitea.
+1
hello guys, any news on this?
/attempt #9014
with your implementation plan/claim #9014
in the PR body to claim the bountyThank you for contributing to go-Gitea/gitea!
Add a bounty • Share on socials
Attempt | Started (GMT+0) | Solution |
---|---|---|
🟢 @oliverqx | Mar 26, 2024, 11:52:55 PM | WIP |
🟢 @richmahn | Apr 3, 2024, 5:30:13 PM | WIP |
That was me ^ I'm testing the linked platform for bounties since bounty source went awol
/attempt #9014
Algora profile | Completed bounties | Tech | Active attempts | Options |
---|---|---|---|---|
@oliverqx | 6 bounties from 3 projects | TypeScript, Python |
Cancel attempt |
this is part of #5158 summary ... and could be an addition of #9013