Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358922 - Commit dialog should not show hyperlink without pressing Ctrl (or whatever is chosen in the preferences)
Summary: Commit dialog should not show hyperlink without pressing Ctrl (or whatever is...
Status: VERIFIED FIXED
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: 1.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.2-M1   Edit
Assignee: Dani Megert CLA
QA Contact: Remy Suen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-26 12:00 EDT by Dani Megert CLA
Modified: 2011-11-07 07:15 EST (History)
4 users (show)

See Also:


Attachments
Screenshot of my repo config (9.16 KB, image/png)
2011-10-27 12:44 EDT, Dani Megert CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2011-09-26 12:00:20 EDT
1.1.0.201109151100-r.

Eclipse has a preference which modifier (or none) must be pressed to get a text widget into hyperlink mode. The Git Commit dialog ignores this and automatically shows hyperlinks when moving over text.
Comment 1 Dani Megert CLA 2011-10-27 12:41:29 EDT
I've a fix for this and tried to push it to Gerrit but I get this:

org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of push command
	at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:163)
	at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:227)
	at org.eclipse.egit.ui.internal.push.PushOperationUI.execute(PushOperationUI.java:149)
	at org.eclipse.egit.ui.internal.push.PushOperationUI$1.run(PushOperationUI.java:209)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
Caused by: org.eclipse.jgit.errors.TransportException: http://dmegert@egit.eclipse.org/r/p/egit.git: not authorized
	at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:446)
	at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:365)
	at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:130)
	at org.eclipse.jgit.transport.Transport.push(Transport.java:1120)
	at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:159)
	... 4 more


I cloned the repo as indicated in the doc. I also have a Gerrit account (dmegert) and accepted the agreement, but no luck.

Attached is a screenshot of my repo config.

Can anybody help?
Comment 2 Dani Megert CLA 2011-10-27 12:44:02 EDT
Created attachment 206083 [details]
Screenshot of my repo config
Comment 3 Benjamin Muskalla CLA 2011-10-27 18:25:48 EDT
Dani, you should push via ssh to the remote gerrit instance:


git push ssh://username@egit.eclipse.org:29418/egit.git HEAD:refs/for/master


See http://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches
Comment 4 Dani Megert CLA 2011-10-28 01:29:41 EDT
(In reply to comment #3)
> Dani, you should push via ssh to the remote gerrit instance:
> 
> 
> git push ssh://username@egit.eclipse.org:29418/egit.git HEAD:refs/for/master
> 
> 
> See http://wiki.eclipse.org/EGit/Contributor_Guide#Contributing_Patches

I did what's in the doc:
http://wiki.eclipse.org/EGit/User_Guide#Gerrit_Configuration
;-)

Also, when I check the 'Configure Push to Gerrit Code Review' checkbox I would expect that it inserts the correct values (at least for things it can know).
Comment 5 Dani Megert CLA 2011-10-28 02:31:57 EDT
Here we go:  http://egit.eclipse.org/r/4425. My first EGit patch.


Benny, where/who can change my full name on egit.eclipse.org? The field is read-only.
Comment 6 Dani Megert CLA 2011-10-28 04:07:09 EDT
Hudson build failed with a timeout which seems unrelated:

org.eclipse.swtbot.swt.finder.widgets.TimeoutException: Timeout after: 15000 ms.: null
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBotFactory.java:398)
	at org.eclipse.swtbot.swt.finder.SWTBotFactory.waitUntil(SWTBotFactory.java:372)
	at org.eclipse.egit.ui.test.TestUtil.waitUntilTreeHasNodeContainsText(TestUtil.java:212)
	at org.eclipse.egit.ui.view.synchronize.AbstractSynchronizeViewTest.waitForNodeWithText(AbstractSynchronizeViewTest.java:267)
	at org.eclipse.egit.ui.view.synchronize.SynchronizeViewGitChangeSetModelTest.shouldSynchronizeInEmptyRepository(SynchronizeViewGitChangeSetModelTest.java:171)


I tried to re-run the build by clicking 'Build Now', but nothing seems to happen (except that it said it scheduled a build).
Comment 7 Dani Megert CLA 2011-10-28 11:35:22 EDT
I got this by e-mail:

Kevin Sawicki has posted comments on this change.

Change subject: Fixed bug 358922: Commit dialog should not show hyperlink without pressing Ctrl (or whatever is chosen in the preferences)
......................................................................


