##// END OF EJS Templates
patch: remove useless copy, cleanup
Patrick Mezard -
r10467:16c68fd7 stable
parent child Browse files
Show More
@@ -1435,7 +1435,6 b' def diff(repo, node1=None, node2=None, m'
1435 copy = {}
1435 copy = {}
1436 if opts.git or opts.upgrade:
1436 if opts.git or opts.upgrade:
1437 copy = copies.copies(repo, ctx1, ctx2, repo[nullid])[0]
1437 copy = copies.copies(repo, ctx1, ctx2, repo[nullid])[0]
1438 copy = copy.copy()
1439
1438
1440 difffn = lambda opts, losedata: trydiff(repo, revs, ctx1, ctx2,
1439 difffn = lambda opts, losedata: trydiff(repo, revs, ctx1, ctx2,
1441 modified, added, removed, copy, getfilectx, opts, losedata)
1440 modified, added, removed, copy, getfilectx, opts, losedata)
@@ -1517,9 +1516,10 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1517 elif f in removed:
1516 elif f in removed:
1518 if opts.git:
1517 if opts.git:
1519 # have we already reported a copy above?
1518 # have we already reported a copy above?
1520 if f in copy and copy[f] in added and copyto[copy[f]] == f:
1519 if ((f in copy and copy[f] in added
1521 dodiff = False
1520 and copyto[copy[f]] == f) or
1522 elif f in copyto and copyto[f] in added and copy[copyto[f]] == f:
1521 (f in copyto and copyto[f] in added
1522 and copy[copyto[f]] == f)):
1523 dodiff = False
1523 dodiff = False
1524 else:
1524 else:
1525 header.append('deleted file mode %s\n' %
1525 header.append('deleted file mode %s\n' %
General Comments 0
You need to be logged in to leave comments. Login now