{"thread":{"id":"7197","subject":"[EGIT PATCH 01/10] Git history refresh problem","startedAt":"2007-03-11T18:15:15Z","lastAt":"2007-03-11T20:45:12Z","messageCount":16,"participants":["Robin Rosenberg","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"36830","messageId":"20070311180608.18012.13767.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":null,"subject":"[EGIT PATCH 00/10] Fixes and improvement on Eclipse plugin","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2007-03-11T18:15:15Z","receivedAt":"2007-03-11T18:15:15Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Here is a mix of bug fixes and performance improvements. The most\nimportant ones are that the history panel now shows the right\nhistory (yea, I'm an SWT/JFace n00b so there may be more suble bugs\nthere). Actually, now that I come to think of it; the rows in the\nhistory window sometimes get the wrong height. The workaround is\nto press ALT-F4 and then cancel. \n\nThe other big thing is that Eclipse now caches commits so browsing\nthe resorces updates the history view immediately instead of an\nannoying second or two later, provided the Link with Editor button\nis pushed.\n\nAs for JDK, I recommend JDK 1.5.11 or JDK 1.6 for running because\nof improvements and bug fixes made by Sun wrt GC and memory mapping.\n\n-- robin\n"},{"id":"36829","messageId":"20070311181521.18012.76975.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[EGIT PATCH 01/10] Git history refresh problem","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T18:15:21Z","receivedAt":"2007-03-11T18:15:21Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"It seems the history window often lags one event behind.\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n .../src/org/spearce/egit/ui/GitHistoryPage.java    |    6 +++++-\n 1 files changed, 5 insertions(+), 1 deletions(-)\n\ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\nindex 2a5fa98..d1591f0 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\n@@ -242,9 +242,13 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,\n \t\t\t\t\t.getFileHistoryFor((IResource) getInput(),\n \t\t\t\t\t\t\tIFileHistoryProvider.SINGLE_LINE_OF_DESCENT, null/* monitor */);\n \t\t\tfileRevisions = fileHistoryFor.getFileRevisions();\n-\t\t\ttree.setData(fileRevisions);\n+\t\t\ttree.clearAll(true);\n \t\t\ttree.setItemCount(fileRevisions.length);\n+\t\t\ttree.setData(fileRevisions);\n+\t\t\tSystem.out.println(\"inputchanged, invoking refresh\");\n \t\t\tviewer.refresh();\n+\t\t\ttree.getParent().layout();\n+\t\t\ttree.getParent().getParent().layout();\n \t\t}\n \n \t\tpublic void dispose() {\n"},{"id":"36832","messageId":"20070311181526.18012.28361.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[EGIT PATCH 02/10] Support commit encoding header","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T18:15:26Z","receivedAt":"2007-03-11T18:15:26Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Commit objects may contain an encoding, supposedly meant to\nindicated the encoding used for that particular commt.\n\nThis is the last header line before the comment as far as I know.\n\nUnfortunately the encoding header only reflects a setting in the\nconfig file, so it is most likely to be wrong by default unless\nyou are on a UTF-8 platform (in which case the header isn't really\nneeded). Later on we'll have to decode that more intelligently. For\nnow we make an attempt to decode according to the setting if present,\notherwise we use the platform default.\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n .../src/org/spearce/jgit/lib/Commit.java           |   55 +++++++++++++++++------\n .../src/org/spearce/jgit/lib/ObjectWriter.java     |   11 ++++-\n .../tst/org/spearce/jgit/lib/T0003_Basic.java      |   32 +++++++++++++\n 3 files changed, 82 insertions(+), 16 deletions(-)\n\ndiff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/Commit.java b/org.spearce.jgit/src/org/spearce/jgit/lib/Commit.java\nindex d1ef5de..1b644dd 100644\n--- a/org.spearce.jgit/src/org/spearce/jgit/lib/Commit.java\n+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/Commit.java\n@@ -16,10 +16,10 @@\n  */\n package org.spearce.jgit.lib;\n \n-import java.io.BufferedReader;\n import java.io.ByteArrayInputStream;\n+import java.io.DataInputStream;\n import java.io.IOException;\n-import java.io.InputStreamReader;\n+import java.nio.charset.Charset;\n import java.util.ArrayList;\n import java.util.List;\n \n@@ -45,6 +45,8 @@ public class Commit implements Treeish {\n \n \tprivate byte[] raw;\n \n+\tprivate Charset encoding;\n+\n \tpublic Commit(final Repository db) {\n \t\tobjdb = db;\n \t\tparentIds = new ArrayList(2);\n@@ -132,8 +134,7 @@ public class Commit implements Treeish {\n \t\t// FIXME: handle I/O errors\n \t\tif (raw != null) {\n \t\t\ttry {\n-\t\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(\n-\t\t\t\t\t\tnew ByteArrayInputStream(raw)));\n+\t\t\t\tDataInputStream br = new DataInputStream(new ByteArrayInputStream(raw));\n \t\t\t\tString n = br.readLine();\n \t\t\t\tif (n == null || !n.startsWith(\"tree \")) {\n \t\t\t\t\tthrow new CorruptObjectException(commitId, \"no tree\");\n@@ -144,24 +145,33 @@ public class Commit implements Treeish {\n \t\t\t\tif (n == null || !n.startsWith(\"author \")) {\n \t\t\t\t\tthrow new CorruptObjectException(commitId, \"no author\");\n \t\t\t\t}\n-\t\t\t\tauthor = new PersonIdent(n.substring(\"author \".length()));\n+\t\t\t\tString rawAuthor = n.substring(\"author \".length());\n \t\t\t\tn = br.readLine();\n \t\t\t\tif (n == null || !n.startsWith(\"committer \")) {\n \t\t\t\t\tthrow new CorruptObjectException(commitId, \"no committer\");\n \t\t\t\t}\n-\t\t\t\tcommitter = new PersonIdent(n.substring(\"committer \".length()));\n+\t\t\t\tString rawCommitter = n.substring(\"committer \".length());\n \t\t\t\tn = br.readLine();\n-\t\t\t\tif (n == null || !n.equals(\"\")) {\n-\t\t\t\t\tthrow new CorruptObjectException(commitId,\n-\t\t\t\t\t\t\t\"malformed header\");\n+\t\t\t\tif (n != null && n.startsWith(\t\"encoding\"))\n+\t\t\t\t\tencoding = Charset.forName(n.substring(\"encoding \".length()));\n+\t\t\t\telse\n+\t\t\t\t\tif (n == null || !n.equals(\"\")) {\n+\t\t\t\t\t\tthrow new CorruptObjectException(commitId,\n+\t\t\t\t\t\t\t\t\"malformed header:\"+n);\n \t\t\t\t}\n-\t\t\t\tStringBuffer tempMessage = new StringBuffer();\n-\t\t\t\tchar[] readBuf = new char[2048];\n-\t\t\t\tint readLen;\n-\t\t\t\twhile ((readLen = br.read(readBuf)) > 0) {\n-\t\t\t\t\ttempMessage.append(readBuf, 0, readLen);\n+\t\t\t\tbyte[] readBuf = new byte[br.available()]; // in-memory stream so this is all bytes left\n+\t\t\t\tbr.read(readBuf);\n+\t\t\t\tif (encoding != null) {\n+\t\t\t\t\t// TODO: this isn't reliable so we need to guess the encoding from the actual content\n+\t\t\t\t\tauthor = new PersonIdent(new String(rawAuthor.getBytes(),encoding));\n+\t\t\t\t\tcommitter = new PersonIdent(new String(rawCommitter.getBytes(),encoding));\n+\t\t\t\t\tmessage = new String(readBuf,encoding);\n+\t\t\t\t} else {\n+\t\t\t\t\t// TODO: use config setting / platform / ascii / iso-latin\n+\t\t\t\t\tauthor = new PersonIdent(new String(rawAuthor.getBytes()));\n+\t\t\t\t\tcommitter = new PersonIdent(new String(rawCommitter.getBytes()));\n+\t\t\t\t\tmessage = new String(readBuf);\n \t\t\t\t}\n-\t\t\t\tmessage = tempMessage.toString();\n \t\t\t} catch (IOException e) {\n \t\t\t\te.printStackTrace();\n \t\t\t} finally {\n@@ -183,4 +193,19 @@ public class Commit implements Treeish {\n \tpublic String toString() {\n \t\treturn \"Commit[\" + getCommitId() + \" \" + getAuthor() + \"]\";\n \t}\n+\n+\tpublic void setEncoding(String e) {\n+\t\tencoding = Charset.forName(e);\n+\t}\n+\n+\tpublic void setEncoding(Charset e) {\n+\t\tencoding = e;\n+\t}\n+\n+\tpublic String getEncoding() {\n+\t\tif (encoding != null)\n+\t\t\treturn encoding.name();\n+\t\telse\n+\t\t\treturn null;\n+\t}\n }\ndiff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectWriter.java b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectWriter.java\nindex 667b569..a88fd95 100644\n--- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectWriter.java\n+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectWriter.java\n@@ -108,8 +108,11 @@ public class ObjectWriter {\n \n \tpublic ObjectId writeCommit(final Commit c) throws IOException {\n \t\tfinal ByteArrayOutputStream os = new ByteArrayOutputStream();\n+\t\tString encoding = c.getEncoding();\n+\t\tif (encoding == null)\n+\t\t\tencoding = Constants.CHARACTER_ENCODING;\n \t\tfinal OutputStreamWriter w = new OutputStreamWriter(os,\n-\t\t\t\tConstants.CHARACTER_ENCODING);\n+\t\t\t\tencoding);\n \n \t\tw.write(\"tree \");\n \t\tc.getTreeId().copyTo(w);\n@@ -130,6 +133,12 @@ public class ObjectWriter {\n \t\tw.write(c.getCommitter().toExternalString());\n \t\tw.write('\\n');\n \n+\t\tif (!encoding.equals(\"UTF-8\")) {\n+\t\t\tw.write(\"encoding \");\n+\t\t\tw.write(encoding);\n+\t\t\tw.write('\\n');\n+\t\t}\n+\t\t\n \t\tw.write('\\n');\n \t\tw.write(c.getMessage());\n \t\tw.close();\ndiff --git a/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java b/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java\nindex 9e6f805..9c807f9 100644\n--- a/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java\n+++ b/org.spearce.jgit/tst/org/spearce/jgit/lib/T0003_Basic.java\n@@ -21,6 +21,8 @@ import java.io.FileInputStream;\n import java.io.FileReader;\n import java.io.FileWriter;\n import java.io.IOException;\n+import java.util.Date;\n+import java.util.TimeZone;\n \n public class T0003_Basic extends RepositoryTestCase {\n \tpublic void test001_Initalize() {\n@@ -385,4 +387,34 @@ public class T0003_Basic extends RepositoryTestCase {\n \t\tassertEquals(new PersonIdent(jauthor, 1154236443000L, -4 * 60), mapTag.getAuthor());\n \t\tassertEquals(\"b5d3b45a96b340441f5abb9080411705c51cc86c\", mapTag.getObjId().toString());\n \t}\n+\t\n+\tpublic void test023_createCommitNonAscii() throws IOException {\n+\t\tfinal ObjectId emptyId = new ObjectWriter(db).writeBlob(new byte[0]);\n+\t\tfinal Tree almostEmptyTree = new Tree(db);\n+\t\talmostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId, \"empty\".getBytes(), false));\n+\t\tfinal ObjectId almostEmptyTreeId = new ObjectWriter(db).writeTree(almostEmptyTree);\n+\t\tCommit commit = new Commit(db);\n+\t\tcommit.setTreeId(almostEmptyTreeId);\n+\t\tcommit.setAuthor(new PersonIdent(\"Joe H\\u00e4cker\",\"joe@example.com\",new Date(1900,0,1), TimeZone.getTimeZone(\"CET\")));\n+\t\tcommit.setCommitter(new PersonIdent(\"Joe Hacker\",\"joe2@example.com\",new Date(1900,0,1), TimeZone.getTimeZone(\"CET\")));\n+\t\tcommit.setEncoding(\"UTF-8\");\n+\t\tcommit.setMessage(\"\\u00dcbergeeks\");\n+\t\tObjectId cid = new ObjectWriter(db).writeCommit(commit);\n+\t\tassertEquals(\"ed63583834b8a627474ee9f9330434ef37a04825\", cid.toString());\n+\t}\n+\n+\tpublic void test024_createCommitNonAscii() throws IOException {\n+\t\tfinal ObjectId emptyId = new ObjectWriter(db).writeBlob(new byte[0]);\n+\t\tfinal Tree almostEmptyTree = new Tree(db);\n+\t\talmostEmptyTree.addEntry(new FileTreeEntry(almostEmptyTree, emptyId, \"empty\".getBytes(), false));\n+\t\tfinal ObjectId almostEmptyTreeId = new ObjectWriter(db).writeTree(almostEmptyTree);\n+\t\tCommit commit = new Commit(db);\n+\t\tcommit.setTreeId(almostEmptyTreeId);\n+\t\tcommit.setAuthor(new PersonIdent(\"Joe H\\u00e4cker\",\"joe@example.com\",new Date(1900,0,1), TimeZone.getTimeZone(\"CET\")));\n+\t\tcommit.setCommitter(new PersonIdent(\"Joe Hacker\",\"joe2@example.com\",new Date(1900,0,1), TimeZone.getTimeZone(\"CET\")));\n+\t\tcommit.setEncoding(\"ISO-8859-1\");\n+\t\tcommit.setMessage(\"\\u00dcbergeeks\");\n+\t\tObjectId cid = new ObjectWriter(db).writeCommit(commit);\n+\t\tassertEquals(\"afc8532038e7220179127b7e96acf534486798ce\", cid.toString());\n+\t}\n }\n"},{"id":"36831","messageId":"20070311181531.18012.59242.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[EGIT PATCH 03/10] Avoid a nullpointerexception on shutdown","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T18:15:32Z","receivedAt":"2007-03-11T18:15:32Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n .../src/org/spearce/egit/ui/GitHistoryPage.java    |    2 ++\n 1 files changed, 2 insertions(+), 0 deletions(-)\n\ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\nindex d1591f0..0e53036 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\n@@ -232,6 +232,8 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,\n \t\t\tILazyTreeContentProvider {\n \n \t\tpublic void inputChanged(Viewer viewer, Object oldInput, Object newInput) {\n+\t\t\tif (newInput == null)\n+\t\t\t\treturn;\n \t\t\tSystem.out.println(\"inputChanged(\" + viewer + \",\" + oldInput + \",\"\n \t\t\t\t\t+ newInput);\n \t\t\tRepositoryProvider provider = RepositoryProvider\n"},{"id":"36833","messageId":"20070311181537.18012.48173.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[EGIT PATCH 04/10] Speed up history by comparing tree hashes.","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T18:15:37Z","receivedAt":"2007-03-11T18:15:37Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Instead of looking up full path name all the time we split the\npath name of the resource we are looking at and compare hashed\nat each level.\n\nThe performance improvement isn't huge since most of the work\nis reading commits.\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n .../egit/core/internal/mapping/GitFileHistory.java |   79 +++++++++++++++--------\n .../src/org/spearce/jgit/lib/ObjectId.java         |    6 ++\n 2 files changed, 58 insertions(+), 27 deletions(-)\n\ndiff --git a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\nindex 163278d..6c40bb0 100644\n--- a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\n+++ b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\n@@ -18,6 +18,7 @@ package org.spearce.egit.core.internal.mapping;\n \n import java.io.IOException;\n import java.util.ArrayList;\n+import java.util.Arrays;\n import java.util.Collection;\n import java.util.Collections;\n import java.util.Date;\n@@ -34,13 +35,14 @@ import org.spearce.egit.core.project.RepositoryMapping;\n import org.spearce.jgit.lib.Commit;\n import org.spearce.jgit.lib.ObjectId;\n import org.spearce.jgit.lib.Repository;\n+import org.spearce.jgit.lib.Tree;\n import org.spearce.jgit.lib.TreeEntry;\n \n public class GitFileHistory extends FileHistory {\n \n \tprivate final IResource resource;\n \n-\tprivate final String relativeResourceName;\n+\tprivate final String[] relativeResourceName;\n \n \tprivate final int flags;\n \n@@ -50,12 +52,11 @@ public class GitFileHistory extends FileHistory {\n \t\tthis.resource = resource;\n \t\tthis.flags = flags;\n \t\tString prefix = getRepositoryMapping().getSubset();\n-\t\tif (prefix != null)\n-\t\t\tprefix = prefix + \"/\";\n-\t\telse\n-\t\t\tprefix = \"\";\n-\t\trelativeResourceName = prefix\n-\t\t\t\t+ resource.getProjectRelativePath().toString();\n+\t\tString[] prefixSegments = prefix!=null ? prefix.split(\"/\") : new String[0];\n+\t\tString[] resourceSegments = resource.getProjectRelativePath().segments(); \n+\t\trelativeResourceName = new String[prefixSegments.length + resourceSegments.length];\n+\t\tSystem.arraycopy(prefixSegments, 0, relativeResourceName, 0, prefixSegments.length);\n+\t\tSystem.arraycopy(resourceSegments, 0, relativeResourceName, prefixSegments.length, resourceSegments.length);\n \t}\n \n \tpublic IFileRevision[] getContributors(IFileRevision revision) {\n@@ -105,7 +106,9 @@ public class GitFileHistory extends FileHistory {\n \t\ttry {\n \t\t\tObjectId id = repository.resolve(\"HEAD\");\n \t\t\tCommit commit = repository.mapCommit(id);\n-\t\t\treturn collectHistory(new ObjectId(ObjectId.toString(null)),\n+\t\t\tObjectId[] initialResourceHash = new ObjectId[relativeResourceName.length];\n+\t\t\tArrays.fill(initialResourceHash, ObjectId.zeroId());\n+\t\t\treturn collectHistory(initialResourceHash, null,\n \t\t\t\t\trepository, commit);\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n@@ -113,29 +116,49 @@ public class GitFileHistory extends FileHistory {\n \t\t}\n \t}\n \n-\tprivate Collection collectHistory(ObjectId lastResourceHash,\n-\t\t\tRepository repository, Commit top) {\n+\tprivate Collection collectHistory(ObjectId[] lastResourceHash, TreeEntry lastEntry,\n+\t\t\tRepository repository, Commit top) throws IOException {\n \t\tif (top == null)\n \t\t\treturn Collections.EMPTY_LIST;\n \t\tCollection ret = new ArrayList(10000);\n \t\tCommit current = top;\n \t\tCommit previous = top;\n+\n \t\tdo {\n-\t\t\tTreeEntry currentEntry;\n-\t\t\ttry {\n-\t\t\t\tcurrentEntry = current.getTree().findMember(\n-\t\t\t\t\t\trelativeResourceName);\n-\t\t\t} catch (IOException e1) {\n-\t\t\t\te1.printStackTrace();\n-\t\t\t\treturn ret;\n+\t\t\tTreeEntry currentEntry = lastEntry;\n+\t\t\tObjectId[] currentResourceHash = new ObjectId[lastResourceHash.length];\n+\t\t\tTree t = current.getTree();\n+\t\t\tfor (int i = 0; i < currentResourceHash.length; ++i) {\n+\t\t\t\tTreeEntry m = t.findMember(relativeResourceName[i]);\n+\t\t\t\tif (m != null) {\n+\t\t\t\t\tObjectId id = m.getId();\n+\t\t\t\t\tcurrentResourceHash[i] = id;\n+\t\t\t\t\tif (id.equals(lastResourceHash[i])) {\n+\t\t\t\t\t\twhile (++i < currentResourceHash.length) {\n+\t\t\t\t\t\t\tcurrentResourceHash[i] = lastResourceHash[i];\n+\t\t\t\t\t\t}\n+\t\t\t\t\t} else {\n+\t\t\t\t\t\tif (m instanceof Tree) {\n+\t\t\t\t\t\t\tt = (Tree)m;\n+\t\t\t\t\t\t} else {\n+\t\t\t\t\t\t\tif (i == currentResourceHash.length - 1) {\n+\t\t\t\t\t\t\t\tcurrentEntry = m;\n+\t\t\t\t\t\t\t} else {\n+\t\t\t\t\t\t\t\tcurrentEntry = null;\n+\t\t\t\t\t\t\t\twhile (++i < currentResourceHash.length) {\n+\t\t\t\t\t\t\t\t\tcurrentResourceHash[i] = ObjectId.zeroId();\n+\t\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t\t}\n+\t\t\t\t\t\t}\n+\t\t\t\t\t}\n+\t\t\t\t} else {\n+\t\t\t\t\tfor (; i < currentResourceHash.length; ++i) {\n+\t\t\t\t\t\tcurrentResourceHash[i] = ObjectId.zeroId();\n+\t\t\t\t\t}\n+\t\t\t\t}\n \t\t\t}\n-\t\t\tObjectId currentResourceHash;\n-\t\t\tif (currentEntry == null)\n-\t\t\t\tcurrentResourceHash = new ObjectId(ObjectId.toString(null));\n-\t\t\telse\n-\t\t\t\tcurrentResourceHash = currentEntry.getId();\n-\n-\t\t\tif (!currentResourceHash.equals(lastResourceHash))\n+\t\t\t\n+\t\t\tif (!currentResourceHash[currentResourceHash.length-1].equals(lastResourceHash[currentResourceHash.length-1]))\n \t\t\t\tret.add(new GitFileRevision(previous, resource));\n \n \t\t\tlastResourceHash = currentResourceHash;\n@@ -150,7 +173,7 @@ public class GitFileHistory extends FileHistory {\n \t\t\t\t\tCommit mergeParent;\n \t\t\t\t\ttry {\n \t\t\t\t\t\tmergeParent = repository.mapCommit(mergeParentId);\n-\t\t\t\t\t\tret.addAll(collectHistory(lastResourceHash, repository,\n+\t\t\t\t\t\tret.addAll(collectHistory(lastResourceHash, currentEntry, repository, \n \t\t\t\t\t\t\t\tmergeParent));\n \t\t\t\t\t\t// TODO: this gets us a lot of duplicates that we need\n \t\t\t\t\t\t// to filter out\n@@ -208,8 +231,10 @@ public class GitFileHistory extends FileHistory {\n \t\t\t\t\treturn;\n \t\t\t\t}\n \t\t\t}\n-\t\t\tTreeEntry currentEntry = current.getTree().findMember(\n-\t\t\t\t\trelativeResourceName);\n+\t\t\tTreeEntry currentEntry = current.getTree();\n+\t\t\tfor (int i=0; i < relativeResourceName.length && currentEntry != null; ++i) {\n+\t\t\t\t((Tree)currentEntry).findMember(relativeResourceName[i]);\n+\t\t\t}\n \t\t\tif (currentEntry != null)\n \t\t\t\trevisions = new IFileRevision[] { new GitFileRevision(current,\n \t\t\t\t\t\tresource) };\ndiff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectId.java b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectId.java\nindex 38fefe2..9e62424 100644\n--- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectId.java\n+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectId.java\n@@ -30,6 +30,10 @@ public class ObjectId implements Comparable {\n \t\tZEROID_STR = ZEROID.toString();\n \t}\n \n+\tpublic static ObjectId zeroId() {\n+\t\treturn ZEROID;\n+\t}\n+\t\n \tpublic static final boolean isId(final String id) {\n \t\tif (id.length() != (2 * Constants.OBJECT_ID_LENGTH)) {\n \t\t\treturn false;\n@@ -80,6 +84,8 @@ public class ObjectId implements Comparable {\n \t}\n \n \tprivate static int compare(final byte[] a, final byte[] b) {\n+\t\tif (a==b)\n+\t\t\treturn 0;\n \t\tfor (int k = 0; k < a.length && k < b.length; k++) {\n \t\t\tfinal int ak = a[k] & 0xff;\n \t\t\tfinal int bk = b[k] & 0xff;\n"},{"id":"36834","messageId":"20070311181542.18012.36508.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[EGIT PATCH 05/10] Cache commits","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T18:15:42Z","receivedAt":"2007-03-11T18:15:42Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"This uses more memory, but by having a WeakMap we allow the\ngarbage collector to claim the memory if needed. This speeds\nup the history panel enormously, so that having the history\npane connected to the selected resource is not a performance\nproblem (except the first time the history of a resource in\na projects is shown).\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n .../src/org/spearce/jgit/lib/Repository.java       |   15 +++++++++++++--\n 1 files changed, 13 insertions(+), 2 deletions(-)\n\ndiff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java b/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java\nindex 781ad90..f7c470d 100644\n--- a/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java\n+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java\n@@ -25,6 +25,8 @@ import java.io.FileWriter;\n import java.io.IOException;\n import java.util.ArrayList;\n import java.util.Collection;\n+import java.util.Map;\n+import java.util.WeakHashMap;\n \n import org.spearce.jgit.errors.IncorrectObjectTypeException;\n import org.spearce.jgit.errors.ObjectWritingException;\n@@ -45,6 +47,8 @@ public class Repository {\n \n \tprivate WindowCache windows;\n \n+\tprivate Map cache = new WeakHashMap(30000); \n+\n \tpublic Repository(final File d) throws IOException {\n \t\tgitDir = d.getAbsoluteFile();\n \t\tobjectsDir = new File(gitDir, \"objects\");\n@@ -185,12 +189,19 @@ public class Repository {\n \t}\n \n \tpublic Commit mapCommit(final ObjectId id) throws IOException {\n+\t\tCommit ret = (Commit)cache.get(id);\n+\t\tif (ret != null)\n+\t\t\treturn ret;\n+\n \t\tfinal ObjectLoader or = openObject(id);\n \t\tif (or == null)\n \t\t\treturn null;\n \t\tfinal byte[] raw = or.getBytes();\n-\t\tif (Constants.TYPE_COMMIT.equals(or.getType()))\n-\t\t\treturn new Commit(this, id, raw);\n+\t\tif (Constants.TYPE_COMMIT.equals(or.getType())) {\n+\t\t\tret = new Commit(this, id, raw);\n+\t\t\tcache.put(id, ret);\n+\t\t\treturn ret;\n+\t\t}\n \t\tthrow new IncorrectObjectTypeException(id, Constants.TYPE_COMMIT);\n \t}\n \n"},{"id":"36836","messageId":"20070311181547.18012.12531.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[EGIT PATCH 06/10] Allow history listing on folders and projects.","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T18:15:48Z","receivedAt":"2007-03-11T18:15:48Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Comparing two commits is disabled on a none-file resource until\nwe implement the structured compare interfaces.\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n org.spearce.egit.core/META-INF/MANIFEST.MF         |    3 ++-\n .../egit/core/internal/mapping/GitFileHistory.java |    2 +-\n org.spearce.egit.ui/plugin.xml                     |   21 ++++++++++++--------\n .../src/org/spearce/egit/ui/GitHistoryPage.java    |    3 +++\n .../org/spearce/egit/ui/GitHistoryPageSource.java  |    5 ++++-\n 5 files changed, 23 insertions(+), 11 deletions(-)\n\ndiff --git a/org.spearce.egit.core/META-INF/MANIFEST.MF b/org.spearce.egit.core/META-INF/MANIFEST.MF\nindex a8349a1..13ec59d 100644\n--- a/org.spearce.egit.core/META-INF/MANIFEST.MF\n+++ b/org.spearce.egit.core/META-INF/MANIFEST.MF\n@@ -11,6 +11,7 @@ Require-Bundle: org.eclipse.core.runtime,\n  org.eclipse.core.resources,\n  org.spearce.jgit,\n  org.eclipse.core.filesystem\n-Export-Package: org.spearce.egit.core.op,\n+Export-Package: org.spearce.egit.core.internal.mapping;x-friends:=\"org.spearce.egit.ui\",\n+ org.spearce.egit.core.op,\n  org.spearce.egit.core.project\n Eclipse-LazyStart: true\ndiff --git a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\nindex 6c40bb0..2e4e4e9 100644\n--- a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\n+++ b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\n@@ -158,7 +158,7 @@ public class GitFileHistory extends FileHistory {\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n-\t\t\tif (!currentResourceHash[currentResourceHash.length-1].equals(lastResourceHash[currentResourceHash.length-1]))\n+\t\t\tif (currentResourceHash.length == 0 || !currentResourceHash[currentResourceHash.length-1].equals(lastResourceHash[currentResourceHash.length-1]))\n \t\t\t\tret.add(new GitFileRevision(previous, resource));\n \n \t\t\tlastResourceHash = currentResourceHash;\ndiff --git a/org.spearce.egit.ui/plugin.xml b/org.spearce.egit.ui/plugin.xml\nindex d373d18..d81a0b6 100644\n--- a/org.spearce.egit.ui/plugin.xml\n+++ b/org.spearce.egit.ui/plugin.xml\n@@ -50,7 +50,19 @@\n                tooltip=\"%TrackAction_tooltip\"\n                menubarPath=\"team.main/group1\"\n                id=\"org.spearce.egit.ui.internal.actions.Track\"/>\n- \t </objectContribution>\n+         <action\n+               class=\"org.spearce.egit.ui.internal.actions.ShowResourceInHistoryAction\"\n+               id=\"org.spearce.egit.ui.internal.actions.ShowResourceInHistoryAction\"\n+               label=\"%ShowResourceInHistoryAction_label\"\n+               menubarPath=\"team.main/group1\"\n+               tooltip=\"%ShowResourceInHistoryAction_tooltip\"/>\n+\t\t<action\n+\t\t       class=\"org.spearce.egit.ui.internal.actions.GitCompareRevisionAction\"\n+        \t   id=\"org.spearce.egit.ui.internal.actions.GitCompareAction\"\n+               menubarPath=\"team.main/group1\"\n+        \t   label=\"Structured Git Compare\">\n+\t\t</action>\n+ \t  </objectContribution>\n       <objectContribution\n             objectClass=\"org.eclipse.core.resources.IFile\"\n             adaptable=\"true\"\n@@ -68,13 +80,6 @@\n                overrideActionId=\"org.eclipse.team.ui.compareLocalHistory\"\n                tooltip=\"%CompareWithRevisionAction_tooltip\">\n          </action>\n-         <action\n-               class=\"org.spearce.egit.ui.internal.actions.ShowResourceInHistoryAction\"\n-               enablesFor=\"1\"\n-               id=\"org.spearce.egit.ui.internal.actions.ShowResourceInHistoryAction\"\n-               label=\"%ShowResourceInHistoryAction_label\"\n-               menubarPath=\"team.main/group1\"\n-               tooltip=\"%ShowResourceInHistoryAction_tooltip\"/>\n       </objectContribution>\n    </extension>\n \ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\nindex 0e53036..cd31f18 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\n@@ -62,6 +62,7 @@ import org.eclipse.team.internal.ui.history.DialogHistoryPageSite;\n import org.eclipse.team.ui.history.HistoryPage;\n import org.eclipse.team.ui.history.IHistoryCompareAdapter;\n import org.eclipse.team.ui.history.IHistoryPageSite;\n+import org.spearce.egit.core.internal.mapping.GitFileRevision;\n \n public class GitHistoryPage extends HistoryPage implements IAdaptable,\n \t\tIHistoryCompareAdapter {\n@@ -115,6 +116,8 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,\n \t\t\t\tcompareAction.setCurrentFileRevision(fileRevisions[0]);\n \t\t\t\tcompareAction.selectionChanged(new StructuredSelection(\n \t\t\t\t\t\tselection2));\n+\t\t\t\t\n+\t\t\t\tcompareAction.setEnabled(selection!=null && selection[0]!=null  && ((GitFileRevision)fileRevisions[0]).getResource().getType() == IResource.FILE);\n \t\t\t}\n \t\t});\n \t\tcompareAction.setPage(this);\ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPageSource.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPageSource.java\nindex 03c1896..2d56063 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPageSource.java\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPageSource.java\n@@ -27,7 +27,10 @@ public class GitHistoryPageSource extends HistoryPageSource {\n \t}\n \n \tpublic boolean canShowHistoryFor(Object object) {\n-\t\treturn (object instanceof IResource && ((IResource) object).getType() == IResource.FILE);\n+\t\treturn (object instanceof IResource \n+\t\t\t\t&& (((IResource) object).getType() == IResource.FILE\n+\t\t\t\t\t\t|| ((IResource) object).getType() == IResource.FOLDER\n+\t\t\t\t\t\t|| ((IResource) object).getType() == IResource.PROJECT));\n \t}\n \n }\n"},{"id":"36835","messageId":"20070311181553.18012.62004.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[EGIT PATCH 07/10] Return nothing if no version exists for a commit.","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T18:15:53Z","receivedAt":"2007-03-11T18:15:53Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"I used a null reference to mean two things, which meant the\nworking directory version was retrieved for comparing files\nwhen a commit did not include a named blob.\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n .../src/org/spearce/egit/core/GitStorage.java      |   17 ++++++++++++-----\n 1 files changed, 12 insertions(+), 5 deletions(-)\n\ndiff --git a/org.spearce.egit.core/src/org/spearce/egit/core/GitStorage.java b/org.spearce.egit.core/src/org/spearce/egit/core/GitStorage.java\nindex e53fd83..ce4ff71 100644\n--- a/org.spearce.egit.core/src/org/spearce/egit/core/GitStorage.java\n+++ b/org.spearce.egit.core/src/org/spearce/egit/core/GitStorage.java\n@@ -41,7 +41,10 @@ public class GitStorage implements IStorage {\n \n \tprivate TreeEntry entry;\n \n+\tprivate ObjectId treeId;\n+\n \tpublic GitStorage(ObjectId treeId, IResource resource) {\n+\t\tthis.treeId = treeId;\n \t\tthis.resource = resource;\n \t\tif (treeId == null)\n \t\t\treturn;\n@@ -68,13 +71,17 @@ public class GitStorage implements IStorage {\n \n \tpublic InputStream getContents() throws CoreException {\n \t\ttry {\n-\t\t\tif (entry == null) {\n+\t\t\tif (treeId == null) {\n \t\t\t\treturn ((IFile) resource).getContents();\n \t\t\t} else {\n-\t\t\t\tObjectId id = entry.getId();\n-\t\t\t\tObjectLoader reader = entry.getRepository().openBlob(id);\n-\t\t\t\tbyte[] bytes = reader.getBytes();\n-\t\t\t\treturn new ByteArrayInputStream(bytes);\n+\t\t\t\tif (entry == null)\n+\t\t\t\t\treturn new ByteArrayInputStream(new byte[0]);\n+\t\t\t\telse {\n+\t\t\t\t\tObjectId id = entry.getId();\n+\t\t\t\t\tObjectLoader reader = entry.getRepository().openBlob(id);\n+\t\t\t\t\tbyte[] bytes = reader.getBytes();\n+\t\t\t\t\treturn new ByteArrayInputStream(bytes);\n+\t\t\t\t}\n \t\t\t}\n \t\t} catch (FileNotFoundException e) {\n \t\t\tthrow new ResourceException(IResourceStatus.FAILED_READ_LOCAL,\n"},{"id":"36838","messageId":"20070311181558.18012.48529.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[EGIT PATCH 08/10] Show only commits that represent changes in the history view","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T18:15:58Z","receivedAt":"2007-03-11T18:15:58Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"The reason other commits were there originally was that it was useful\nfor debugging to see the last and first commit. I think that is no \nlonger the case.\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n .../egit/core/GitWorkspaceFileRevision.java        |    2 -\n .../egit/core/internal/mapping/GitFileHistory.java |   70 +++++++++++++++++++++--\n .../src/org/spearce/egit/ui/GitHistoryPage.java    |    7 ++\n 3 files changed, 69 insertions(+), 10 deletions(-)\n\ndiff --git a/org.spearce.egit.core/src/org/spearce/egit/core/GitWorkspaceFileRevision.java b/org.spearce.egit.core/src/org/spearce/egit/core/GitWorkspaceFileRevision.java\nindex 5c3b820..82047c7 100644\n--- a/org.spearce.egit.core/src/org/spearce/egit/core/GitWorkspaceFileRevision.java\n+++ b/org.spearce.egit.core/src/org/spearce/egit/core/GitWorkspaceFileRevision.java\n@@ -62,6 +62,6 @@ public class GitWorkspaceFileRevision extends GitFileRevision implements\n \t}\n \n \tpublic String getContentIdentifier() {\n-\t\treturn null;\n+\t\treturn \"Workspace\";\n \t}\n }\ndiff --git a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\nindex 2e4e4e9..6c114e9 100644\n--- a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\n+++ b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\n@@ -16,7 +16,9 @@\n  */\n package org.spearce.egit.core.internal.mapping;\n \n+import java.io.BufferedInputStream;\n import java.io.IOException;\n+import java.io.InputStream;\n import java.util.ArrayList;\n import java.util.Arrays;\n import java.util.Collection;\n@@ -25,12 +27,14 @@ import java.util.Date;\n import java.util.List;\n \n import org.eclipse.core.resources.IResource;\n+import org.eclipse.core.runtime.CoreException;\n import org.eclipse.team.core.RepositoryProvider;\n import org.eclipse.team.core.history.IFileHistoryProvider;\n import org.eclipse.team.core.history.IFileRevision;\n import org.eclipse.team.core.history.provider.FileHistory;\n import org.spearce.egit.core.GitProvider;\n import org.spearce.egit.core.GitWorkspaceFileRevision;\n+import org.spearce.egit.core.project.GitProjectData;\n import org.spearce.egit.core.project.RepositoryMapping;\n import org.spearce.jgit.lib.Commit;\n import org.spearce.jgit.lib.ObjectId;\n@@ -95,10 +99,14 @@ public class GitFileHistory extends FileHistory {\n \t\treturn getRepositoryMapping().getRepository();\n \t}\n \n-\tprivate RepositoryMapping getRepositoryMapping() {\n+\tprivate GitProjectData getData() {\n \t\tGitProvider provider = (GitProvider) RepositoryProvider\n \t\t\t\t.getProvider(resource.getProject());\n-\t\treturn provider.getData().getRepositoryMapping(resource.getProject());\n+\t\treturn provider.getData();\n+\t}\n+\n+\tprivate RepositoryMapping getRepositoryMapping() {\n+\t\treturn getData().getRepositoryMapping(resource.getProject());\n \t}\n \n \tprivate Collection collectHistory() {\n@@ -108,6 +116,15 @@ public class GitFileHistory extends FileHistory {\n \t\t\tCommit commit = repository.mapCommit(id);\n \t\t\tObjectId[] initialResourceHash = new ObjectId[relativeResourceName.length];\n \t\t\tArrays.fill(initialResourceHash, ObjectId.zeroId());\n+\t\t\tTreeEntry[] activeDiffTreeEntries = null;\n+\t\t\ttry {\n+\t\t\t\tactiveDiffTreeEntries = getData().getActiveDiffTreeEntries(resource);\n+\t\t\t} catch (CoreException e1) {\n+\t\t\t\t// TODO: eclipse excetion logging\n+\t\t\t\te1.printStackTrace();\n+\t\t\t}\n+\t\t\tif (activeDiffTreeEntries!=null)\n+\t\t\t\tinitialResourceHash[initialResourceHash.length-1] = activeDiffTreeEntries[0].getId();\n \t\t\treturn collectHistory(initialResourceHash, null,\n \t\t\t\t\trepository, commit);\n \t\t} catch (IOException e) {\n@@ -195,7 +212,6 @@ public class GitFileHistory extends FileHistory {\n \t\t\t\tcurrent = null;\n \n \t\t} while (current != null);\n-\t\tret.add(new GitFileRevision(previous, resource));\n \n \t\treturn ret;\n \t}\n@@ -251,13 +267,39 @@ public class GitFileHistory extends FileHistory {\n \t\tRepositoryProvider provider = RepositoryProvider.getProvider(resource\n \t\t\t\t.getProject());\n \t\tif (provider instanceof GitProvider) {\n-\n-\t\t\tList ret = new ArrayList();\n-\t\t\tret.add(new GitWorkspaceFileRevision(resource));\n+\t\t\tGitWorkspaceFileRevision wsrevision = new GitWorkspaceFileRevision(resource);\n \n \t\t\tlong time0 = new Date().getTime();\n \t\t\tSystem.out.println(\"getting file history\");\n-\t\t\tret.addAll(collectHistory());\n+\t\t\tList ret = new ArrayList();\n+\t\t\tCollection githistory = collectHistory();\n+\t\t\tif (githistory.size() >0) {\n+\t\t\t\tif (resource.getType()==IResource.FILE) {\n+\t\t\t\t\t// TODO: consider index in future versions\n+\t\t\t\t\ttry {\n+\t\t\t\t\t\tInputStream wsContents = new BufferedInputStream(wsrevision.getStorage(null).getContents());\n+\t\t\t\t\t\tInputStream headContents = ((IFileRevision)githistory.toArray()[0]).getStorage(null).getContents();\n+\t\t\t\t\t\tif (!streamsEqual(wsContents,headContents)) {\n+\t\t\t\t\t\t\tret.add(wsrevision);\n+\t\t\t\t\t\t\tret.addAll(githistory);\n+\t\t\t\t\t\t} else {\n+\t\t\t\t\t\t\tret.addAll(githistory);\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\twsContents.close();\n+\t\t\t\t\t\theadContents.close();\n+\t\t\t\t\t} catch (IOException e) {\n+\t\t\t\t\t\t// TODO: Eclipse error handling\n+\t\t\t\t\t\te.printStackTrace();\n+\t\t\t\t\t} catch (CoreException e) {\n+\t\t\t\t\t\t// TODO: Eclipse error handling\n+\t\t\t\t\t\te.printStackTrace();\n+\t\t\t\t\t}\n+\t\t\t\t} else {\n+\t\t\t\t\tret.addAll(githistory);\n+\t\t\t\t}\n+\t\t\t} else {\n+\t\t\t\tret.add(wsrevision);\n+\t\t\t}\n \t\t\tlong time1 = new Date().getTime();\n \t\t\tSystem.out.println(\"got file history in \" + (time1 - time0)\n \t\t\t\t\t/ 1000.0 + \"s\");\n@@ -270,6 +312,20 @@ public class GitFileHistory extends FileHistory {\n \t\t}\n \t}\n \n+\tprivate boolean streamsEqual(InputStream s1, InputStream s2) {\n+\t\t// Speed up...\n+\t\ttry {\n+\t\t\tint c1,c2;\n+\t\t\twhile ((c1=s1.read()) == (c2=s2.read()) && c1!=-1)\n+\t\t\t\t;\n+\t\t\treturn c1 == -1 && c2==-1;\n+\t\t} catch (IOException e) {\n+\t\t\t// TODO: eclipse error handling\n+\t\t\te.printStackTrace();\n+\t\t\treturn false;\n+\t\t}\n+\t}\n+\n \tpublic IFileRevision[] getTargets(IFileRevision revision) {\n \t\tGitFileRevision grevision = (GitFileRevision) revision;\n \t\tObjectId targetCommitId = grevision.getCommit().getCommitId();\ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\nindex cd31f18..77073f2 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\n@@ -156,7 +156,10 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,\n \t\t\tif (columnIndex == 0) {\n \t\t\t\tString id = ((IFileRevision) element).getContentIdentifier();\n \t\t\t\tif (id != null)\n-\t\t\t\t\treturn id.substring(0, 7) + \"..\";\n+\t\t\t\t\tif (id.length() > 9) // make sure \"Workspace\" is spelled out\n+\t\t\t\t\t\treturn id.substring(0, 7) + \"..\";\n+\t\t\t\t\telse\n+\t\t\t\t\t\treturn id;\n \t\t\t\telse\n \t\t\t\t\treturn id;\n \t\t\t}\n@@ -211,7 +214,7 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,\n \t\t\t\t\t\tif (text != null)\n \t\t\t\t\t\t\titem.setText(i, text);\n \t\t\t\t\t\telse\n-\t\t\t\t\t\t\titem.setText(\"\");\n+\t\t\t\t\t\t\titem.setText(i, \"\");\n \t\t\t\t\t}\n \t\t\t\t\titem.setData(fileRevisions[event.index]);\n \t\t\t\t}\n"},{"id":"36837","messageId":"20070311181603.18012.78635.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[EGIT PATCH 09/10] Hash ObjectId faster.","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T18:16:03Z","receivedAt":"2007-03-11T18:16:03Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"ObjectId's are well distributed so we can grab the first four bytes\nas the hash code. The assumption makes hashing faster.\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n .../src/org/spearce/jgit/lib/ObjectId.java         |   13 +++++++------\n 1 files changed, 7 insertions(+), 6 deletions(-)\n\ndiff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectId.java b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectId.java\nindex 9e62424..45e23e6 100644\n--- a/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectId.java\n+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/ObjectId.java\n@@ -163,12 +163,13 @@ public class ObjectId implements Comparable {\n \t}\n \n \tpublic int hashCode() {\n-\t\tint r = 0;\n-\t\tfor (int k = id.length - 1; k >= 0; k--) {\n-\t\t\tr *= 31;\n-\t\t\tr += id[k];\n-\t\t}\n-\t\treturn r;\n+\t\t// Object Id' are well distributed so grab the first four bytes\n+\t\tint b0 = id[0] & 0xff;\n+\t\tint b1 = id[1] & 0xff;\n+\t\tint b2 = id[2] & 0xff;\n+\t\tint b3 = id[3] & 0xff;\n+\t\tint h = (b0 << 24) | (b1 << 16) | (b2 << 8) | b3;\n+\t\treturn h;\n \t}\n \n \tpublic boolean equals(final ObjectId o) {\n"},{"id":"36839","messageId":"20070311181608.18012.60291.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[EGIT PATCH 10/10] Display distance to head in history page","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T18:16:09Z","receivedAt":"2007-03-11T18:16:09Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"This makes it more apparent that the list is filtered and\nwhen changes occurred.\n\nSigned-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n .../egit/core/GitWorkspaceFileRevision.java        |    2 -\n .../egit/core/internal/mapping/GitFileHistory.java |   19 +++---\n .../core/internal/mapping/GitFileRevision.java     |    9 ++-\n .../src/org/spearce/egit/ui/GitHistoryPage.java    |   74 +++++++++++++++--------\n 4 files changed, 68 insertions(+), 36 deletions(-)\n\ndiff --git a/org.spearce.egit.core/src/org/spearce/egit/core/GitWorkspaceFileRevision.java b/org.spearce.egit.core/src/org/spearce/egit/core/GitWorkspaceFileRevision.java\nindex 82047c7..9aa3593 100644\n--- a/org.spearce.egit.core/src/org/spearce/egit/core/GitWorkspaceFileRevision.java\n+++ b/org.spearce.egit.core/src/org/spearce/egit/core/GitWorkspaceFileRevision.java\n@@ -28,7 +28,7 @@ public class GitWorkspaceFileRevision extends GitFileRevision implements\n \tprivate final IResource resource;\n \n \tpublic GitWorkspaceFileRevision(IResource resource) {\n-\t\tsuper(null, resource);\n+\t\tsuper(null, resource, -1);\n \t\tthis.resource = resource;\n \t}\n \ndiff --git a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\nindex 6c114e9..78a2e68 100644\n--- a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\n+++ b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileHistory.java\n@@ -72,7 +72,7 @@ public class GitFileHistory extends FileHistory {\n \t\t\ttry {\n \t\t\t\tret[i] = new GitFileRevision(repository\n \t\t\t\t\t\t.mapCommit((ObjectId) parents.get(i)), grevision\n-\t\t\t\t\t\t.getResource());\n+\t\t\t\t.getResource(), -1);\n \t\t\t} catch (IOException e) {\n \t\t\t\te.printStackTrace();\n \t\t\t\treturn null;\n@@ -87,7 +87,7 @@ public class GitFileHistory extends FileHistory {\n \t\t} else {\n \t\t\ttry {\n \t\t\t\tRepository repository = getRepository();\n-\t\t\t\treturn new GitFileRevision(repository.mapCommit(id), resource);\n+\t\t\t\treturn new GitFileRevision(repository.mapCommit(id), resource, 0);\n \t\t\t} catch (IOException e) {\n \t\t\t\te.printStackTrace();\n \t\t\t\treturn null;\n@@ -125,7 +125,7 @@ public class GitFileHistory extends FileHistory {\n \t\t\t}\n \t\t\tif (activeDiffTreeEntries!=null)\n \t\t\t\tinitialResourceHash[initialResourceHash.length-1] = activeDiffTreeEntries[0].getId();\n-\t\t\treturn collectHistory(initialResourceHash, null,\n+\t\t\treturn collectHistory(0, initialResourceHash, null,\n \t\t\t\t\trepository, commit);\n \t\t} catch (IOException e) {\n \t\t\te.printStackTrace();\n@@ -133,7 +133,7 @@ public class GitFileHistory extends FileHistory {\n \t\t}\n \t}\n \n-\tprivate Collection collectHistory(ObjectId[] lastResourceHash, TreeEntry lastEntry,\n+\tprivate Collection collectHistory(int count, ObjectId[] lastResourceHash, TreeEntry lastEntry,\n \t\t\tRepository repository, Commit top) throws IOException {\n \t\tif (top == null)\n \t\t\treturn Collections.EMPTY_LIST;\n@@ -176,7 +176,7 @@ public class GitFileHistory extends FileHistory {\n \t\t\t}\n \t\t\t\n \t\t\tif (currentResourceHash.length == 0 || !currentResourceHash[currentResourceHash.length-1].equals(lastResourceHash[currentResourceHash.length-1]))\n-\t\t\t\tret.add(new GitFileRevision(previous, resource));\n+\t\t\t\tret.add(new GitFileRevision(previous, resource, count));\n \n \t\t\tlastResourceHash = currentResourceHash;\n \t\t\tprevious = current;\n@@ -190,7 +190,7 @@ public class GitFileHistory extends FileHistory {\n \t\t\t\t\tCommit mergeParent;\n \t\t\t\t\ttry {\n \t\t\t\t\t\tmergeParent = repository.mapCommit(mergeParentId);\n-\t\t\t\t\t\tret.addAll(collectHistory(lastResourceHash, currentEntry, repository, \n+\t\t\t\t\t\tret.addAll(collectHistory(0, lastResourceHash, currentEntry, repository, \n \t\t\t\t\t\t\t\tmergeParent));\n \t\t\t\t\t\t// TODO: this gets us a lot of duplicates that we need\n \t\t\t\t\t\t// to filter out\n@@ -210,7 +210,8 @@ public class GitFileHistory extends FileHistory {\n \t\t\t\t}\n \t\t\t} else\n \t\t\t\tcurrent = null;\n-\n+\t\t\tif (count>=0)\n+\t\t\t\tcount++;\n \t\t} while (current != null);\n \n \t\treturn ret;\n@@ -252,8 +253,8 @@ public class GitFileHistory extends FileHistory {\n \t\t\t\t((Tree)currentEntry).findMember(relativeResourceName[i]);\n \t\t\t}\n \t\t\tif (currentEntry != null)\n-\t\t\t\trevisions = new IFileRevision[] { new GitFileRevision(current,\n-\t\t\t\t\t\tresource) };\n+\t\t\t\trevisions = new IFileRevision[] { new GitFileRevision(current, resource,\n+\t\t\t\t\t\t-1) };\n \t\t\telse\n \t\t\t\trevisions = new IFileRevision[0];\n \ndiff --git a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileRevision.java b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileRevision.java\nindex 31e2191..ad15cc0 100644\n--- a/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileRevision.java\n+++ b/org.spearce.egit.core/src/org/spearce/egit/core/internal/mapping/GitFileRevision.java\n@@ -44,7 +44,10 @@ public class GitFileRevision extends FileRevision {\n \n \tprivate final Commit commit;\n \n-\tpublic GitFileRevision(Commit commit, IResource resource) {\n+\tprivate final int count;\n+\n+\tpublic GitFileRevision(Commit commit, IResource resource, int count) {\n+\t\tthis.count = count;\n \t\tthis.commit = commit;\n \t\tthis.resource = resource;\n \t}\n@@ -129,4 +132,8 @@ public class GitFileRevision extends FileRevision {\n \tpublic IResource getResource() {\n \t\treturn resource;\n \t}\n+\n+\tpublic int getCount() {\n+\t\treturn count;\n+\t}\n }\ndiff --git a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\nindex 77073f2..54635f5 100644\n--- a/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\n+++ b/org.spearce.egit.ui/src/org/spearce/egit/ui/GitHistoryPage.java\n@@ -154,6 +154,19 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,\n \n \t\tpublic String getColumnText(Object element, int columnIndex) {\n \t\t\tif (columnIndex == 0) {\n+\t\t\t\tint count = ((GitFileRevision) element).getCount();\n+\t\t\t\tif (count < 0)\n+\t\t\t\t\treturn \"\";\n+\t\t\t\telse\n+\t\t\t\t\tif (count == 0)\n+\t\t\t\t\t\treturn \"HEAD\";\n+\t\t\t\t\telse\n+\t\t\t\t\t\treturn \"HEAD~\"+count;\n+\t\t\t}\n+\t\t\t\n+\t\t\tif (columnIndex == 1) {\n+\t\t\t\tString rss = ((IFileRevision) element).getURI().toString();\n+\t\t\t\tString rs = rss.substring(rss.length()-10);\n \t\t\t\tString id = ((IFileRevision) element).getContentIdentifier();\n \t\t\t\tif (id != null)\n \t\t\t\t\tif (id.length() > 9) // make sure \"Workspace\" is spelled out\n@@ -161,20 +174,20 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,\n \t\t\t\t\telse\n \t\t\t\t\t\treturn id;\n \t\t\t\telse\n-\t\t\t\t\treturn id;\n+\t\t\t\t\treturn id + \"@..\" + rs;\n \t\t\t}\n \n-\t\t\tif (columnIndex == 1)\n+\t\t\tif (columnIndex == 2)\n \t\t\t\treturn \"\"; // TAGS\n \n-\t\t\tif (columnIndex == 2)\n+\t\t\tif (columnIndex == 3)\n \t\t\t\treturn new Date(((IFileRevision) element).getTimestamp())\n \t\t\t\t\t\t.toString();\n \n-\t\t\tif (columnIndex == 3)\n+\t\t\tif (columnIndex == 4)\n \t\t\t\treturn ((IFileRevision) element).getAuthor();\n \n-\t\t\tif (columnIndex == 4) {\n+\t\t\tif (columnIndex == 5) {\n \t\t\t\tString comment = ((IFileRevision) element).getComment();\n \t\t\t\tif (comment == null)\n \t\t\t\t\treturn null;\n@@ -186,8 +199,7 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,\n \t\t\t}\n \t\t\treturn Integer.toString(columnIndex);\n \t\t}\n-\n-\t}\n+\t};\n \n \tprivate void createTree(Composite composite) {\n \t\ttree = new Tree(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.MULTI\n@@ -200,23 +212,27 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,\n \t\ttree.setData(\"HEAD\");\n \t\ttree.addListener(SWT.SetData, new Listener() {\n \t\t\tpublic void handleEvent(Event event) {\n-\t\t\t\tTreeItem item = (TreeItem) event.item;\n-\t\t\t\tTree parent = item.getParent();\n-\t\t\t\tif (parent == null) {\n-\t\t\t\t\titem.setText(new String[] { \"hej\", \"san\" });\n-\t\t\t\t\titem.setData(\"\");\n-\t\t\t\t} else {\n-\t\t\t\t\tITableLabelProvider p = (ITableLabelProvider) viewer\n-\t\t\t\t\t\t\t.getLabelProvider();\n-\t\t\t\t\tfor (int i = 0; i < 5; ++i) {\n-\t\t\t\t\t\tString text = p.getColumnText(\n-\t\t\t\t\t\t\t\tfileRevisions[event.index], i);\n-\t\t\t\t\t\tif (text != null)\n-\t\t\t\t\t\t\titem.setText(i, text);\n-\t\t\t\t\t\telse\n-\t\t\t\t\t\t\titem.setText(i, \"\");\n+\t\t\t\ttry {\n+\t\t\t\t\tTreeItem item = (TreeItem) event.item;\n+\t\t\t\t\tTree parent = item.getParent();\n+\t\t\t\t\tif (parent == null) {\n+\t\t\t\t\t\titem.setText(new String[] { \"hej\", \"san\" });\n+\t\t\t\t\t\titem.setData(\"\");\n+\t\t\t\t\t} else {\n+\t\t\t\t\t\tITableLabelProvider p = (ITableLabelProvider) viewer\n+\t\t\t\t\t\t\t\t.getLabelProvider();\n+\t\t\t\t\t\tfor (int i = 0; i < 6; ++i) {\n+\t\t\t\t\t\t\tString text = p.getColumnText(\n+\t\t\t\t\t\t\t\t\tfileRevisions[event.index], i);\n+\t\t\t\t\t\t\tif (text != null)\n+\t\t\t\t\t\t\t\titem.setText(i, text);\n+\t\t\t\t\t\t\telse\n+\t\t\t\t\t\t\t\titem.setText(i, \"\");\n+\t\t\t\t\t\t}\n+\t\t\t\t\t\titem.setData(fileRevisions[event.index]);\n \t\t\t\t\t}\n-\t\t\t\t\titem.setData(fileRevisions[event.index]);\n+\t\t\t\t} catch (Throwable b) {\n+\t\t\t\t\tb.printStackTrace();\n \t\t\t\t}\n \t\t\t}\n \t\t});\n@@ -294,12 +310,20 @@ public class GitHistoryPage extends HistoryPage implements IAdaptable,\n \n \tprivate void createColumns() {\n \t\t// X SelectionListener headerListener = getColumnListener(viewer);\n-\t\t// revision\n+\t\t// count from head\n \t\tTreeColumn col = new TreeColumn(tree, SWT.NONE);\n \t\tcol.setResizable(true);\n+\t\tcol.setText(\"^\");\n+\t\t// X col.addSelectionListener(headerListener);\n+\t\t((TableLayout) tree.getLayout()).addColumnData(new ColumnWeightData(10,\n+\t\t\t\ttrue));\n+\n+\t\t// revision\n+\t\tcol = new TreeColumn(tree, SWT.NONE);\n+\t\tcol.setResizable(true);\n \t\tcol.setText(TeamUIMessages.GenericHistoryTableProvider_Revision);\n \t\t// X col.addSelectionListener(headerListener);\n-\t\t((TableLayout) tree.getLayout()).addColumnData(new ColumnWeightData(20,\n+\t\t((TableLayout) tree.getLayout()).addColumnData(new ColumnWeightData(10,\n \t\t\t\ttrue));\n \n \t\t// tags\n"},{"id":"36845","messageId":"20070311201130.23044.34651.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[PATCH 0/2] Series short description","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T20:11:33Z","receivedAt":"2007-03-11T20:11:33Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"The following series implements...\n\n-- \nSignature\n"},{"id":"36846","messageId":"20070311201142.23073.84739.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[PATCH 1/2] Tag version 0.2.1","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T20:11:42Z","receivedAt":"2007-03-11T20:11:42Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n org.spearce.egit.core/META-INF/MANIFEST.MF |    2 +-\n org.spearce.egit.ui/META-INF/MANIFEST.MF   |    2 +-\n org.spearce.jgit/META-INF/MANIFEST.MF      |    2 +-\n 3 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/org.spearce.egit.core/META-INF/MANIFEST.MF b/org.spearce.egit.core/META-INF/MANIFEST.MF\nindex 13ec59d..fd90a0c 100644\n--- a/org.spearce.egit.core/META-INF/MANIFEST.MF\n+++ b/org.spearce.egit.core/META-INF/MANIFEST.MF\n@@ -2,7 +2,7 @@ Manifest-Version: 1.0\n Bundle-ManifestVersion: 2\n Bundle-Name: %plugin_name\n Bundle-SymbolicName: org.spearce.egit.core; singleton:=true\n-Bundle-Version: 0.2.0.qualifier\n+Bundle-Version: 0.2.1\n Bundle-Activator: org.spearce.egit.core.Activator\n Bundle-Vendor: %provider_name\n Bundle-Localization: plugin\ndiff --git a/org.spearce.egit.ui/META-INF/MANIFEST.MF b/org.spearce.egit.ui/META-INF/MANIFEST.MF\nindex 63dcec8..8075883 100644\n--- a/org.spearce.egit.ui/META-INF/MANIFEST.MF\n+++ b/org.spearce.egit.ui/META-INF/MANIFEST.MF\n@@ -2,7 +2,7 @@ Manifest-Version: 1.0\n Bundle-ManifestVersion: 2\n Bundle-Name: %plugin_name\n Bundle-SymbolicName: org.spearce.egit.ui; singleton:=true\n-Bundle-Version: 0.2.0.qualifier\n+Bundle-Version: 0.2.1\n Bundle-Activator: org.spearce.egit.ui.Activator\n Bundle-Vendor: %plugin_provider\n Bundle-Localization: plugin\ndiff --git a/org.spearce.jgit/META-INF/MANIFEST.MF b/org.spearce.jgit/META-INF/MANIFEST.MF\nindex 1485bb9..9bbddb3 100644\n--- a/org.spearce.jgit/META-INF/MANIFEST.MF\n+++ b/org.spearce.jgit/META-INF/MANIFEST.MF\n@@ -2,7 +2,7 @@ Manifest-Version: 1.0\n Bundle-ManifestVersion: 2\n Bundle-Name: %plugin_name\n Bundle-SymbolicName: org.spearce.jgit\n-Bundle-Version: 0.2.0.qualifier\n+Bundle-Version: 0.2.1\n Bundle-Localization: plugin\n Bundle-Vendor: %provider_name\n Export-Package: org.spearce.jgit.errors,\n"},{"id":"36847","messageId":"20070311201150.23073.38604.stgit@lathund.dewire.com","threadId":"7197","inReplyTo":"20070311180608.18012.13767.stgit@lathund.dewire.com","subject":"[PATCH 2/2] Re-add qualfiier for development version","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T20:11:50Z","receivedAt":"2007-03-11T20:11:50Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>\n---\n\n org.spearce.egit.core/META-INF/MANIFEST.MF |    2 +-\n org.spearce.egit.ui/META-INF/MANIFEST.MF   |    2 +-\n org.spearce.jgit/META-INF/MANIFEST.MF      |    2 +-\n 3 files changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/org.spearce.egit.core/META-INF/MANIFEST.MF b/org.spearce.egit.core/META-INF/MANIFEST.MF\nindex fd90a0c..f4c96cc 100644\n--- a/org.spearce.egit.core/META-INF/MANIFEST.MF\n+++ b/org.spearce.egit.core/META-INF/MANIFEST.MF\n@@ -2,7 +2,7 @@ Manifest-Version: 1.0\n Bundle-ManifestVersion: 2\n Bundle-Name: %plugin_name\n Bundle-SymbolicName: org.spearce.egit.core; singleton:=true\n-Bundle-Version: 0.2.1\n+Bundle-Version: 0.2.1.qualifier\n Bundle-Activator: org.spearce.egit.core.Activator\n Bundle-Vendor: %provider_name\n Bundle-Localization: plugin\ndiff --git a/org.spearce.egit.ui/META-INF/MANIFEST.MF b/org.spearce.egit.ui/META-INF/MANIFEST.MF\nindex 8075883..18b7e87 100644\n--- a/org.spearce.egit.ui/META-INF/MANIFEST.MF\n+++ b/org.spearce.egit.ui/META-INF/MANIFEST.MF\n@@ -2,7 +2,7 @@ Manifest-Version: 1.0\n Bundle-ManifestVersion: 2\n Bundle-Name: %plugin_name\n Bundle-SymbolicName: org.spearce.egit.ui; singleton:=true\n-Bundle-Version: 0.2.1\n+Bundle-Version: 0.2.1.qualifier\n Bundle-Activator: org.spearce.egit.ui.Activator\n Bundle-Vendor: %plugin_provider\n Bundle-Localization: plugin\ndiff --git a/org.spearce.jgit/META-INF/MANIFEST.MF b/org.spearce.jgit/META-INF/MANIFEST.MF\nindex 9bbddb3..f671eb9 100644\n--- a/org.spearce.jgit/META-INF/MANIFEST.MF\n+++ b/org.spearce.jgit/META-INF/MANIFEST.MF\n@@ -2,7 +2,7 @@ Manifest-Version: 1.0\n Bundle-ManifestVersion: 2\n Bundle-Name: %plugin_name\n Bundle-SymbolicName: org.spearce.jgit\n-Bundle-Version: 0.2.1\n+Bundle-Version: 0.2.1.qualifier\n Bundle-Localization: plugin\n Bundle-Vendor: %provider_name\n Export-Package: org.spearce.jgit.errors,\n"},{"id":"36852","messageId":"20070311201956.GB12457@spearce.org","threadId":"7197","inReplyTo":"20070311201130.23044.34651.stgit@lathund.dewire.com","subject":"Re: [PATCH 0/2] Series short description","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-03-11T20:19:56Z","receivedAt":"2007-03-11T20:19:56Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Robin Rosenberg <robin.rosenberg@dewire.com> wrote:\n> The following series implements...\n\nExciting new features?  ;-)\n \n-- \nShawn.\n"},{"id":"36858","messageId":"200703112145.13179.robin.rosenberg@dewire.com","threadId":"7197","inReplyTo":"20070311201956.GB12457@spearce.org","subject":"Re: [PATCH 0/2] Series short description","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg@dewire.com","sentAt":"2007-03-11T20:45:12Z","receivedAt":"2007-03-11T20:45:12Z","isPatch":true,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"söndag 11 mars 2007 21:19 skrev Shawn O. Pearce:\n> Robin Rosenberg <robin.rosenberg@dewire.com> wrote:\n> > The following series implements...\n> \n> Exciting new features?  ;-)\n\nIndeed.  I thought it'd be better if you read the patch rather\nthan a misleading subject. :)\n\nActually, I exited vi with :q! and stacked git didn't realize this. :( \n\n-- robin\n"}]}