Patch Set 1:

Please format the commit message according to:

http://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines



But I see no way to reply on the EGit website. Am I now supposed to adjust the comment before it continues? If, so that's a perfect system to keep away future contributions. I hope the reviews are also as good/picky on the code as they are on such details ;-).
Comment 8 Remy Suen CLA 2011-10-28 11:39:53 EDT
(In reply to comment #7)
> But I see no way to reply on the EGit website.

Yes, that part also confused me about Gerrit initially. You need to click the 'Review' button to add a comment to Gerrit.

> Am I now supposed to adjust the
> comment before it continues?

I'm not sure what you mean by this question, Dani. In theory, another committer could approve your patch set and have it merged to master. Though that is not likely to happen.
Comment 9 Dani Megert CLA 2011-10-28 11:50:04 EDT
(In reply to comment #8)
> (In reply to comment #7)
> > But I see no way to reply on the EGit website.
> 
> Yes, that part also confused me about Gerrit initially. You need to click the
> 'Review' button to add a comment to Gerrit.
I don't see that link. Maybe that's reserved to committers?


> > Am I now supposed to adjust the
> > comment before it continues?
> 
> I'm not sure what you mean by this question, Dani. In theory, another committer
> could approve your patch set and have it merged to master. Though that is not
> likely to happen.
OK, I'm not familiar with this process yet. But for sure I won't spend any second to fix the length of a commit message. I have real problems to work on. Of course if there is a bug in the patch I'll be happy to take another look at it.

Another frustrating part is that an automated test system rejects my commit but I have no way to re-run the tests and requesting a new build wrongly tells me that a build got scheduled.
Comment 10 Kevin Sawicki CLA 2011-10-28 11:53:45 EDT
The Review button is located in the Patch Set 1 section about the table that shows the files, you will need to be logged in to view it.
Comment 11 Dani Megert CLA 2011-10-28 12:00:27 EDT
(In reply to comment #10)
> The Review button is located in the Patch Set 1 section about the table that
> shows the files, you will need to be logged in to view it.

Thx. I see it now. I *was* logged in. No idea why I wasn't when clicking on the link. Of course "Review" is not really what I would click to add a comment.
Comment 12 Kevin Sawicki CLA 2011-10-28 12:07:36 EDT
And I apologize for not being clear in my comment, but I wasn't referring to the commit message length.

I was referring to how the bug id is referenced and the missing Signed-off-by line.

Don't show hyperlinks by default in commit dialog

Bug: 358922
Change-Id: Idecff94ab7102046d53c097f10279a8937696ab7
Signed-off-by: Daniel Megert<daniel_megert@ch.ibm.com>

There is a button in the commit dialog toolbar to add a Signed-off-by line automatically
using the author information.
Comment 13 Kevin Sawicki CLA 2011-10-28 12:18:52 EDT
Incorrectly closed it, apologies again.
Comment 14 Dani Megert CLA 2011-10-28 12:22:54 EDT
So, what do I have to do now? I must admit that there are really lots of walls to contribute something to EGit. In the last 10 years working with several Eclipse projects I could

1. fix the bug
2. attach a patch

I see that the EGit process takes load off the EGit committers but it is definitely not encouraging people to contribute to EGit and it's not encouraging me to spend more time on EGit.
Comment 15 Kevin Sawicki CLA 2011-10-28 12:37:03 EDT
You don't necessarily have to do anything, any EGit committer can go ahead and commit your change if they are okay with them as is.

I was just offering information on the EGit/JGit policy for consistent and readable commit messages.

If you do want to make any changes, you can just amend the commit and repush to Gerrit and a new patch set will be created.
This can be done from Eclipse if you bring up the commit dialog, there is an amend previous commit button on the toolbar of the Message area.
Comment 16 Dani Megert CLA 2011-10-29 07:23:39 EDT
(In reply to comment #15)
> You don't necessarily have to do anything, any EGit committer can go ahead and
> commit your change if they are okay with them as is.
> 
> I was just offering information on the EGit/JGit policy for consistent and
> readable commit messages.

Thanks for that help. From your comment it was not clear whether this was just a hint or an order for me that I have to execute before we can continue.

Why does the EGit team care about how the comment is formatted at all? I saw the guidelines but no clue why they are needed at all.
Comment 17 Dani Megert CLA 2011-10-31 09:35:45 EDT
Since I found no way to trigger another build, I took the opportunity to fix the commit message as a trigger. The build then succeeded successfully.


Sorry if I sounded a bit negative last week. I guess the most frustrating part on the start was that the doc guided me down the wrong road of using HTTP and then later I got a -1 from Hudson without any means to rerun the tests (as I was sure the failure was not caused by my fix).
Comment 18 Dani Megert CLA 2011-10-31 10:32:26 EDT
> and then later I got a -1 from Hudson without any means to rerun the tests (as
> I was sure the failure was not caused by my fix).
Filed bug 362488 for that.
Comment 19 Remy Suen CLA 2011-10-31 19:32:22 EDT
Fix merged into master. Thanks, Dani!
http://egit.eclipse.org/w/?p=egit.git;a=commit;h=ab971ae7c1999af15fb3f1a6714bca047aaa5fd7
Comment 20 Dani Megert CLA 2011-11-01 04:30:28 EDT
Remy, why are you now listed as "author" and not me? Isn't one benefit of Git that one separates between author and committer?

The commit says:

commit 66d8a2b6db087d79381812a9b84fedbf1734be3c
Author: Remy Suen <remysuen@ca.ibm.com> 2011-11-01 00:30:18
Committer: Code Review <codereview-daemon@eclipse.org> 2011-11-01 00:30:18
Parent: b1a5051780da25974a7e3f37ce3d387fde1aec33 (Merge "Do not set a filter if an empty string is present")
Parent: ab971ae7c1999af15fb3f1a6714bca047aaa5fd7 (Commit dialog should not show hyperlink without pressing Ctrl)
Branches: origin/master, master
Comment 21 Remy Suen CLA 2011-11-01 07:00:46 EDT
(In reply to comment #20)
> Remy, why are you now listed as "author" and not me? Isn't one benefit of Git
> that one separates between author and committer?

Dani, you are still the committer for the original code change, as shown in the link I provided.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=358922

I am the author of the merge commit (which has zero code changes) as I was the one that initiated the merge approval to Gerrit to have your change set be accepted into our development stream (master). Does this make sense?
http://egit.eclipse.org/w/?p=egit.git;a=commit;h=66d8a2b6db087d79381812a9b84fedbf1734be3c
Comment 22 Remy Suen CLA 2011-11-01 07:01:45 EDT
(In reply to comment #21)
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=358922

Whoops. :| Of course, this should have been the link I linked to in comment 19.
http://egit.eclipse.org/w/?p=egit.git;a=commit;h=ab971ae7c1999af15fb3f1a6714bca047aaa5fd7
Comment 23 Dani Megert CLA 2011-11-01 07:17:05 EDT
> Dani, you are still the committer for the original code change, as shown in the
> link I provided.
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=358922
> 
> I am the author of the merge commit (which has zero code changes) as I was the
> one that initiated the merge approval to Gerrit to have your change set be
> accepted into our development stream (master). Does this make sense?
Mmh, no. I would expect that the author does not get changed. Same like when one does a cherry-pick.
Comment 24 Remy Suen CLA 2011-11-01 07:45:14 EDT
(In reply to comment #23)
> Mmh, no. I would expect that the author does not get changed.

Dani, you are still the author of your code change.
http://egit.eclipse.org/w/?p=egit.git;a=commit;h=ab971ae7c1999af15fb3f1a6714bca047aaa5fd7

> Same like when
> one does a cherry-pick.

We are not cherry-picking, we are merging two branches.
Comment 25 Remy Suen CLA 2011-11-01 07:54:38 EDT
(In reply to comment #21)
> I am the author of the merge commit (which has zero code changes) as I was the
> one that initiated the merge approval to Gerrit to have your change set be
> accepted into our development stream (master).

To be clear, if your commit's parent happened to be the tip of master, then a merge commit would not have been required. However, it wasn't so a merge commit was created.
Comment 26 Dani Megert CLA 2011-11-01 08:01:54 EDT
> To be clear, if your commit's parent happened to be the tip of master, then a
> merge commit would not have been required. However, it wasn't so a merge commit
> was created.
Ah, OK - that makes sense. Thanks for the clarification Remy.
Comment 27 Dani Megert CLA 2011-11-07 07:15:10 EST
Verified in 201111061513.