Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
2005-07-11 Catalin Marinas <catalin.marinas@gmail.com>
2005-07-11 Catalin Marinas <catalin.marinas@gmail.com>
+ * stgit/main.py (__resolved): Run git-update-cache for the
+ resolved files
+
* gitmergeonefile.py: Fix the os.rename exception occurring when
the checkout directory is not present
* gitmergeonefile.py: Fix the os.rename exception occurring when
the checkout directory is not present
if os.system('git-update-cache --remove -- %s' % f) != 0:
raise GitException, 'Unable to remove %s' % f
if os.system('git-update-cache --remove -- %s' % f) != 0:
raise GitException, 'Unable to remove %s' % f
+def update_cache(files):
+ """Update the cache information for the given files
+ """
+ for f in files:
+ if os.path.exists(f):
+ os.system('git-update-cache -- %s' % f)
+ else:
+ os.system('git-update-cache --remove -- %s' % f)
+
def commit(message, files = [], parents = [], allowempty = False,
author_name = None, author_email = None, author_date = None,
committer_name = None, committer_email = None):
def commit(message, files = [], parents = [], allowempty = False,
author_name = None, author_email = None, author_date = None,
committer_name = None, committer_email = None):
def __resolved(filename):
def __resolved(filename):
+ git.update_cache([filename])
for ext in ['.local', '.older', '.remote']:
fn = filename + ext
if os.path.isfile(fn):
for ext in ['.local', '.older', '.remote']:
fn = filename + ext
if os.path.isfile(fn):