Show More
@@ -1166,6 +1166,11 b' def b85diff(to, tn):' | |||
|
1166 | 1166 | ret.append('\n') |
|
1167 | 1167 | return ''.join(ret) |
|
1168 | 1168 | |
|
1169 | def _addmodehdr(header, omode, nmode): | |
|
1170 | if omode != nmode: | |
|
1171 | header.append('old mode %s\n' % omode) | |
|
1172 | header.append('new mode %s\n' % nmode) | |
|
1173 | ||
|
1169 | 1174 | def diff(repo, node1=None, node2=None, match=None, |
|
1170 | 1175 | fp=None, changes=None, opts=None): |
|
1171 | 1176 | '''print diff of changes to files between two nodes, or node and |
@@ -1230,17 +1235,12 b' def diff(repo, node1=None, node2=None, m' | |||
|
1230 | 1235 | tn = getfilectx(f, ctx2).data() |
|
1231 | 1236 | a, b = f, f |
|
1232 | 1237 | if opts.git: |
|
1233 | def addmodehdr(header, omode, nmode): | |
|
1234 | if omode != nmode: | |
|
1235 | header.append('old mode %s\n' % omode) | |
|
1236 | header.append('new mode %s\n' % nmode) | |
|
1237 | ||
|
1238 | 1238 | if f in added: |
|
1239 | 1239 | mode = gitmode[ctx2.flags(f)] |
|
1240 | 1240 | if f in copy: |
|
1241 | 1241 | a = copy[f] |
|
1242 | 1242 | omode = gitmode[man1.flags(a)] |
|
1243 | addmodehdr(header, omode, mode) | |
|
1243 | _addmodehdr(header, omode, mode) | |
|
1244 | 1244 | if a in removed and a not in gone: |
|
1245 | 1245 | op = 'rename' |
|
1246 | 1246 | gone[a] = 1 |
@@ -1263,7 +1263,7 b' def diff(repo, node1=None, node2=None, m' | |||
|
1263 | 1263 | else: |
|
1264 | 1264 | omode = gitmode[man1.flags(f)] |
|
1265 | 1265 | nmode = gitmode[ctx2.flags(f)] |
|
1266 | addmodehdr(header, omode, nmode) | |
|
1266 | _addmodehdr(header, omode, nmode) | |
|
1267 | 1267 | if util.binary(to) or util.binary(tn): |
|
1268 | 1268 | dodiff = 'binary' |
|
1269 | 1269 | r = None |
General Comments 0
You need to be logged in to leave comments.
Login now