-"""Function/variables commmon to all the commands
+"""Function/variables common to all the commands
"""
__copyright__ = """
return read_string(series.get_base_file())
# anything else failed
- return git.rev_parse(rev)
+ return git.rev_parse(rev + '^{commit}')
def check_local_changes():
if git.local_changes():
if not crt_series.head_top_equal():
raise CmdException, \
'HEAD and top are not the same. You probably committed\n' \
- ' changes to the tree ouside of StGIT. If you know what you\n' \
+ ' changes to the tree outside of StGIT. If you know what you\n' \
' are doing, use the "refresh -f" command'
def check_conflicts():
- if os.path.exists(os.path.join(git.base_dir, 'conflicts')):
+ if os.path.exists(os.path.join(git.get_base_dir(), 'conflicts')):
raise CmdException, 'Unsolved conflicts. Please resolve them first'
def print_crt_patch(branch = None):
if conflicts:
for filename in conflicts:
resolved(filename, reset)
- os.remove(os.path.join(git.base_dir, 'conflicts'))
+ os.remove(os.path.join(git.get_base_dir(), 'conflicts'))
def name_email(address):
"""Return a tuple consisting of the name and email parsed from a