Commit Graph

375 Commits

Author SHA1 Message Date
Shawn O. Pearce 8e40697047 Expose repository change event constructors
Repository implementations outside of .lib need to be able to
create these events and deliver them to listening application code.

Expose and document the constructors so that they are visible when
we move FileRepository into storage.file.FileRepository.

Change-Id: I7fb6e8f4f5fdab683c5ebb5267673aa6d5b560bb
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-23 16:54:14 -07:00
Shawn O. Pearce b3254d1159 isValidRefName: Inline the forbidden ref suffix of ".lock"
A Git reference name must never end with ".lock", as it would
confuse any existing C client that tries to obtain a clone of the
repository over the network.  Even if the repository isn't on a
local filesystem, it still should ban that suffix.

Because I plan to move LockFile to storage.file and make it a private
implementation detail of the local file system storage model,
we can't rely on its package level SUFFIX field here.  Making it
public probably won't work long-term either, as I also plan to
pull storage.file into its own separate project that depends on
the core library.

So, just inline the constant here.  Its as foribidden as ":" is.

Change-Id: If85076861baeacc183b82696375a13e935ba8836
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-23 16:54:14 -07:00
Shawn O. Pearce 252cd74eb0 Remove pack stream from PackWriterTest
This stream was used only to determine how many bytes had been
written thus far.  Except we're always dumping it into a simple
ByteArrayOutputStream, which also knows that.  Drop the dependency
on the pack stream and use ByteArrayOutputStream directly.

This lets us later move this test into the new storage.file
package without dragging along the pack stream that is an internal
implementation detail of PackWriter, which is more general than
just the file storage layer.

Change-Id: I291689c0b1ed799270c213ee73b710b2637fb238
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-23 16:54:14 -07:00
Shawn O. Pearce a5aec660eb Remove pointless setOldObjectId in test
Setting this value is pointless, because its automatically set
by the refs.newUpdate call that created the update operation.
The API is protected by default, because application level code,
including this test, should not be calling it.

Change-Id: I8867a4e8007892e2bd44a05d7dec619081081943
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-23 16:54:14 -07:00
Shawn O. Pearce 66e5895eb4 Remove speed tests based on mapCommit
The mapCommit API is being deprecated because it doesn't run very
fast.  Leaving tests around to test how fast it is relative to C Git
isn't instructive.  Remove them, which should help aid the transition
away from the mapCommit API.

Change-Id: I27e1c844610d7da5b2c44b33a00602706973c9cc
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-23 16:54:14 -07:00
Matthias Sohn 33ae23b8b9 Change default target platform for maven build to galileo
Starting with 0.9 we do no longer support ganymede.
http://dev.eclipse.org/mhonarc/lists/egit-dev/msg01277.html

Change-Id: Ibf40342f67d9706e86336748f15d10ea47278096
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-06-19 01:06:14 +02:00
Shawn Pearce f3186974b6 Merge "Fix line endings" 2010-06-18 18:15:53 -04:00
Matthias Sohn 767fb175ed Fix line endings
Some sources had dos line endings. Also configure all projects to use
unix line endings and UTF-8 text encoding.

Change-Id: I8fc9a1dbb219ffa91d1b3011b3b11b7e48e74ca7
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-06-18 23:36:18 +02:00
Shawn Pearce 3149f971e0 Merge ""Bare" Repository should not return working directory." 2010-06-16 22:34:46 -04:00
Andrew Bayer 068eb92710 Make ObjectId, RefSpec, RemoteConfig, URIish serializable
Modifications to various classes in order to allow serialization
for use of JGit in Hudson's git plugin.

Change-Id: If088717d3da7483538c00a927e433a74085ae9e6
2010-06-16 16:10:28 -07:00
Mathias Kinzler 3c51b35e03 "Bare" Repository should not return working directory.
If a repository is "bare", it currently still returns a working directory.
This conflicts with the specification of "bare"-ness.

Bug: 311902

Change-Id: Ib54b31ddc80b9032e6e7bf013948bb83e12cfd88
Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
2010-06-16 08:50:26 +02:00
Matthias Sohn 93ccd4a7fe Merge "tools/version.sh: Use backup files on Win32" 2010-06-15 19:34:52 -04:00
Chris Aniszczyk 8a11ac3d69 Merge "Add missing @Override tags in AlternateRepositoryDatabase" 2010-06-15 11:40:04 -04:00
Mathias Kinzler c1c1300a74 Allow to read configured keys
Currently, there is no way to read the content
of the Git Configuration in a  way that would
allow to list all configured values generically.
This change extends the Config class in such a
way as to being able to get a list of sections and
to get a list of names for any given section or
subsection.
This is required in able to implement proper
configuration handling in EGit (show all the
content of a given configuration similar to 
"git config -l").

