Allow tag objects to be passed on the command line
[stgit] / stgit / commands / common.py
index e437111..f7301da 100644 (file)
@@ -1,4 +1,4 @@
-"""Function/variables commmon to all the commands
+"""Function/variables common to all the commands
 """
 
 __copyright__ = """
@@ -81,7 +81,7 @@ def git_id(rev):
         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():
@@ -92,11 +92,11 @@ def check_head_top_equal():
     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):
@@ -130,7 +130,7 @@ def resolved_all(reset = 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