Daniel Rodríguez Troitiño
8d9f59edec
Implement Branch.remote_name.
2013-05-27 21:33:11 +02:00
Daniel Rodríguez Troitiño
761d23bb2d
Implement Branch.branch_name.
2013-05-26 21:53:29 +02:00
Daniel Rodríguez Troitiño
bf060aeceb
Implement Branch.rename.
2013-05-26 21:53:16 +02:00
Daniel Rodríguez Troitiño
2f08236aec
Implement Branch.is_head.
2013-05-26 17:50:32 +02:00
Daniel Rodríguez Troitiño
79f1e54153
Implement Branch.delete.
2013-05-26 17:50:02 +02:00
Daniel Rodríguez Troitiño
3b4c8fe4bd
Implement Repository.create_branch.
2013-05-26 17:49:05 +02:00
Daniel Rodríguez Troitiño
7b5adf1da2
Implement Repository.listall_branches.
2013-05-26 17:47:23 +02:00
Daniel Rodríguez Troitiño
1062ab638b
Implement Repository.lookup_branch. Constants for local and remote branches.
2013-05-26 17:43:28 +02:00
J. David Ibáñez
0c86307eb5
Coding style: Silent pep8
2013-05-26 14:39:12 +02:00
J. David Ibáñez
19c9a895d5
tests: find out test modules automatically
2013-05-26 13:49:08 +02:00
J. David Ibáñez
74a1fdab60
Fixing coding style with the help of pep8 (wip)
2013-05-26 10:32:05 +02:00
J. David Ibáñez
c3335f92ee
tests: get nice error when test module is broken
2013-05-26 10:26:10 +02:00
J. David Ibáñez
f075aa3665
Fix some "errors" found by pyflakes
2013-05-24 21:34:10 +02:00
Nico von Geyso
77b5cdce5b
Refactored: get rid of type check for treeish_to_tree in Diff
2013-05-20 14:58:54 +02:00
Nico von Geyso
b4656cc99c
Merge remote-tracking branch 'upstream/master' into features/diff_refactoring
...
Conflicts:
src/tree.c
2013-05-18 15:48:27 +02:00
Nico von Geyso
0fc7a4fbad
Refactored Index.diff() into Index.diff_to_tree()/diff_to_workdir()
2013-05-18 15:29:28 +02:00
Nico von Geyso
196d0595b0
Added: Repository.diff() - porcelain method similiar to
2013-05-18 14:48:05 +02:00
Bernardo Heynemann
a831b8b6f6
Since I was PEP8-ing my tests, I decided to do it for the whole file.
2013-05-16 10:04:17 -03:00
Bernardo Heynemann
3dd998c061
Supporting clone in pygit2
2013-05-15 18:15:00 -03:00
Nico von Geyso
8c76a14a99
added reorder trees possibility for diff_to_tree()
2013-05-09 14:40:45 +02:00
Nico von Geyso
ae6cd8a0ca
refactoring Tree.diff() into seperate methods
...
* Tree.diff_to_tree()
* Tree.diff_to_workdir()
* Tree.diff-to_index()
2013-05-07 14:06:20 +02:00
Nico von Geyso
2d812b671a
fixed line_origin in Hunks
...
every line in a hunk has a origin like '+','-' or ' '.
2013-05-07 13:23:17 +02:00
J. David Ibáñez
d5e28c0f96
Merge remote-tracking branch 'cholin/features/diff_line_origin'
2013-05-06 19:36:57 +02:00
Nico von Geyso
b7b9728115
support for diffing the empty tree
...
added missing support for diffing tree-to-tree with NULL as argument.
(see issue #222 )
2013-05-06 14:41:08 +02:00
Nico von Geyso
f572a8fb00
use chars like +,-,... for diff_delta_t in Patch.status
2013-05-06 13:29:37 +02:00
Nico von Geyso
f972d99d5f
Added line origins for Hunks in Pygit2.Patch
2013-05-06 13:22:48 +02:00
J. David Ibáñez
974f16ca69
Re-work the checkout API
...
New API:
Repository.head = refname
Repository.checkout_head(strategy)
Repository.checkout_index(strategy)
Repository.checkout_tree(treeish, strategy)
Changed API:
# Before
Repository.checkout(strategy=GIT_CHECKOUT_SAFE_CREATE, reference=None,
head=False)
# Now
Repository.checkout(refname=None, strategy=GIT_CHECKOUT_SAFE_CREATE)
2013-05-05 21:45:39 +02:00
J. David Ibáñez
9c0a82876b
Merge remote-tracking branch 'xtao/merge-base'
2013-05-05 00:40:21 +02:00
J. David Ibáñez
723cae1186
Fix tests for Python 2.6
2013-05-04 00:40:32 +02:00
J. David Ibáñez
42aed417d4
Add TreeBuilder.get and remove TreeEntry.to_object
...
Also, check errors from git_tree_entry_dup
2013-05-04 00:31:03 +02:00
XTao
3474dca78f
Add merge-base method.
2013-05-04 05:45:03 +08:00
J. David Ibáñez
f5082b320b
Add "len(treebuider)" to the API
2013-05-03 23:31:43 +02:00
J. David Ibáñez
b12a596068
Remove "del index[xxx]" from the API
...
Use "index.remove(xxx)" instead.
2013-05-02 20:28:14 +02:00
J. David Ibáñez
e186c06470
Merge remote-tracking branch 'bors/v0.18.1'
...
API change:
- Rename Repository.create_blob_fromfile to Repository.create_blob_fromworkdir
2013-05-01 20:37:00 +02:00
Hervé Cauwelier
61c330f57d
split create_blob_fromfile into fromworkdir and fromdisk to match libgit2
...
Both create loose blobs but fromworkdir assert the file is inside the working directory.
2013-05-01 13:05:30 +02:00
J. David Ibáñez
67417c7f56
create_reference, drop the symbolic param ( #213 )
...
Now we figure out whether it is a direct or symbolic reference based on
the type and value of the target. This guessing will fail in very very
rare situations, for that we still have the explicit lower level API.
2013-04-27 11:39:37 +02:00
J. David Ibáñez
979cda9a9a
refs: improve API ( #213 )
...
Changes:
- Reference.oid and Reference.hex removed
- Now Reference.target can be assigned an oid
2013-04-21 10:46:04 +02:00
J. David Ibáñez
fd67685500
The repository iterator now returns Oids, not hexs
2013-04-20 09:38:12 +02:00
J. David Ibáñez
a3a928a513
Now Reference.target returns an Oid, not hex
...
If the reference is direct, of course.
2013-04-20 09:03:13 +02:00
J. David Ibáñez
7261f4e1e7
Now Note.oid returns an Oid object, not an hex
2013-04-20 08:48:03 +02:00
J. David Ibáñez
94f44feb22
Fix unit tests with Python 2.6
2013-04-18 23:59:34 +02:00
J. David Ibáñez
4cf1fc2371
Make Oid hashable
2013-04-18 23:57:19 +02:00
J. David Ibáñez
f74a211f14
oid: now only accept Oid or hex, not raw
...
Every method that takes an oid has changed what it accepts.
Before it was (in both Python 2 and 3):
- An Oid object
- An hex oid, represented as a unicode string
- A raw oid, represented as a bytes string
Now the behaviour is different between Python 2 and 3.
Now in Python 2 we take:
- An Oid object
- An hex oid, represented as a bytes or unicode string
Now in Python 3 we take:
- An Oid object
- An hex oid, represented as a unicode string
We have dropt direct support for raw strings. To use a raw string first
build an Oid object: oid = Oid(raw=raw)
We have also dropt support for short raw oids. The Oid constructor takes
full oids, if passed short oids the behavior is undefined.
2013-04-18 20:32:30 +02:00
J. David Ibáñez
571fe8ac44
Merge branch 'master' into oid
...
Conflicts:
test/test_repository.py
2013-04-18 18:30:50 +02:00
J. David Ibáñez
611e979113
Now Repository.head returns a reference ( #203 )
...
Now Repository.head behaves like libgit2's git_repository_head, it
returns the resolved reference. These two lines are equivalent:
ref = repo.head
ref = repo.lookup_reference('HEAD').resolve()
Before it returned a commit.
2013-04-17 08:16:43 +02:00
J. David Ibáñez
a9c9f25ce2
oid: support rich comparisons (less than, etc.)
2013-04-14 14:08:46 +02:00
J. David Ibáñez
bd54d28157
Fix for Python3, and add Oid cmp tests
2013-04-14 13:50:09 +02:00
J. David Ibáñez
406c317572
Return Oid wherever we returned raw oid (bytes) before
...
Changes:
- Return Oid wherever we returned raw oid (bytes) before
- Now py_str_to_git_oid accepts Oid objects
- Add ability to compare two Oid objects
2013-04-14 12:26:22 +02:00
J. David Ibáñez
f8544cc514
Add Oid type
2013-04-13 13:04:52 +02:00
J. David Ibáñez
c3ca27fa72
Merge branch 'master' into next
...
Conflicts:
include/pygit2/types.h
src/oid.c
2013-03-23 15:54:12 +01:00