Skip to main content
aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2011-05-13[findBugs] Do not ignore return value of File methodsMatthias Sohn1-1/+2
Change-Id: I80c5dbf7f85ff1ede5748144b533b582e6997969 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-05-12Allow committing non workspace changesJens Baumgart1-5/+5
The commit process is now based on files instead of resources. It is possible to commit changes on files that do not belong to the workspace. The commit dialog commits the changes of one single repository. Displaying diffs in the commit dialog for non workspace files needs to be implemented in a follow-up commit. Bug: 329061 Bug: 302349 Change-Id: Ib5f0bb2a6d86000683415b100702a0b322efd032 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2011-04-13Add Page for Gerrit push configuration to Clone WizardStefan Lay1-0/+127
If fetch URI used for cloning is using HTTP(S) we choose the same protocol for pushing, Gerrit's path prefix for smart HTTP is handled automatically. Otherwise SSH protocol is proposed for pushing changes to the Gerrit review queue. Change-Id: I187479cdc233843bed2522ef7408f702a51255fc Signed-off-by: Stefan Lay <stefan.lay@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-03-31Check for trailing newline before writing to .gitignore file.Kevin Sawicki1-0/+20
IgnoreOperation wrote entries to the .gitignore file without checking if the file currently had a trailing newline which would cause entries to get written on the same line as other entries for files that were missing a trailing newline. Added unit test to IgnoreOperationTest for this case. Bug: 339419 Change-Id: I422ec5e92e3fcfea0d8bf6d3bfaf38245e505733 Signed-off-by: Kevin Sawicki <kevin@github.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2011-03-30Change ref parameter of CloneOperation to StringRobin Stocker2-6/+2
The parameter is used for specifying what branch should be checked out after fetch. Before this change, it was of type Ref. But a Ref is not really right here, as a Ref should point to a valid object id, and the ids aren't generally known before a clone. This lead users of CloneOperation to passing a Ref with only a name set, and no object id (using a anonymous Ref subclass or passing null as object id). Before the parameter was a Ref, it already was a String, but one could only specify a short branch name (e.g. "master"), not a full ref name ("refs/heads/master"). With this change, it's still the full ref name, just as a String. Bug: 338603 Change-Id: I420059e7eda4b3bbbf335557217bc89f11c27abd Signed-off-by: Robin Stocker <robin@nibor.org> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2011-03-23FindBugs: cleanup EGit Core TestsMathias Kinzler2-7/+7
Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Change-Id: I0c1bbfded5132b5cc5f1959e9973890e58157d18
2011-03-22TestRepository: use cached repository instanceJens Baumgart6-13/+36
TestRepository used its own Repository instance while EGit operations used in the tests use the instances provided by RepositoryCache. This caused update problems. Now TestRepository also uses the instances provided by RepositoryCache. This change is a prerequisite for removing the sleeps in CommitOperationTest. The sleeps were removed. Change-Id: Ib27e2a1f35a4494cf113b220ef57b768f8e61fa2 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
2011-03-17CommitOperation: use JGit Commit CommandJens Baumgart1-2/+20
The usages of the deprecated GitIndex class were replaced by using the JGit CommitCommand. Depends on JGit change http://egit.eclipse.org/r/#change,2760 Change-Id: Ibd0e883bb6c82c42d1b3bd08743dd7d050e95291 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Philipp Thun <philipp.thun@sap.com>
2011-03-14[sync] Don't show ignored files in Workspace modelDariusz Luksza1-3/+3
It appears that after performance improvements in synchronize view ignored files was shown in Workspace model. This change adds also an test case for checking that ignored files doesn't show in Git Change Set and Workspace models. Bug: 322454 Change-Id: Iecd37a15ddf5eb04303f4daa6d6016112b9eea43 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
2011-03-08Fix CommitOperationTest on MacJens Baumgart1-2/+2
A Thread.sleep(1100) between commit and performing the next change seems to be required on file systems with time stamp resolution of 1s. The workaround can be removed when GitIndex is removed from CommitOperation. Change-Id: Id002e7c339d2e1913a9f8f9db397111c9eb102bf Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
2011-03-07Add Tests for CommitOperationJens Baumgart2-1/+209
Change-Id: I51fc37109acf8d43135c76e9de856f810ad9f300 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
2011-03-07Fix Typo in CommitOperationTestJens Baumgart1-1/+1
Change-Id: I193109fa80cd40f9a065f4fd0148aca4a96522e5 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
2011-02-25Fix NPE when comitting file added in index and deleted in worktreeRobin Rosenberg1-0/+32
Change-Id: I9d3b54a2eb32b8ad1f579b25dea5d36013322ec1 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-02-21Replace EasyMock with MockitoDariusz Luksza1-116/+78
Change-Id: I6d903849de08e995b6d23b4e6eb7bd28eee8eea7 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
2011-02-01Make PushOperation use JGit APIMathias Kinzler1-3/+3
The PushOperation should use the JGit API instead of the Transport class directly. Bug: 334762 (only contributing to it, not complete resolution) Change-Id: I6e55d96fb7d8d65bae4cc1c10e9bd24acebae54c Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2011-01-21Revert change I6b030af1, Idc463ec8 and I098f8cDariusz Luksza5-0/+761
It seems that change I6b030af13ba092855ef68e5a6087bb357fdb7bb2 brakes down 'Workspace model' representation in synchronize view therefore it was reverted, also junits for GitTestResourceVariant and GitResourceVariantTreeSubscriber removed by change Idc463ec8d6432dd99c383f2dc433c0f32b1af9ab and I098f8c05f9904a2c4760fa6adb4fd884657ba0ab were restored. Bug: 323839 Change-Id: Ieb90c1f00fa64f29ca400e85a50de167512e900a Signed-off-by: Dariusz Luksza <dariusz@luksza.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-01-20Fix tests after commit ce7037c0Dariusz Luksza3-451/+0
Next part of test cleaning after merging performance improvements for synchronize view. Change-Id: I098f8c05f9904a2c4760fa6adb4fd884657ba0ab Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
2011-01-20Remove useless tests after merging change I6b030af1Dariusz Luksza2-310/+0
Since change I6b030af13ba092855ef68e5a6087bb357fdb7bb2 GitResourceVariantTree.fetchVariant() always return null hence all tests for this method and its delegates can be removed. Change-Id: Idc463ec8d6432dd99c383f2dc433c0f32b1af9ab Signed-off-by: Dariusz Luksza <dariusz@luksza.org> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2011-01-12Merge "Interactive commit should delete empty trees"Robin Rosenberg1-0/+61
2011-01-10Remove usages of deprecated methodsJens Baumgart2-1/+5
Change-Id: I09da29344eb7d337ec441c76881fd5651c924c83 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-12-19Interactive commit should delete empty treesRobin Rosenberg1-0/+61
The commit operation as used from the commit dialog did not delete trees when they became empty. Today Git does not leave empty trees, it is not intended here and the user certainly does not expect it. We also add a testcase for this, though the tests for the CommitOperation lack a lot in general as the logic is not tested anywhere else. Moving to DirCache will probably reduce the number of needed tests at this place. Bug: 314105 Change-Id: I897e364e476f942f8c5361a809f5fd849a972fee Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-12-14Fix cloning a repository with detached HEADStefan Lay2-2/+6
The clone wizard could not handle remote repositories where the HEAD is no branch. The SourceBranchPage threw an exception in the LabelProvider. When the user selected "HEAD" on the CloneDestinationPage the cloned repository was inconsistent. Furthermore it is now possible to use the CloneOperation with arbitrary Refs, not only with refs/heads/*. Bug: 326693 Change-Id: Ibd999956bbecee148dbfd4ceb997741c09e3f87e Signed-off-by: Stefan Lay <stefan.lay@sap.com> Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-12-09[findbugs] Do not ignore exceptional return valueMatthias Sohn6-58/+29
java.io.File.delete() reports failure as an exceptional return value false. Fix the code which silently ignored this exceptional return value. Also remove some duplicate deletion helper methods. This change depends on jgit change I430c77b5. Change-Id: I61508c944a88277929e5653ba78f5ad1973e4873 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-12-08Adapt egit to jgit change Idb176736Matthias Sohn1-4/+1
JGit change Idb176736fa0dc97af372f1d652a94ecc72fb457c changed handling of WorkingTreeOptions and filemode breaking the egit build. Change-Id: Iee407b7bfb3c65df5c3562b3bdabb5637f04b481 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2010-12-08Fix AdaptableFileTreeIteratorTestJens Baumgart1-1/+1
AdaptableFileTreeIteratorTest was broken by JGit change a02be9725c9f83f0a0280a9a1f00e8d484825885 Change-Id: Ice5d48dfbb132312d34ad234b2d3a1aa267daf26 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
2010-12-05[findbugs] Ensure closing writer in finally blockMatthias Sohn2-6/+16
Change-Id: Ifd117e7a6c567d5e1a34192bf3b6db9964606638 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-12-02[findbugs] Unwritten store field in GitResourceVariantTreeTestDariusz Luksza1-5/+2
org.eclipse.egit.core.synchronize.GitResourceVariantTreeTest.store Pattern id: UWF_UNWRITTEN_FIELD, type: UwF, category: CORRECTNESS Bug: 331625 Change-Id: I16271df409ccecfa62e2fa84afcce17d945c8808 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
2010-12-02[findbugs] Remove unread fieldMatthias Sohn1-5/+0
Change-Id: Ief270304c07596f9dd3a4207ae0afb8b0c30fa5d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-12-01Authentication: add option to store password in secure storeJens Baumgart1-0/+12
Now storing the credentials is optional in the clone/fetch/push/configure fetch/configure push wizards. Change-Id: Ic91d7bc86a3158f15fa112069369294c8b43022e Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Philipp Thun <philipp.thun@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-12-01Remove deprecated JGit code from EGit Core TestsMathias Kinzler2-68/+46
Change-Id: Ia168e795a93261d3d2da161f76200ba7a0ab7924 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
2010-11-30Implement basic authentificationJens Baumgart1-0/+150
Implementation of basic authentification with user and password. User and password entered in the clone wizard are put in the Eclipse secure store. A credentials provider was implemented that fetches credentials from the secure store and asks the user if credentials are not available. Change-Id: I5239c6595e39d2a855318649fccc8fe8ac5e5fb8 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Edwin Kempin <edwin.kempin@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-11-28Replace calls to StringBuffer with StringBuilderRemy Suen1-1/+1
It is not necessary to use StringBuffer if no synchronization is required. Change-Id: Id03f6482db70e5f1a174713f5b14f12fd2fd7f56 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-11-23Add a Rebase OperationMathias Kinzler1-0/+238
As a prerequisite for implementing the Rebase action in the UI, this adds the underlying operation. Change-Id: I9170ffd13b9554b0f19f539387f824e3bb44c018 Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>
2010-11-09Fix EGit build errorJens Baumgart1-1/+1
Commit 2fb0f5cfc067cb20f178cf4db7395b394b48783b Make Repository.shortenRefName static broke the EGit build. Change-Id: I923f0ea760d71aa76ca8eaeddbcc72c8b3b07e6e Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
2010-10-26[findbugs] Remove invocation of new String(String) constructorRobert Munteanu1-1/+1
Using the java.lang.String(String) constructor wastes memory because the object so constructed will be functionally indistinguishable from the String passed as a parameter. Change-Id: I46617366a17047dfdaef309bddfd172379da5196 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-10-01Remote connections: allow to configure a timeoutMathias Kinzler2-9/+9
This adds a preference page with a "remote connection timeout" that lets the user configure a timeout for remote connection. 0 is the default and corresponds to no timeout. The different operations opening Transport instances use this timeout and set in the Transport instance. Bug: 322242 Change-Id: I150b7bd4ad1c8c74061562f6a3b5958e0643a4de Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com> Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
2010-10-01Fix failing Core TestsStefan Lay3-40/+6
Fixes the tests which fail since commit 56d406b. Change-Id: I94793d6c90d98d407b55c05dbc4357192e1cfd13 Signed-off-by: Stefan Lay <stefan.lay@sap.com>
2010-09-19Remove unnecessary overridesMatthias Sohn1-5/+0
Overrides that only call the super class implementation are unnecessary. Change-Id: I8f3b917bdb92e7fcc7f89ef53628d05bbfd5771c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-09-13Merge "Adds support for comparing two remote branches"Stefan Lay1-20/+20
2010-09-09Sort roots by full path to ensure stable assertion resultsMatthias Sohn1-3/+13
GitResourceVariantTree uses a HashSet to store resource variants which doesn't guarantee stable sort order which may break the assertions in GitResourceVariantTreeTest.shouldReturnTwoRoots() [1]. To fix this we sort the roots before doing assertions. [1] http://dev.eclipse.org/mhonarc/lists/egit-dev/msg01497.html Change-Id: If92b0bb43bfb0a022df6fefb98b06b00ace03c35 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-09-09Adds support for comparing two remote branchesDariusz Luksza1-20/+20
The main reason of not displaying synchronization data for two remote branches was that GitResourceVariantTreeComparator was using standard SyncInfo class which uses local file to determine change kind. The new GitSyncInfo is looking for a first diff for given file in given range of commits. Based on this it determines change kind and direction. Git specific SyncInfo is activated only when the user doesn't select "include locally changed files" in synchronization dialog. When this option is selected standard implementation of SyncInfo will be used. Additionally "Workspace" model is only enabled when "include locally changed files" option is selected, in other case this model will be excluded. Bug: 324044 Change-Id: Ia0cf491657a6c9a01d68992457a25d15c5718428 Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
2010-09-08Clear RepositoryCache after each test to fix core testsJens Baumgart1-0/+4
With this fix the core test suite is running also on Mac. Reason for the failures before was the usage of out-dated Repository instances contained in RepositoryCache which caused spurious failures when running the full test suite while running tests individually always succeeded. A follow-up fix should care for the life cycle of Repository objects in RepositoryCache. Change-Id: I1f16a9de48435bd98e2520e34e49bc1ca6893f14 Signed-off-by: Jens Baumgart <jens.baumgart@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
2010-09-06Fix deletion problem in EGit Core testsJens Baumgart1-4/+21
EGit core tests sometimes fail because TestUtils.deleteRecursive can not delete a file. To workaround the problem the deletion is retried 10 times. Change-Id: Ia25c9304884c95f54e8e7b98ed49dd044fa7b95b Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
2010-09-06Merge "Fix AddOperationTest"Matthias Sohn1-1/+1
2010-09-06Merge "Fix IgnoreOperationTest"Matthias Sohn1-0/+10
2010-09-06Fix AddOperationTestJens Baumgart1-1/+1
Fixed small bug in AddOperationTest. Change-Id: Ib15b43cf9341f669911fcf65671e139373eb13ee Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
2010-09-06Fix IgnoreOperationTestJens Baumgart1-0/+10
IgnoreOperationTest did not clean up .gitignore in the workspace folder. This caused subsequent test to fail. Change-Id: Icc3e3e02302a8189ae2009e24682206d8bff086e Signed-off-by: Jens Baumgart <jens.baumgart@sap.com>
2010-09-04cleanup: Remove unnecessary @SuppressWarningsRobin Rosenberg1-8/+0
Change-Id: Ic9a424cfdfcebbf2ff548f6741d2f96a1494df0e Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
2010-09-01Fix EGit to use JGit's api.errors packageShawn O. Pearce1-6/+6
Change-Id: I27ec972b0d42b495c1f0c26ec0d76e644224e590 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
2010-08-31Remove usage of deprecated PersonIdent constructorMathias Kinzler1-2/+2
Change-Id: I7706a916f8388bbae948d550005584cadb1e836a Signed-off-by: Mathias Kinzler <mathias.kinzler@sap.com>

Back to the top