diff options
author | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 21:33:36 +0100 |
---|---|---|
committer | Sebastian Thiel <byronimo@gmail.com> | 2010-11-24 21:33:36 +0100 |
commit | 968ffb2c2e5c6066a2b01ad2a0833c2800880d46 (patch) | |
tree | a5f0b7417f39364d83409edf4d382c6a8c36ff49 /repo/fun.py | |
parent | 3175b5b21194bcc8f4448abe0a03a98d3a4a1360 (diff) | |
download | gitpython-968ffb2c2e5c6066a2b01ad2a0833c2800880d46.tar.gz |
Adjusted all Head.create calls to set a logmessage similar to the one git uses
Diffstat (limited to 'repo/fun.py')
-rw-r--r-- | repo/fun.py | 6 |
1 files changed, 4 insertions, 2 deletions
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)) |