Change-Id: Idd4bc47be18ed0e36b11be8c23c9c707159dc830
Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
2010-06-15 10:12:26 +02:00
Shawn Pearce 86fcdc53ad Merge changes I53f71dc0,I3a899a3a,I3e8bd245,Ie7c9db83,If396326e,I6f4cf8da,I3bf96dd0,I3a2a43a1,I292fe88c,Ia1cf40cf
* changes:
  git-servlet: Fix comparing uploadFactory with the wrong DISABLED instance
  Prefer static inner classes
  Override equals for SwingLane since super class PlotLane defines it
  Make sure a Stream is closed upon errors in IpLogGenerator
  Make constant static in RebuildCommitGraph
  Make inner classes static in http code
  Cache filemode in GitIndex 
  Remove unused parent field in PlotLane
  Removed unused repo field in WorkDirCheckout
  Extend DiffFormatter API to simplify styling
2010-06-14 19:59:48 -04:00
Robin Rosenberg 6d5241110b git-servlet: Fix comparing uploadFactory with the wrong DISABLED instance
Change-Id: I53f71dc0e3c68839da5ff5a2e0f3eeb8340e4793
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-06-14 23:47:59 +02:00
Shawn O. Pearce bc238acdc5 Add missing @Override tags in AlternateRepositoryDatabase
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-14 12:59:30 -07:00
Shawn O. Pearce 200f3caefc tools/version.sh: Use backup files on Win32
Windows doesn't permit us to edit a file in-place with Perl.
So create backup files when we perform the edit, and remove them
when we are done.  This is a tad slower on POSIX systems, but is
much more portable.

Change-Id: I429c7d698924cb32e709363f5da82f7232bbdab2
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-14 08:19:56 -07:00
Shawn O. Pearce 44ba1bc78c Merge branch 'stable-0.8'
* stable-0.8:
  Qualify post-0.8.4 builds
  JGit 0.8.4
  JGit 0.8.3
  Include about.html in org.eclipse.jgit artifact
  Fix build.properties of the JGit feature
  Added the standard SULA for JGit
  Add "resources/" as a source folder

Change-Id: I4ecb0af41184ef84d104345fd1adcc4a240a38f6
2010-06-14 08:12:48 -07:00
Shawn O. Pearce 239ce58553 Start 0.9 development
Change-Id: I84173ece5100f1fcb78168e2e102b649d9466c08
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-14 08:11:27 -07:00
Shawn O. Pearce d28a40d679 Qualify post-0.8.4 builds
Change-Id: I21efed66921eb7e1e4010fccc9fa9af6c4150fc1
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-14 08:10:08 -07:00
Matthias Sohn 6970edf35a JGit 0.8.4
Created wrong tags for 0.8.3 hence creating another version.

Change-Id: I4e00bbcffe1cf872e2d7e3f3d88d068701fb5330
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-06-14 15:42:09 +02:00
Matthias Sohn 5255d66143 JGit 0.8.3
Change-Id: I845da83c74475d74ec25d68f53c0a4738a898550
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-06-14 01:34:34 +02:00
Robin Rosenberg 3a899a3af9 Prefer static inner classes
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-06-13 03:31:52 +02:00
Robin Rosenberg 3e8bd24580 Override equals for SwingLane since super class PlotLane defines it
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-06-13 03:30:10 +02:00
Robin Rosenberg e7c9db836b Make sure a Stream is closed upon errors in IpLogGenerator
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-06-13 03:28:04 +02:00
Robin Rosenberg f396326e0b Make constant static in RebuildCommitGraph
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-06-13 03:27:06 +02:00
Robin Rosenberg 6f4cf8daec Make inner classes static in http code
Static classes are preferrable to keep unwanted dependencies away, 
and they have one less member field.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-06-13 03:19:47 +02:00
Robin Rosenberg 3bf96dd04b Cache filemode in GitIndex
Apparently this was the intention, but never happened

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-06-13 03:16:32 +02:00
Robin Rosenberg 3a2a43a1dc Remove unused parent field in PlotLane
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-06-13 03:13:57 +02:00
Robin Rosenberg 292fe88c50 Removed unused repo field in WorkDirCheckout
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-06-13 03:12:41 +02:00
Robin Rosenberg ce56c5dcc9 Extend DiffFormatter API to simplify styling
Refactor and extend the internals so users can override and
intervene during formatting, e.g. to colorize output.

Change-Id: Ia1cf40cfd4a5ed7dfb6503f8dfc617237bee0659
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-06-12 15:31:04 +02:00
Matthias Sohn 4269a90aac Include about.html in org.eclipse.jgit artifact
This is required to enable accessing legal info for
org.eclipse.jgit from
Help > About > Installation Details > Plugins

Change-Id: I73f40dd2018112cd23102954d7647ecdbbbf0d89
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-06-08 02:41:37 +02:00
Chris Aniszczyk 6b13cb36c6 Fix build.properties of the JGit feature
The JGit feature's build.properties was referring
to a notice.html instead of license.html

