summaryrefslogtreecommitdiff
path: root/repo
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2010-11-24 22:53:24 +0100
committerSebastian Thiel <byronimo@gmail.com>2010-11-24 22:53:24 +0100
commitcf1d5bd4208514bab3e6ee523a70dff8176c8c80 (patch)
treed68f6529275838b9a962c4b76533e8445441af34 /repo
parent3175b5b21194bcc8f4448abe0a03a98d3a4a1360 (diff)
parent7da101ba9a09a22a85c314a8909fd23468ae66f0 (diff)
downloadgitpython-cf1d5bd4208514bab3e6ee523a70dff8176c8c80.tar.gz
Merge branch 'reflogintegration'
Diffstat (limited to 'repo')
-rw-r--r--repo/base.py4
-rw-r--r--repo/fun.py6
2 files changed, 6 insertions, 4 deletions
diff --git a/repo/base.py b/repo/base.py
index c8613878..e26da101 100644
--- a/repo/base.py
+++ b/repo/base.py
@@ -274,12 +274,12 @@ class Repo(object):
:param path: path to the tag reference, i.e. 0.1.5 or tags/0.1.5 """
return TagReference(self, path)
- def create_head(self, path, commit='HEAD', force=False, **kwargs ):
+ def create_head(self, path, commit='HEAD', force=False, logmsg=None ):
"""Create a new head within the repository.
For more documentation, please see the Head.create method.
:return: newly created Head Reference"""
- return Head.create(self, path, commit, force, **kwargs)
+ return Head.create(self, path, commit, force, logmsg)
def delete_head(self, *heads, **kwargs):
"""Delete the given heads
diff --git a/repo/fun.py b/repo/fun.py
index c523a3e1..7a5984d3 100644
--- a/repo/fun.py
+++ b/repo/fun.py
@@ -112,7 +112,9 @@ def rev_parse(repo, rev):
for details
:note: Currently there is no access to the rev-log, rev-specs may only contain
topological tokens such ~ and ^.
- :raise BadObject: if the given revision could not be found"""
+ :raise BadObject: if the given revision could not be found
+ :raise ValueError: If rev couldn't be parsed
+ :raise IndexError: If invalid reflog index is specified"""
# colon search mode ?
if rev.startswith(':/'):
@@ -193,7 +195,7 @@ def rev_parse(repo, rev):
try:
entry = ref.log_entry(revlog_index)
except IndexError:
- raise BadObject("Invalid revlog index: %i" % revlog_index)
+ raise IndexError("Invalid revlog index: %i" % revlog_index)
#END handle index out of bound
obj = Object.new_from_sha(repo, hex_to_bin(entry.newhexsha))