Community
Participate
Working Groups
I work with a contributor who frequently rebases his branches. To be able to push changes and fetch them we need to handle '+' properly. Moreover there should be an easy way in UI to do push/fetch --force when spec does not have '+'. At this point, assuming that '+' is fixed, we would need to modify the clone configuration.
Fix: https://github.com/pjanik/orion.server/tree/bug351440 https://github.com/pjanik/orion.client/tree/bug351440 I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use. Git REST API now supports forced push (and fetch). I've added Forced Push All command in the log view for now. We talked earlier that forced push can be done using repo configuration - I was wrong, not in Orion. All push operations in Orion use some defined refspec, like pushing HEAD to some remote etc. So, default value from config is never read. Because of that I implemented such forced push/fetch.
Looking good. There is no way to do a forced fetch in the client right now, is there? That plus more tests and I'm fine with releasing the fix.
No, there isn't. Ofc I can update UI if it's useful.
(In reply to comment #3) > No, there isn't. Ofc I can update UI if it's useful. Shouldn't we consult the config for push/fetch too? In EGit for instance, if there is push refspec like 'remote.pjanik.push +refs/heads/master:refs/heads/master' and we are pushing pjanik master, it will suggest to do force push. If the spec is 'refs/heads/master:refs/heads/master', it will not use force. Of course push/fetch with force flag is fine, but it would be handy to consult configuration too. For instance when I'm working with you Piotrek i would just use a spec with + always and I would not check the force flag during each fetch operation.
I chatted with Piotrek a bit and it seems that what we really need is git push on remote. I asked him to raise a separate bug for it. We already have fetch for remotes, but no push. Regarding this bug, we need force for push and fetch. I'll look at your fix when you add UI. So far you could just add an extra icon for fetch/push force, however we would need something smarter in UI to parameterize actions. Moreover it seems that I can't push newly created local branches, if there is no 'origin' remote. Piotrek, if you confirm this, please raise a bug.
fixed https://github.com/pjanik/orion.server/tree/bug351440 https://github.com/pjanik/orion.client/tree/bug351440 1. UI is updated - there are both forced push and forced fetch in the Log/Remote view. 2. I've also fixed small bug - when fetch without force flag was rejected, no information about that was provided. UI showed just OK, so user could not come up withe the idea, that he needs forced fetch in that case. It was caused by FetchJob, which ignored results of fetch operation. 3. I've added tests (forced fetch). So, I think that this bug is more or less complete.
The UI part looks fine. I think we should look closer at bug 342739. Finally there should be only one Fetch (and Push) action and 'force' checkbox should be part of the command UI. But it is a separate bug blocked by bug 342739. Tomek, could you look at the server side again? Looks like your comments are addressed. Once it is done I'll handle the UI part.
(In reply to comment #7) > Tomek, could you look at the server side again? Piotrek, please take a look at my comments here: https://github.com/pjanik/orion.server/commit/bc7ea500304019ebb433565133bf48a3826a1785
(In reply to comment #8) > Piotrek, please take a look at my comments here: > https://github.com/pjanik/orion.server/commit/bc7ea500304019ebb433565133bf48a3826a1785 Ok, I've answered there. Fixed version: https://github.com/pjanik/orion.server/commits/bug351440
Server side fixed with http://git.eclipse.org/c/e4/org.eclipse.orion.server.git/commit/?id=85a59817b9f379e4ce823f3d17a44b10cd9b698d. Back to you, Szymon.
Created attachment 199970 [details] mylyn/context/zip
UI fixed with 89852ce9bed47890c2dd6365381d46e3032bcf8d.