summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.pgm.test
Commit message (Collapse)AuthorAgeFilesLines
* Prepare post 3.0.0 M7 buildsMatthias Sohn2013-05-082-2/+2
| | | | Change-Id: I062c44529c7ae2f960d3c64a0923a45d2dc8a863 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v3.0.0.201305080800-m7v3.0.0.201305080800-m7Matthias Sohn2013-05-082-2/+2
| | | | | Change-Id: I377b174993862918a117f54e6cba4733dfc2307c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Move org.eclipse.jgit.pgm's resource bundle to internal packageMatthias Sohn2013-05-062-0/+2
| | | | | | | | Translatable texts aren't API and shouldn't require maintenance of @since tags to prevent API warnings. Change-Id: I228ff37f17c0e792a6bc188c463a0d19138e88ac Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Extend the FS class for Java7Robin Rosenberg2013-05-044-15/+58
| | | | | | | | | | | | | | | | | | | | | The most important difference is that in Java7 we have symbolic links and for most operations in the work tree we want to operate on the link itself rather than the link target, which the old File methods generally do. We also add support for the hidden attribute, which only makes sense on Windows and exists, just since there are claims that Files.exists is faster the File.exists. A new bundle is only activated when run with a Java7 execution environment. It is implemented as a fragment. Tycho currently has no way to conditionally include optional features based on the java version used to run the build, this means with this change the jgit packaging build always needs to be run using java 7. Change-Id: I3d6580d6fa7b22f60d7e54ab236898ed44954ffd Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix line endingsMatthias Sohn2013-05-031-79/+79
| | | | Change-Id: I61c9c173237a535da8576a9299bfd4bb29e8f56b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* status: Print conflict description for unmerged pathsRobin Stocker2013-04-191-3/+3
| | | | | | | Prefix unmerged paths with conflict description (e.g. "both modified:"), the same way C Git does. Change-Id: I083cd191ae2ad3e2460aa4052774aed6e36c2699
* Merge "Remove unused dependencies"Robin Rosenberg2013-04-181-3/+1
|\
| * Remove unused dependenciesMatthias Sohn2013-04-091-3/+1
| | | | | | | | Change-Id: I3cd161ac360a2e2635bffe309725a41c9527694e Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Make recursive merge strategy the default merge strategyMatthias Sohn2013-04-151-1/+1
|/ | | | | | | | Use recursive merge as the default strategy since it can successfully merge more cases than the resolve strategy can. This is also the default in native Git. Change-Id: I38fd522edb2791f15d83e99038185edb09fed8e1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix plugin provider names to conform with release train requirementMatthias Sohn2013-04-081-1/+1
| | | | | | | | | | According to release train requirements [1] the provider name for all artifacts of Eclipse projects is "Eclipse <project name>". [1] http://wiki.eclipse.org/Development_Resources/HOWTO/Release_Reviews#Checklist Change-Id: I8445070d1d96896d378bfc49ed062a5e7e0f201f Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add the no-commit option to MergeCommandTomasz Zarna2013-04-042-3/+36
| | | | | | | | | | Added also tests and the associated option for the command line Merge command. Bug: 335091 Change-Id: Ie321c572284a6f64765a81674089fc408a10d059 Signed-off-by: Christian Halstrick <christian.halstrick@sap.com> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* New functions to facilitate the writing of CLI test casesFrançois Rey2013-03-272-14/+90
| | | | | | | | | | | | Writing CLI test cases is tedious because of all the formatting and escaping subtleties needed when comparing actual output with what's expected. While creating a test case the two new functions are to be used instead of the existing execute() in order to prepare the correct command and expected output and to generate the corresponding test code that can be pasted into the test case function. Change-Id: Ia66dc449d3f6fb861c300fef8b56fba83a56c94c Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* JGit 3.0: move internal classes into an internal subpackageShawn Pearce2013-03-183-14/+14
| | | | | | | | This breaks all existing callers once. Applications are not supposed to build against the internal storage API unless they can accept API churn and make necessary updates as versions change. Change-Id: I2ab1327c202ef2003565e1b0770a583970e432e9
* Prepare 2.4.0-SNAPSHOT buildsMatthias Sohn2013-02-142-13/+13
| | | | | Change-Id: I4ab2baeb5d598d40d5dadfccdfe75152a1b9b7bf Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 2.3.0 buildsMatthias Sohn2012-12-212-13/+13
| | | | | Change-Id: I0ca539e8cfe444f96c64dc56d1f0ef33b66e0cff Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* 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>
* archive: Add tar supportJonathan Nieder2012-12-041-7/+160
| | | | | | | | Unlike ZIP files, tar files do not treat symlinks as ordinary files with a different mode, so tar support involves a little more code than would be ideal. Change-Id: Ica2568f4a0e443bf4b955ef0c029bc8eec62d369
* archive: Record executable and symlink bitsJonathan Nieder2012-12-041-0/+74
| | | | | | | | | | | Setting the mode for a zip entry is now as simple as "entry.setUnixMode(mode)", so do that. The test checks using the system's "zipinfo" command (from InfoZIP) that the mode has been recorded correctly on systems that happen to have a "zipinfo" command, using org.junit.Assume to distinguish them. Change-Id: I4236c102fd76f18d01b2dc926eeb9b9fa11a61b7
* Add basic "jgit add" testsJonathan Nieder2012-11-292-0/+116
| | | | | Change-Id: I056c2556c7db98bf57e2527dec11af7c3daf472a Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Add "jgit archive" tool that writes a tree as a ZIP fileJonathan Nieder2012-11-161-0/+175
| | | | | | | | | | | | | | | | | | | | | | | C Git's "git archive" command represents a tree object using a standard archival format like tar, zip, or tgz, ready for consumption by other, git-unaware users or tools. Add a bare-bones analagous "jgit archive" command to show what is possible, supporting only ZIP format for now. It uses java.util.zip which is not aware of the InfoZIP extensions for representing symlinks and file permissions, so symlinks, executable files, and submodule entries are represented as plain text files. Making this functionality available from the library, improving handling of special entries, and support for other output formats are left for later patches. Ultimately the intent is to offer a TreeArchiveStream class for use by web frontends like Gitiles to offer "download as zip/tgz/txz" links and use by, for example, code search tools to get easy access to the content of git tree objects. Test with "jgit archive my-favorite-tree >out.zip". Change-Id: Ib590f173ceff3df4b58493cecccd6b9a1b355e3d
* Allow commandline tests to use raw outputJonathan Nieder2012-11-161-4/+11
| | | | | | | | | | | | | | | | | | | | | Introduce a new CLIGitCommand.rawExecute() helper that behaves just like execute() except that instead of processing its output it returns it raw. So now you can do final byte[] expect = { 0, 1, 2, 3 }; final byte[] actual = CLIGitCommand.rawExecute( "git show HEAD:goo.raw", db); assertArrayEquals(expect, actual); to test the output from "git show HEAD:goo.raw" without being distracted by encoding issues. Noticed while writing tests for a new "jgit archive" command that writes its output in ZIP format. Change-Id: I2fe6020a537975d0ccf414b7125d85d6cd86898c
* Add reflog command to JGit CLITomasz Zarna2012-11-161-0/+80
| | | | | | Bug: 394497 Change-Id: Ib8bc1d9fd789d22fe5f10e03068a11cfdd3e46eb Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Harmonize the JDT settings within JGitRobin Rosenberg2012-11-163-7/+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>
* Add support for --no-ff while mergingTomasz Zarna2012-11-161-2/+57
| | | | | | Bug: 394432 Change-Id: I373128c0ba949f9b24248874f77f3d68b50ccfd1 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Add a test for org.eclipse.jgit.pgm.TagTomasz Zarna2012-11-151-0/+73
| | | | | | | | The test checks if an error is thrown when trying to create the same tag for the second time. Change-Id: I4ed2f6c997587f0ea23bd26a32fb64a2d48a980e Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Do not fail when checking out HEADTomasz Zarna2012-11-151-3/+20
| | | | | Change-Id: I99f5467477ed53101121a5a5d8a0910c55758401 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Prefix an abnormal CLI command termination with 'fatal:'Tomasz Zarna2012-11-153-4/+6
| | | | | Change-Id: I3d257666c6fbed7b238c575808f73ec518e811b9 Signed-off-by: Chris Aniszczyk <zx@twitter.com>
* Add --squash option to org.eclipse.jgit.pgm.MergeTomasz Zarna2012-10-071-13/+43
| | | | Change-Id: Ifd20b6f4731cfa71319145cac7b464aa53db18b8
* Prepare 2.2.0 buildsMatthias Sohn2012-09-192-12/+12
| | | | | Change-Id: I386ba70541d644e58661d26713b309371e0f9257 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Add tests for output result of merging -- org.eclipse.jgit.pgm.MergeTomasz Zarna2012-09-172-0/+94
| | | | Change-Id: I888c7e80503b869d65a9617e6a07e01d1ff5f197
* Check for write errors in standard out and exit with errorRobin Rosenberg2012-09-162-8/+5
| | | | | | | | | | | | | The underlying problem is that System.out is a PrintWriter and as such it does not throw exceptions on error, but rather just sets a flag and continues. This changes replaces the use of System.out with a PrintWriter-like writer that does not catch error, but instead throw them to the caller. Bug: 366243 Change-Id: I44405edc4416e943b87f09a0f6ed041c6c51b046
* Added new Status CLI command 'jgit status'Robin Rosenberg2012-09-093-0/+235
| | | | | | | | | | | | | This is a first basic implementation that displays current branch and list of files of various status, but isn't as refined as its native counterpart (e.g. does not say if we're ahead or behind the remote). It's been helpful in the diagnostic of bug #347885. Bug: 348318 CQ: 6769 Change-Id: Ifc35da608fbba652524c1b5b522e3c0d5369ad5e Signed-off-by: François Rey <eclipse.org@francois.rey.name> Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
* Output result of switching branch -- o.e.jgit.pgm.CheckoutTomasz Zarna2012-09-053-0/+109
| | | | Change-Id: I9829950b686ce3b8c70b8f7a1774d5e2b55cd00a Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Set core.precomposeunicode to true when creating repository on MacRobin Rosenberg2012-08-221-5/+14
| | | | | | | | | Java has no option but to use precomposed Unicode, so we should state that when creating a new repository. Not that Java will use precomposed unicode regardless of this setting, but this reduces the risk of incompatibility with C Git. Change-Id: I3779b75f76d2e2061c836cbc9b4b7c2ae0cf18f4
* In org.eclipse.jgit.pgm.ConfigTest expect core.filemode=false on WindowsTomasz Zarna2012-06-161-8/+10
| | | | Change-Id: I8f8ae7a8bc0793643184bc0e7afa9f4e2c5ff1a1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare 2.1.0 buildsMatthias Sohn2012-06-142-9/+9
| | | | Change-Id: I4aad3efdd435d8d5eb53c84a8d38132acce97c25 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Prepare post v2.0.0.201206130900-r buildsMatthias Sohn2012-06-142-2/+2
| | | | Change-Id: I51b1bbed35288c5285b3d6860efba97d58de5a1c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* JGit v2.0.0.201206130900-rv2.0.0.201206130900-rMatthias Sohn2012-06-132-2/+2
| | | | | Change-Id: I685e09b3e37d68614df1b5cc5f687a65cd6eb82d Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Do not set core.autocrlf when creating repoRobin Rosenberg2012-06-121-7/+8
| | | | | | | | | | | | core.autorlf defaults to false, but can be set in the user or "system" config files. Note that EGit/JGit may not know where the "system" config file is located. Also fix pgm's ConfigTest which depends on default repository configuration. Bug: 382067 Change-Id: I2c698a76e30d968e7f351b4f5a2195f0b124f62f 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>
* 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>
* Add config --list command to pgmTomasz Zarna2012-05-231-0/+70
| | | | | | | Currently, only --list option is supported with --global, --system, --local and --file switches. Change-Id: I9b179b162996520e95c4e001dccd65c566a4bd27 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Allow to write tests with CLI syntaxTomasz Zarna2012-04-1821-0/+1163
| | | | | | | CQ: 6385 Bug: 365444 Change-Id: I2d5164cd92429673fe3c37e9f5f9bc565192cc12 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Revert "Allow to write tests with CLI syntax"Matthias Sohn2012-03-2321-1163/+0
| | | | | | | | | This reverts commit bf845c126d53f07de103e03b68ddb7f24014cee5 since this change needs to go through a formal IP review and Chris missed to file a CQ for that. Change-Id: I303515d78116f0591a2911dbfb9f857738f086a9 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Allow to write tests with CLI syntaxTomasz Zarna2012-03-2221-0/+1163
Bug: 365444 Change-Id: I86f382913bc47665c5b9a2827b878e7dbedce7b1 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>