Change-Id: I642e2a05d1be58b1d47fd9701edf1a0f2bfa3660
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2010-06-07 16:56:24 -05:00
Chris Aniszczyk f1fdc5e8d2 Added the standard SULA for JGit
The Eclipse Foundation requires the standard SULA be present
in every feature. We had the license present via edl-v10.html
but we were missing the SULA via the license.html file. The
fix is to simply add the SULA.

Change-Id: I75b43ce098f544b95181755b5cc81a9b1dee6391
Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2010-06-07 16:46:14 -05:00
Matthias Sohn ab360d06de Add "resources/" as a source folder
Building jgit with pde.build was broken without resources.

Bug:315823
Change-Id: I45be510ada068b3ffab0feb30ec60f2c96a5ca32
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-06-05 14:39:27 +02:00
Marc Strapetz 936e4ab2f2 Repository can be configured with FS
On Windows, FS_Win32_Cygwin has been used if a Cygwin Git installation
is present in the PATH. Assuming that the user works with the Cygwin
Git installation may result in unnecessary overhead if he actually
does not.

Applications built on top of jgit may have more knowledge on the
actually used Git client (Cygwin or not) and hence should be able to
configure which FS to use accordingly.

Change-Id: Ifc4278078b298781d55cf5421e9647a21fa5db24
2010-06-04 19:08:58 -07:00
Shawn Pearce 92eedd667d Merge "Refactor ReadTreeTest to allow testing other checkout classes" 2010-06-04 21:48:54 -04:00
Robin Rosenberg 920d89d6af Add support for computing a Change-Id à la Gerrit
A Change-Id helps tools like Gerrit Code Review to keeps different
versions of a patch together. The Change-Id is computed as a SHA-1
hash of some of the same basic information as a commit id on the first
commit intended to solve a particular problem and then reused for
updated solutions.

Change-Id: I04334f84e76e83a4185283cb72ea0308b1cb4182
Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-06-04 18:42:14 -07:00
Christian Halstrick eca2946457 Refactor ReadTreeTest to allow testing other checkout classes
ReadTreeTest contains a lot of useful tests for "checkout"
implementations. But ReadTreeTest was hardcoded to test only
WorkDirCheckout. This change doesn't add/modify any tests semantically
but refactors ReadTreeTest so that a different implementations of
checkout can be tested. This was done to allow DirCacheCheckout to be
tested without rewriting all these tests.

Change-Id: I36e34264482b855ed22c9dde98824f573cf8ae22
Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-06-05 00:18:17 +02:00
Alex Blewitt 046d1a2ef6 Provide a public entry method to determine whether a URI protocol is supported 2010-06-04 00:38:50 +01:00
Shawn O. Pearce d8ec8527a6 Qualify post-0.8.1 builds
Change-Id: Id86e5876b2f684b2a272c07061a276b054ba410d
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-02 15:55:39 -07:00
Shawn O. Pearce be86767d71 JGit 0.8.1
Change-Id: I3d4ac7d0617a3575019e2ed748ed2a298a988340
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-02 14:47:31 -07:00
Shawn O. Pearce 7804045c66 Bump all features during release
Change-Id: I3103c54a2a525f5f190cf35b63394dad6d02cc5e
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-06-02 14:41:06 -07:00
Shawn Pearce 495fe7b221 Merge "Describe how to generate iplog." 2010-06-01 11:10:38 -04:00
Matthias Sohn 99cf3d7a3b Describe how to generate iplog.
Change-Id: I91f249422efbb6aea0491e276ccfe00f5ae7d212
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-05-29 09:30:10 +02:00
Shawn O. Pearce 1489bd157c eclipse-iplog: Use contribution rather than bug element
Wayne changed the schema to no longer be dependent upon the Bugzilla
notion of a contribution, but instead be more generic and better
support systems like Gerrit Code Review.  Update our output to
use the <contribution> element and include a link to the change
in Gerrit.

Change-Id: Ibc8a436918bd8e7597dc17743824201a74bce09b
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-05-28 15:09:29 -07:00
Shawn O. Pearce 92e739413d eclipse-iplog: Add new consumes element to IP log
This element documents other Eclipse projects that are consumed by
this project.  JGit doesn't consume any projects, but its sister
project EGit does.

Change-Id: Ie922d27c580f6742e2acb051815a381af48df7ca
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-05-28 14:58:42 -07:00
Shawn O. Pearce 735467365c Update cache of IPzilla CQ 3904
Change-Id: I552e77e434487ece9a600de9e09bc17066579773
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-05-28 14:32:22 -07:00
Shawn O. Pearce 4f346afa1a eclipse-ipzilla: Correctly parse result with empty last field
If the last field of our IPzilla query comes back empty, we were
skipping over and not including it in the result List, causing an
IndexOutOfBoundsException when it was read into our data model.

If the last field is empty, actually add the empty string.

Change-Id: Ib18b335990c73e036b185199d0004f4ffc395867
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-05-28 14:32:22 -07:00