457 Commits

Author SHA1 Message Date
J. David Ibáñez
e81f45c4c6 Merge remote-tracking branch 'nhynes/br-is-co' 2017-07-05 23:20:15 +02:00
Carlos Martín Nieto
e41f71f458 Update for libgit2 v0.26
The API isn't changing as much recently so all we needed to adjust was the
proper capitalisation of the error string.
2017-07-03 15:40:29 +02:00
Mark Adams
c6305a062b revert: Add support for git_revert_commit via Repository.revert_commit()
This change adds `Repository.revert_commit()` which wraps around
`git_revert_commit` which will return an `Index` with the appropriate
changes to revert the specified commit.

Fixes #710
2017-06-05 16:08:39 -05:00
Tamir Bahar
3818555e14 Added Repository.references accessor. 2017-04-21 08:51:41 +00:00
Tamir Bahar
d14438725e Added basic Repository.branches implementation. 2017-04-17 23:02:58 +03:00
J. David Ibáñez
f37cf25b8e Fix warning, and coding style a bit 2017-04-08 16:56:04 +02:00
Nick Hynes
1fadc2eae0 Wrap branch_is_checked_out 2017-03-29 18:14:46 -04:00
Nick Hynes
630d905e73 Add stash tests 2017-03-27 17:10:45 -04:00
J. David Ibáñez
354d56a95c Update copyright years 2017-03-22 21:15:34 +01:00
Jason Ziglar
8327e1bee3 Add test for init_submodules() and update_submodules() 2017-03-22 11:23:17 -04:00
J. David Ibáñez
d622e87654 test options, avoid side effects
This makes tests in PR#692 to pass
2017-03-22 13:38:11 +01:00
Szucs Krisztian
6402302002 fixed cached memory tests 2016-12-03 14:01:39 +01:00
Szucs Krisztian
77f0585645 Added mwindow_mapped_limit, cached_memory, enable_caching, cache_max_size, cache_object_limit options 2016-12-03 13:52:19 +01:00
Matthias Bartelmeß
825f3e45bd add slashes to URL if needed 2016-10-21 06:31:19 +03:00
Matthias Bartelmess
00dd78bf1b Fix windows tests 2016-10-21 06:06:40 +03:00
Matthias Bartelmeß
cdd57b2c0f make sure the repo object will be collected before the repo is removed 2016-07-22 10:46:11 +02:00
J. David Ibáñez
30f539ff35 Merge remote-tracking branch 'seanfarley/smf/pygit2-upgrade' 2016-06-02 16:18:07 +02:00
Carlos Martín Nieto
df30f9213f Remove checks for obsolete methods
This is not how you define your callbacks, so this test isn't testing
for anything useful.
2016-04-29 13:19:32 +02:00
Carlos Martín Nieto
c1d831c98a Update to libgit2 v0.24 2016-03-04 17:08:55 +01:00
Thom Wiggers
bc424e342f
Add unit tests for bytes and unicode Repositories
Add unit test for bytes repository paths
Add a unicode path test for Repositories
2016-02-28 12:32:41 +01:00
Thom Wiggers
3470fbc1c6
Add unit test for bytes repository paths 2016-02-27 23:44:05 +01:00
Chason Chaffin
a5cfea21a7 Fix broken binary diff test
In a recent commit to libgit2, binary diffs were changed to have a
trailing empty line. This broke a test in test_diff because it compares
it directly against the string. I've added the extra line to the
expected output and the test now passes correctly.
2015-12-15 17:20:50 -08:00
Noah Fontes
99dfce9ab8 Add support for Repository.describe(...). 2015-12-05 23:22:37 -08:00
J. David Ibáñez
7a8474cd44 Change Signature default encoding to UTF-8
Fixes #581
2015-11-15 19:46:50 +01:00
J. David Ibáñez
13f4ddec1d Fix create_blob_fromiobase with Python 2.7 2015-10-25 19:58:48 +01:00
J. David Ibáñez
f92d38e25f Merge remote-tracking branch 'frutiger/blob_from_iobase' into blob_from_io_base 2015-10-25 13:04:49 +01:00
J. David Ibáñez
70edbf256a Update copyright years 2015-10-11 18:48:59 +02:00
J. David Ibáñez
9db8737364 Update changelog 2015-10-11 11:06:22 +02:00
Nicolas Dandrimont
2b083a1509 Add _name attribute to TreeEntry
This mirrors the _message attribute for Tag, which gives you the raw
bytes from the entry name. Useful to parse repos where some filenames
aren't encoded as utf-8, such as https://github.com/wuts/earthquake.
2015-09-28 18:24:48 +02:00
Carlos Martín Nieto
ac2e363d04 Allow setting credentials and certificate in callback ctor
This allows for a less verbose way of setting one-liners as these
callbacks.
2015-09-27 02:43:50 +02:00
Carlos Martín Nieto
ab97c08f72 Make clone take the callbacks object
This lets use the same callbacks for fetch and clone; it also fills in
the callbacks which the clone function did not support.
2015-09-27 02:43:50 +02:00
Carlos Martín Nieto
7b97ade6ce Move remote callbacks to use a class for callbacks
This represents what's going on much better than the remnants from the
older methods. What we do is pass a list of callbacks to libgit2 for it
to call, and they are valid for a single operation, not for the remote
itself.

