def diff(files = [], rev1 = 'HEAD', rev2 = None, out_fd = None):
"""Show the diff between rev1 and rev2
"""
- os.system('git-update-cache --refresh > /dev/null')
if rev2:
diff_str = _output(['git-diff-tree', '-p', rev1, rev2] + files)
else:
+ os.system('git-update-cache --refresh > /dev/null')
diff_str = _output(['git-diff-cache', '-p', rev1] + files)
if out_fd:
"""Return the diffstat between rev1 and rev2
"""
- os.system('git-update-cache --refresh > /dev/null')
p=popen2.Popen3('git-apply --stat')
diff(files, rev1, rev2, p.tochild)
p.tochild.close()
def files(rev1, rev2):
"""Return the files modified between rev1 and rev2
"""
- os.system('git-update-cache --refresh > /dev/null')
str = ''
for line in _output_lines('git-diff-tree -r %s %s' % (rev1, rev2)):
return str.rstrip()
+def barefiles(rev1, rev2):
+ """Return the files modified between rev1 and rev2, without status info
+ """
+
+ str = ''
+ for line in _output_lines('git-diff-tree -r %s %s' % (rev1, rev2)):
+ str += '%s\n' % line.rstrip().split(' ',4)[-1].split('\t',1)[-1]
+
+ return str.rstrip()
+
def checkout(files = [], tree_id = None, force = False):
"""Check out the given or all files
"""