Community
Participate
Working Groups
I figure I must be missing something but it wasn't at all clear to me how we go about doing a checkout by tag. I was looking all over the repositories page but couldn't figure it out. The concrete case I was looking at was how to go about checking out the 1.6.1 tag from my clone of https://github.com/dojo/dojo
Gosia, please look at it. Talk to Tomek for the missing API and Simon and Susan for possible UI presentations.
Tomek, do we have API for this?
I talked to Simon a bit about the presentation. One of approaches would be to add the tag node for repos on our git clone view repository name |_branches |_remotes |_tags |_tag1 |_tag2 and the checkout action for tag object. It looks like the quickest and quite good way to address the bug.
re:checkout action for a tag -- into a new local branch... Otherwise we end up in a bizarro disconnected state.
(In reply to comment #2) > Tomek, do we have API for this? No, we haven't. I'll put it up asap.
The API is ready[1]. It's similar to checking out a branch, ie call PUT on a clone location with two JSON params [2]: * Tag, for the tag to checkout. * Branch, for the branch to create. There is a limitation in JGit[3] which doesn't allow to checkout a tag into a branch with the same name so please use a different name for the branch. I agreed with Gosia, that for now it's going to be something like "tag_{tag}". [1] 311101f234f89567d5a668d0e0bb711a7afdffd5 [2] http://wiki.eclipse.org/Orion/Server_API/Git_API#Checking_out_a_tag [3] http://egit.eclipse.org/r/#change,4336
I pushed my changes to origin/bug360193 branch. Due to bug 360641 and bug 360667 I can't push it to master now, but you can see how it works. Unfortunately due to bug 360641 it doesn't work on our client and server repositories, I've tested it on my github. It still needs a new icon for "Tags" to created.
I've added icon for Tags.
Bug 360641 is very unlikely to be fixed in .3, see the last comment there. Simon, if you think this is a must have for .3, please re-target. In that case, I will try to find a workaround on our side, not waiting on a fix in JGit.
Let's take one day to take a look and then decide -- if egit can do it...
(In reply to comment #10) > Let's take one day to take a look and then decide -- if egit can do it... I think we're on the right track to actually fix this. In bug 360641 I did exactly what EGit does - don't bother about parsing an Object to RevTag, be fine with a Ref and use its name as tag name. I've checked out Gosia's branch from comment 7 and it seems to work fine. Since it's the endgame, Susan please double check Gosia's changes in the UI.
(In reply to comment #11) > Since it's the endgame, Susan please double check Gosia's changes in the UI. Susan, I verified that Tomek's fixes work, so could you checkout this branch, to see it this UI is fine? I've added "tags" icon (my own drawing) and added it to the sprite, so please double check if this is fine. Generally with your green light this feature is good to go.
(In reply to comment #12) > (In reply to comment #11) > > Since it's the endgame, Susan please double check Gosia's changes in the UI. > > Susan, I verified that Tomek's fixes work, so could you checkout this branch, > to see it this UI is fine? I've added "tags" icon (my own drawing) and added it > to the sprite, so please double check if this is fine. > Generally with your green light this feature is good to go. I'm not seeing a branch called origin/bug360193 in the git clones view. Are you sure this branch is in the remote? (or we have some other bug preventing me from seeing this?)
@Susan: Try Fetch on the remote first. I'm able to see the branch in a newly created clone on orion.eclipse.org.
(In reply to comment #14) > @Susan: Try Fetch on the remote first. I'm able to see the branch in a newly > created clone on orion.eclipse.org. I can see the branch from eclipse.org. I can't figure out how to fetch the tags/branch info from the remote using the Orion UI. "Fetch" from git log on remote or git status doesn't do it. I'm guessing I need "Fetch All." where is it?
(In reply to comment #15) > (In reply to comment #14) > > @Susan: Try Fetch on the remote first. I'm able to see the branch in a newly > > created clone on orion.eclipse.org. > > I can see the branch from eclipse.org. > I can't figure out how to fetch the tags/branch info from the remote using the > Orion UI. "Fetch" from git log on remote or git status doesn't do it. I'm > guessing I need "Fetch All." where is it? opened bug 361017 to discuss this. I recall having this problem long ago and had to use command line to fetch in order to see the branches.
Reviewed source code and tried the new UI. Note that running an inner site from today's Orion eclipse.org build doesn't contain Tomek's fix for bug 360641, so I couldn't verify it for the eclipse repos. But I was able to tag one of my github repos and then create a local branch based on that tag. I also verified that if you try to reuse a branch name you get a reasonable error message. I didn't +1 it because it doesn't seem to work if you don't type a new branch name. For example, you get the edit box with "Branch name" and if you just hit enter, nothing seemingly occurs. No new branch. I think instead the edit box should default to use the tag name, so I can just hit enter and the right thing will happen for me. While trying to figure out what went wrong in the above scenario, i was able to get detached at some point, but I think I might have deleted the original tag by accident. I'm ok to release this code if we can make the default case (push checkout, it proposes a good default name, hit enter, and it works).
(In reply to comment #17) > I'm ok to release this code if we can make the default case (push checkout, it > proposes a good default name, hit enter, and it works). I released this change today, so I understand it as green light to merge it to master.
(In reply to comment #18) > (In reply to comment #17) > > I'm ok to release this code if we can make the default case (push checkout, it > > proposes a good default name, hit enter, and it works). > > I released this change today, so I understand it as green light to merge it to > master. yep. thanks.