comparison mercurial/patch.py @ 5033:1b07668b8cc3

patch: remove unused parameter from b85diff
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 30 Jul 2007 20:49:08 -0700
parents 4106dde15aed
children a675f6d5d069
comparison
equal deleted inserted replaced
5032:6dbd40b6307c 5033:1b07668b8cc3
1055 files.extend([r for r in removes if r not in files]) 1055 files.extend([r for r in removes if r not in files])
1056 files.sort() 1056 files.sort()
1057 1057
1058 return files 1058 return files
1059 1059
1060 def b85diff(fp, to, tn): 1060 def b85diff(to, tn):
1061 '''print base85-encoded binary diff''' 1061 '''print base85-encoded binary diff'''
1062 def gitindex(text): 1062 def gitindex(text):
1063 if not text: 1063 if not text:
1064 return '0' * 40 1064 return '0' * 40
1065 l = len(text) 1065 l = len(text)
1242 dodiff = 'binary' 1242 dodiff = 'binary'
1243 r = None 1243 r = None
1244 header.insert(0, 'diff --git a/%s b/%s\n' % (a, b)) 1244 header.insert(0, 'diff --git a/%s b/%s\n' % (a, b))
1245 if dodiff: 1245 if dodiff:
1246 if dodiff == 'binary': 1246 if dodiff == 'binary':
1247 text = b85diff(fp, to, tn) 1247 text = b85diff(to, tn)
1248 else: 1248 else:
1249 text = mdiff.unidiff(to, date1, 1249 text = mdiff.unidiff(to, date1,
1250 # ctx2 date may be dynamic 1250 # ctx2 date may be dynamic
1251 tn, util.datestr(ctx2.date()), 1251 tn, util.datestr(ctx2.date()),
1252 f, r, opts=opts) 1252 f, r, opts=opts)