From 968ffb2c2e5c6066a2b01ad2a0833c2800880d46 Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Wed, 24 Nov 2010 21:33:36 +0100 Subject: Adjusted all Head.create calls to set a logmessage similar to the one git uses --- repo/fun.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'repo/fun.py') 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)) -- cgit v1.2.3