This should also make it easier to re-use callbacks which have already
been set up.
2015-09-27 02:43:50 +02:00
Guille -bisho-
802976535a Add support for GIT_DIFF_SHOW_BINARY
Adding the binary diff flag GIT_DIFF_SHOW_BINARY to pygit2.
libgit2 0.23.0 already supports this constant to be used in diff
flags and produces properly formated binary diffs.
2015-09-23 16:30:19 -07:00
J. David Ibáñez
ade211de60 tests: fix warning 2015-09-10 11:30:37 +02:00
Nicolas Dandrimont
ac7738bbb3 Add type attribute to TreeEntry
This allows complete iteration and rebuilding of a tree without hitting
the object store for every entry.
2015-09-09 21:41:00 +02:00
Carlos Martín Nieto
4f00dad086 Don't throw if there is no merge base
Not finding a merge base between two commits isn't an exceptional case,
it's just a different result.
2015-07-31 10:50:15 +02:00
Carlos Martín Nieto
81520c9c62 Update to libgit2 v0.23 2015-07-06 18:49:20 +02:00
Carlos Martín Nieto
74b81bf180 Add support for querying attributes
Expose a method in the repository which allows querying an attribute for
a file and converts the result to the python equivalent.
2015-05-20 20:56:40 +02:00
J. David Ibáñez
d63c2d4fd7 Merge remote-tracking branch 'carlos/diff-stats' 2015-04-29 10:47:21 +02:00
Carlos Martín Nieto
42d81e33ec Add DiffStats
This wraps git_diff_stats and can be retrieved through a Diff. It
includes a formatting method.
2015-04-28 16:21:56 +02:00
Carlos Martín Nieto
0ce4d3b9a8 Allow creating a remote with a particular fetch refspec
This makes it a lot more convenient to create a remote and override the
fetch refspec it gets created with.
2015-04-28 13:39:15 +02:00
Carlos Martín Nieto
3091c7aa87 Remove mistaken submodule in the tree
The path test/data/testrepo was mistakenly added as a submodule and the
error was not caught before merging. Remove this path as it should not
exist on the repo.
2015-04-28 01:55:20 +02:00
Patrick Steinhardt
cf56a695f9 Fix error when merging files with unicode content.
When merging index entries where the corresponding files contain Unicode
codepoints an error is thrown. Decode the C string using UTF-8 to fix the issue
and adjust the test case for merging files to contain umlauts to catch such
errors.
2015-03-19 07:48:18 +01:00
J. David Ibáñez
8b05b296c2 New DiffDelta.status_char() 2015-03-16 19:12:20 +01:00
Carlos Martín Nieto
c099655fc0 TreeEntry: compare ids when two entrie sort equally
The function we were using `git_tree_entry_cmp()` is only meant for
git-compatible sorting in a tree and thus does not take the id into
account. This is however important in order to keep value equality. In
order to avoid issues with assymetry, we compare the id any time when
two entries are equal according to their position in a tree.
2015-03-15 00:15:15 +01:00
J. David Ibáñez
f5485bb86f Merge remote-tracking branch 'pks/bare-conflicts' 2015-03-13 10:09:31 +01:00
J. David Ibáñez
318c6a8bee tests: fix warning, do not use deprecated assertEquals 2015-03-13 09:48:28 +01:00
Patrick Steinhardt
367084e3c1 Implement merging of index entries.
This allows us to generate a textual diff of conflicting files in
bare repositories by performing a merge on the index followed by
repo.merge_file_from_index on the resulting index entries.
2015-03-11 16:08:13 +01:00
Patrick Steinhardt
d35ecf945a Add tests for submodules. 2015-03-06 17:48:29 +01:00
J. David Ibáñez
c7609efc4b Merge remote-tracking branch 'rnicoll/cherrypick' 2015-02-14 20:27:17 +01:00