aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.junit
Commit message (Collapse)AuthorAgeFilesLines
* Prepare post 2.2.0.201212191850-r buildsstable-2.2Matthias Sohn2012-12-212-2/+2
| | | | Change-Id: I1a0fe51c71551fcfc98f5dd435eb283fd661b77a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v2.2.0.201212191850-rv2.2.0.201212191850-rMatthias Sohn2012-12-202-2/+2
| | | | | Change-Id: Idc49f17d03886b6a1e61a94ff81e32625c8675d9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Harmonize the JDT settings within JGitRobin Rosenberg2012-11-164-10/+81
| | | | | | | | | | | Note the the settings are slightly less restrictive for test bundles. -Also cleanup a couple of malformed javadocs -Update compiler warnings/errors to include default values from Juno -We now flag diagnosed null dereference as error. We didn't do that earlier because of some false positives. Change-Id: I58386d63164e65d3d8d1998da3390d99bdc7381a Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Provide a convenient read() in RepositoryTestCaseRobin Stocker2012-09-252-13/+23
| | | | | | | For reading a file by its repository-relative path, analogous to writeTrashFile. Change-Id: I112de0d57c2ee1bd425de6cbf561a57fea7147f0
* Suppress boxing warnings where we know they are okRobin Rosenberg2012-09-221-0/+58
| | | | | | | | | Invoke the wrapper types' valueOf via static imports. For booleans used in asserts, add a new assert in the JUnit utility package since out current version of JUnit does not have the assert(boolean, boolean) method. Change-Id: I9099bd8efbc8c133479344d51ce7dabed8958a2b
* Prepare 2.2.0 buildsMatthias Sohn2012-09-192-20/+20
| | | | | Change-Id: I386ba70541d644e58661d26713b309371e0f9257 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Additional unit tests for the GCSasa Zivkov2012-09-161-1/+28
| | | | | Change-Id: Id5b578f7040c6c896ab9386a6b5ed62b0f495ed5 Signed-off-by: Sasa Zivkov <sasa.zivkov@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Ensure a directory exists before trying to create/merge a file into it.Jevgeni Zelenkov2012-08-061-0/+8
| | | | | | | | | | Since git doesn't keep track of empty directories, they should be created first. Test case included demonstrates that using StashApplyCommand(). Bugfix is applied to the DirCacheCheckout class, because StashApplyCommand() uses it internally to apply a stash. Change-Id: Iac259229ef919f9e92e7e51a671d877172bb88a8 Signed-off-by: Jevgeni Zelenkov <jevgeni.zelenkov@gmail.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add a CommitBuilder method to edit arbitrary DirCacheEntrysDave Borowitz2012-06-151-2/+6
| | | | Change-Id: Ic2f5ec28621219a8ff1272674e2bf2c8d36eb107
* Prepare 2.1.0 buildsMatthias Sohn2012-06-142-20/+20
| | | | Change-Id: I4aad3efdd435d8d5eb53c84a8d38132acce97c25 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare next 2.0.0-SNAPSHOT buildsMatthias Sohn2012-06-062-2/+2
| | | | Change-Id: I0d55b390502b3da139ab0d15a6cf3d05774d8ad9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v2.0.0.201206060730-rc3v2.0.0.201206060730-rc3Matthias Sohn2012-06-062-2/+2
| | | | | Change-Id: I12f8800b74228e71c77f0fb82c250c154d06369f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Get rid of warnings about empty statmentsRobin Rosenberg2012-06-061-0/+6
| | | | | | | | In HtttpAuthMethod there were comments, but not in a style that Eclipse recognizes. Change-Id: I64f55b27143f8badcefbb419d3951f2a26b87d5f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare next 2.0.0-SNAPSHOT buildsMatthias Sohn2012-05-312-2/+2
| | | | Change-Id: Iffc57d6b25dafb72272d1957116c19ab45ba2c54 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v2.0.0.201205301645-rc2v2.0.0.201205301645-rc2Matthias Sohn2012-05-302-2/+2
| | | | | Change-Id: Ic4f84f1a11c93863c229c0089f2e4edc7c7a36b7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Validate paths during DirCheckoutRobin Rosenberg2012-04-231-0/+1
| | | | | | | | | | | | | | | | | | | DirCacheCheckout and CanonicalTreeParser cooperate. CanonicalTreeParser can detect malformed, potentially malicious tree entries and sets a flag, while DirCacheCheckout refuses to work with such paths. Malicious tree entries are ".", "..", ".git" (case insensitive), any name containing '/' and (on Windows '\') and also (on Windows) any paths ending in a combination of '.' or space or containing a ':'. We also forbid all special names like "con" etc on Windows. Some of the test can execute on any platform by enabling partial platform emulation. A new runtime exception, InvalidPathException, is introduced. For backwards compatibility it extends InvalidArgumentException. Change-Id: I86199105814b63d4340e5de0e471d0da6b579ead Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Let the date formatter pick the locale.Daniel Megert2012-02-251-0/+13
| | | | | | | | | Instead of using the locale from the SystemReader we let the SystemReader create the date formats without passing the locale. Bug 368756 Change-Id: I6be9e07af804a08f3f3ac2d2d526ef594eed19e3 Signed-off-by: Daniel Megert <daniel_megert@ch.ibm.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 2.0.0-SNAPSHOT buildsMatthias Sohn2012-02-162-20/+20
| | | | | Change-Id: I946e315af04227727ac937ebe9d70ae1ea4e8936 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Move writeTrashFile and deleteFile into JGitTestUtilDariusz Luksza2012-01-252-10/+46
| | | | | | | | | Moves RepositoryTestCase.writeThashFile, RepositoryTestCase.deleteFile and dependencies into JGitTestUtil for further reuse. Required-by-EGit: If8dfa0251797aca56ddc825619500dc21885ba26 Change-Id: I6fc62c8e6626f907e544b5bbe5d64e864a2c323f Signed-off-by: Dariusz Luksza <dariusz@luksza.org>
* Make sure all bytes are written to files on close, or get an error.Robin Rosenberg2012-01-151-5/+6
| | | | | | | | | | Java's BufferedOutputStream swallows any errors that occur when flushing the buffer in close(). This class overrides close to make sure an error during the final flush is reported back to the caller. Change-Id: I74a82b31505fadf8378069c5f6554f1033c28f9b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-1.2'Matthias Sohn2011-12-262-0/+100
|\ | | | | | | | | | | | | | | | | | | * stable-1.2: JGit v1.2.0.201112221803-r Expose unmerged paths when revert fails Enforce the use of Java5 API:s only (with a few exceptions) Change-Id: Ib18d41a65e68cc47fb63114fcce27a16820d0692 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v1.2.0.201112221803-rv1.2.0.201112221803-rstable-1.2Matthias Sohn2011-12-232-2/+2
| | | | | | | | | | Change-Id: Icc0b09324f205d93929af8cf522a99ad00cf7591 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Enforce the use of Java5 API:s only (with a few exceptions)Robin Rosenberg2011-12-162-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | This only works with Eclipse 3.6 and newer and requires installation of new package. Documentation is not very good, but there is a blog about it here: http://eclipseandjazz.blogspot.com/2011/10/of-invalid-references-to-system.html API checking is especially useful on OS X where Java5 is not readily available. Change-Id: I3c0ad460874a21c073f5ac047146cbf5d31992b4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Prepare 1.3.0 buildsMatthias Sohn2011-12-102-20/+20
|/ | | | | Change-Id: I7a1ae73783c95041b59f047a7330e62e7f642149 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add methods for configuring platform emulationRobin Rosenberg2011-12-071-0/+30
| | | | | | | Specifically we support setting system properties for Windows, generic Unix and current test platform. Change-Id: Ib02be417c4915350dfec64fda3face1138552871
* Add locale to the properties manageable by SystemReaderRobin Rosenberg2011-10-201-0/+6
| | | | Change-Id: I5e9af40d38bb671cb9fcdb0fa3b4eb3af5f36f6c
* Add a method to SystemReader to get the time zoneRobin Rosenberg2011-10-201-1/+5
| | | | Change-Id: Ifd31f408ed2c5b7869694b715fea3219e74963ef
* Prepare 1.2.0 buildsMatthias Sohn2011-09-152-20/+20
| | | | | Change-Id: I9ec247135d93ef28d732e94f18d0ec1d0e2e6d44 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post v1.1.0.201109151100-r buildstable-1.1Matthias Sohn2011-09-152-2/+2
| | | | | Change-Id: Ib099ec93d8243b238641d79328216874532ab5eb Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v1.1.0.201109151100-rv1.1.0.201109151100-rMatthias Sohn2011-09-152-2/+2
| | | | | Change-Id: Iadcec7e5973600e005cbdeb837fa197d3ae2ea86 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post v1.1.0.201109071825-rc3 buildsMatthias Sohn2011-09-082-2/+2
| | | | | Change-Id: I1244f6639263d156a6f9e4530167e5eb1826a535 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v1.1.0.201109071825-rc3v1.1.0.201109071825-rc3Matthias Sohn2011-09-082-2/+2
| | | | | Change-Id: I1b989d3101272632eacabe25a0b111ad0ff5bb3b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Use commit message best practices for Mylyn Commit templateMatthias Sohn2011-09-052-0/+7
| | | | | | | | | | We should use a template for Mylyn commit messages that matches with our guidelines for commit messages. http://wiki.eclipse.org/EGit/Contributor_Guide#Commit_message_guidelines Bug: 337401 Change-Id: I05812abf0eb0651d22c439142640f173fc2f2ba0 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post-v1.1.0.201109011030-rc2 buildsMatthias Sohn2011-09-012-2/+2
| | | | Change-Id: I8dda83cdbe88beba4a480df9846848bf3aceb9e2 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v1.1.0.201109011030-rc2v1.1.0.201109011030-rc2Matthias Sohn2011-09-012-2/+2
| | | | | Change-Id: Ie6d65fe45ad92c813ce3a227729aa43681922249 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Cleanup directories leftover by test.Adrian Goerler2011-07-071-5/+27
| | | | | | | Use the temporary file management from superclass. Change-Id: I3042951dc21860b4b85dd72a6bf41ee7cfe2aba4 Signed-off-by: Adrian Goerler <adrian.goerler@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Cleanup curly bracesAdrian Goerler2011-07-061-16/+9
| | | | | Change-Id: I2de6439a3ad951a99d89e4aee02006c745d16510 Signed-off-by: Adrian Goerler <adrian.goerler@sap.com>
* Prepare 1.1.0 buildsMatthias Sohn2011-06-062-20/+20
| | | | | Change-Id: I4cf017cd567543846839612ab3ace6d26233e01d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post v1.0.0.201106011211-rc3 buildsMatthias Sohn2011-06-012-2/+2
| | | | | Change-Id: I4dec8eba7e35858aef65fcc10f91fad3fe5b52b9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v1.0.0.201106011211-rc3v1.0.0.201106011211-rc3Matthias Sohn2011-06-012-2/+2
| | | | | Change-Id: I574a05200471c431b3a02ac6ff208dc6aa90f539 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Remove incubation markerMatthias Sohn2011-05-311-1/+1
| | | | | Change-Id: I6018ce0cd3b7c8137e137848fe1f04551b257538 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Make sure test repositories are closedChristian Halstrick2011-05-311-0/+11
| | | | | | | | | | | | | Some repositories created during tests are not added to the 'toClose' list in LocalDiskRepositoryTestCase. Therefore when the tests end we may have open FileHandles and on Windows this may cause the tests to fail because we can't delete those files. This is fixed by adding the possibility to explicitly add repositories to the list of repos which are closed automatically. Change-Id: I1261baeef4c7d9aaedd7c34b546393bfa005bbcc Signed-off-by: Christian Halstrick <christian.halstrick@sap.com>
* Add GitCloneTaskTestKetan Padegaonkar2011-05-191-0/+5
| | | | | Change-Id: Iec8cd032d8d659a896d909f9094f76b7d35147e6 Signed-off-by: Chris Aniszczyk <caniszczyk@gmail.com>
* Qualify post-0.12 buildsMatthias Sohn2011-05-032-20/+20
| | | | | Change-Id: I70fe2671321efb5c3d271121ce00299533d1b388 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit 0.12.1v0.12.1stable-0.12Matthias Sohn2011-05-022-20/+20
| | | | | Change-Id: Ia6e58b466fa3ef7ddd61b40f2ad44141fe8786c4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Create all test data in trash folderMatthias Sohn2011-04-101-4/+18
| | | | | | | | | This ensures that all test data is separated from project sources and cleaned up after the test. Previously the cloned bare test repository was created in org.eclipse.jgit.test/ and not deleted after the test run. Change-Id: I55110442e365fc8fe610f1c372f72a71ee6e1412 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Qualify post 0.11 buildsMatthias Sohn2011-02-122-20/+20
| | | | | Change-Id: Ibcef4fc4c986c2cda01e943d16aa1c53eff99f25 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit 0.11.1v0.11.1Matthias Sohn2011-02-112-20/+20
| | | | | Change-Id: I9ac2fdfb4326536502964ba614d37d0bd103f524 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* [findbugs] Do not ignore exceptional return value of mkdirMatthias Sohn2011-01-281-1/+2
| | | | | | | | | java.io.File.mkdir() and mkdirs() report failure as an exceptional return value false. Fix the code which silently ignored this exceptional return value. Change-Id: I41244f4b9d66176e68e2c07e2329cf08492f8619 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Convert all JGit unit tests to JUnit 4Robin Rosenberg2010-12-314-31/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | Eclipse has some problem re-running single JUnit tests if the tests are in Junit 3 format, but the JUnit 4 launcher is used. This was quite unnecessary and the move was not completed. We still have no JUnit4 test. This completes the extermination of JUnit3. Most of the work was global searce/replace using regular expression, followed by numerous invocarions of quick-fix and organize imports and verification that we had the same number of tests before and after. - Annotations were introduced. - All references to JUnit3 classes removed - Half-good replacement for getting the test name. This was needed to make the TestRngs work. The initialization of TestRngs was also made lazily since we can not longer find out the test name in runtime in the @Before methods. - Renamed test classes to end with Test, with the exception of TestTranslateBundle, which fails from Maven - Moved JGitTestUtil to the junit support bundle Change-Id: Iddcd3da6ca927a7be773a9c63ebf8bb2147e2d13 Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>