threads / patch / 11516

patchShowing abbreviated commit hash of the versions in Compare editor.

Subject: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.

## tl;dr

9 messages between Jan 8, 2008 and Jan 13, 2008. Diffs are folded; open one to read it.

replies: 8people: 2as markdown or json

Roger C. Soares· Jan 8, 2008, 01:15 UTC · lore
Signed-off-by: Roger C. Soares <rogersoares@intelinet.com.br>
---
Some more patches, please evaluate.
Don't know what others are working on,
but right now I'm missing a search functionality so
this will probably be my next egit little feature.
cheers
 .../GitCompareFileRevisionEditorInput.java         |   12 ++++++++++++
 .../spearce/egit/ui/internal/GitResourceNode.java  |    5 +++++
 2 files changed, 17 insertions(+), 0 deletions(-)
Show changes to 2 files +17 −0

org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitCompareFileRevisionEditorInput.java, org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitResourceNode.java

diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitCompareFileRevisionEditorInput.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitCompareFileRevisionEditorInput.java
index eaba1fa..403fdc1 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitCompareFileRevisionEditorInput.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitCompareFileRevisionEditorInput.java
@@ -152,6 +152,18 @@ public class GitCompareFileRevisionEditorInput extends CompareEditorInput {
 
 	private void initLabels(ICompareInput input) {
 		CompareConfiguration cc = getCompareConfiguration();
+		if(left != null && left instanceof GitResourceNode) {
+			String ci = ((GitResourceNode)left).getContentIdentifier();
+			if(ci != null) {
+				cc.setLeftLabel(ci.substring(0, 7) + "..");
+			}
+		}
+		if(right != null && right instanceof GitResourceNode) {
+			String ci = ((GitResourceNode)right).getContentIdentifier();
+			if(ci != null) {
+				cc.setRightLabel(ci.substring(0, 7) + "..");
+			}
+		}
 		if (getLeftRevision() != null) {
 			String leftLabel = getFileRevisionLabel(getLeftRevision());
 			cc.setLeftLabel(leftLabel);
diff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitResourceNode.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitResourceNode.java
index e19cef5..f25855a 100644
--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitResourceNode.java
+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/internal/GitResourceNode.java
@@ -21,6 +21,7 @@ import org.spearce.jgit.lib.TreeEntry;
 public class GitResourceNode extends BufferedContent implements IStructureComparator, ITypedElement {
 	TreeEntry entry;
 	GitResourceNode[] children;
+	String contentIdentifier;
 
 	public GitResourceNode(TreeEntry e) {
 		entry = e;
@@ -28,6 +29,7 @@ public class GitResourceNode extends BufferedContent implements IStructureCompar
 
 	public GitResourceNode(IFileRevision file) {
 		this(file instanceof GitCommitFileRevision ? ((GitCommitFileRevision)file).getTreeEntry() : null);
+		contentIdentifier = ((GitCommitFileRevision)file).getContentIdentifier();
 	}
 
 	public Object[] getChildren() {
@@ -100,5 +102,8 @@ public class GitResourceNode extends BufferedContent implements IStructureCompar
 		}
 	}
 
+	public String getContentIdentifier() {
+		return contentIdentifier;
+	}
 }
 
-- 
1.5.3.7
Robin Rosenberg· Jan 8, 2008, 22:12 UTC · re: Roger C. Soares · lore

Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.

Thanks.
tisdagen den 8 januari 2008 skrev Roger C. Soares:
Show 5 quoted lines
> 
> Signed-off-by: Roger C. Soares <rogersoares@intelinet.com.br>
> ---
> Some more patches, please evaluate.
> Don't know what others are working on,

I'm implementing fetch (with some help from Shawn). Progress in place. I still need to update refs and get in consistent with native git behaviour.

I'm also updating the javadocs.
> but right now I'm missing a search functionality so
> this will probably be my next egit little feature.
Sounds good.
-- robin
Roger C. Soares· Jan 9, 2008, 01:33 UTC · re: Robin Rosenberg · lore

Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.

Robin Rosenberg escreveu:
Show 5 quoted lines
> I'm implementing fetch (with some help from Shawn). Progress in
> place. I still need to update refs and get in consistent with native
> git behaviour.
>
> I'm also updating the javadocs.
Cool.

I use a lot the eclipse feature that highlights all occurences of a variable or method but with all the warnings in the project it is difficult to visually find these occurences. So I'm anxious to remove a lot of warnings. Public methods without documentation are one of them. Is it ok if I send you a patch removing all the warnings I know how but the ones about public methods needing documentation as you're already documenting them? I also want to remove the auto generated TODOs, as they don't actually say what to do, like this one: // TODO Auto-generated catch block

[]s, Roger.

Robin Rosenberg· Jan 10, 2008, 23:46 UTC · re: Roger C. Soares · lore

Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.

onsdagen den 9 januari 2008 skrev Roger C. Soares:
Show 17 quoted lines
> Robin Rosenberg escreveu:
> > I'm implementing fetch (with some help from Shawn). Progress in
> > place. I still need to update refs and get in consistent with native
> > git behaviour.
> >
> > I'm also updating the javadocs.
> Cool.
> 
> I use a lot the eclipse feature that highlights all occurences of a 
> variable or method but with all the warnings in the project it is 
> difficult to visually find these occurences. So I'm anxious to remove a 
> lot of warnings. Public methods without documentation are one of them. 
> Is it ok if I send you a patch removing all the warnings I know how but 
> the ones about public methods needing documentation as you're already 
> documenting them? I also want to remove the auto generated TODOs, as 
> they don't actually say what to do, like this one:
> // TODO Auto-generated catch block

I pushed my doc-branch as pu, you can look at it. My intention is take a look again and then push it as master if there are no objections. Is it ok and good to flags public stuff without javadoc as an error (tip pu commit)?

The abbr commit patch is already pushed to master.
-- robin
Roger C. Soares· Jan 12, 2008, 03:02 UTC · re: Robin Rosenberg · lore

Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.

Robin Rosenberg escreveu:
Show 6 quoted lines
> I pushed my doc-branch as pu, you can look at it. My intention is take a look again
> and then push it as master if there are no objections. Is it ok and good to flags 
> public stuff without javadoc as an error (tip pu commit)?
>
> The abbr commit patch is already pushed to master.
>   

Looks good to me. You actually took some time to explain things, it will be usefull, thanks! If we really want to document all the public methods then I think it's nice to flag it's absence as an error. It would have made me document GitResourceNode.getContentIdentifier(), it's now one more comment for you to add before pushing to master ;)

[]s, Roger.

Roger C. Soares· Jan 12, 2008, 03:37 UTC · re: Robin Rosenberg · lore

Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.

Robin Rosenberg escreveu:
> I pushed my doc-branch as pu, you can look at it. My intention is take a look again
> and then push it as master if there are no objections. Is it ok and good to flags 
> public stuff without javadoc as an error (tip pu commit)?
>   

Got some errors, when trying to export to a deployable plugin: "/home/roger/eclipse/workspace/egit/org.spearce.jgit/tst" does not exist!

And on "team -> share project... -> Git", it goes to the CVS wizard.

[]s, Roger.

Robin Rosenberg· Jan 12, 2008, 15:44 UTC · re: Roger C. Soares · lore

Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.

lördagen den 12 januari 2008 skrev Roger C. Soares:
Show 10 quoted lines
> 
> Robin Rosenberg escreveu:
> > I pushed my doc-branch as pu, you can look at it. My intention is take a look again
> > and then push it as master if there are no objections. Is it ok and good to flags 
> > public stuff without javadoc as an error (tip pu commit)?
> >   
> Got some errors, when trying to export to a deployable plugin:
> "/home/roger/eclipse/workspace/egit/org.spearce.jgit/tst" does not exist!
> 
> And on "team -> share project... -> Git", it goes to the CVS wizard.
Due to my lack of testing @_@. I pushed a new pu branch with these two errors fixed.

Thanks -- robin

Roger C. Soares· Jan 13, 2008, 21:02 UTC · re: Robin Rosenberg · lore

Re: [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.

Hi Robin,

For what I've been using it's all working now. I saw some typos if you want to update them while you're at it:

Activator.java
     * Instatiate an error exception.
     * Log a dbeug message
GitHistoryPage.java
     * @return reformated comment
     * This class extendes the build in history page with Git features, such

[]s, Roger.

-- Robin Rosenberg escreveu:

Show 23 quoted lines
> lördagen den 12 januari 2008 skrev Roger C. Soares:
>   
>> Robin Rosenberg escreveu:
>>     
>>> I pushed my doc-branch as pu, you can look at it. My intention is take a look again
>>> and then push it as master if there are no objections. Is it ok and good to flags 
>>> public stuff without javadoc as an error (tip pu commit)?
>>>   
>>>       
>> Got some errors, when trying to export to a deployable plugin:
>> "/home/roger/eclipse/workspace/egit/org.spearce.jgit/tst" does not exist!
>>
>> And on "team -> share project... -> Git", it goes to the CVS wizard.
>>     
>
> Due to my lack of testing @_@. I pushed a new pu branch with these two errors fixed.
>
> Thanks
> -- robin
>
>
>
>   
Robin Rosenberg· Jan 13, 2008, 23:54 UTC · re: Roger C. Soares · lore

Re: javadoc (was [EGIT PATCH] Showing abbreviated commit hash of the versions in Compare editor.)

söndagen den 13 januari 2008 skrev Roger C. Soares:
> Hi Robin,
> 
> For what I've been using it's all working now.
> I saw some typos if you want to update them while you're at it:
Fixed, on pu now. Will push to master tomorrow.
-- robiin

← back to recent threads