##// END OF EJS Templates
patch: allow copy information to be passed in...
Henrik Stuart -
r29422:40d53d4b default
parent child Browse files
Show More
@@ -2184,7 +2184,7 b' def difffeatureopts(ui, opts=None, untru'
2184 2184 return mdiff.diffopts(**buildopts)
2185 2185
2186 2186 def diff(repo, node1=None, node2=None, match=None, changes=None, opts=None,
2187 losedatafn=None, prefix='', relroot=''):
2187 losedatafn=None, prefix='', relroot='', copy=None):
2188 2188 '''yields diff of changes to files between two nodes, or node and
2189 2189 working directory.
2190 2190
@@ -2203,7 +2203,10 b' def diff(repo, node1=None, node2=None, m'
2203 2203 display (used for subrepos).
2204 2204
2205 2205 relroot, if not empty, must be normalized with a trailing /. Any match
2206 patterns that fall outside it will be ignored.'''
2206 patterns that fall outside it will be ignored.
2207
2208 copy, if not empty, should contain mappings {dst@y: src@x} of copy
2209 information.'''
2207 2210
2208 2211 if opts is None:
2209 2212 opts = mdiff.defaultopts
@@ -2250,9 +2253,10 b' def diff(repo, node1=None, node2=None, m'
2250 2253 hexfunc = short
2251 2254 revs = [hexfunc(node) for node in [ctx1.node(), ctx2.node()] if node]
2252 2255
2253 copy = {}
2254 if opts.git or opts.upgrade:
2255 copy = copies.pathcopies(ctx1, ctx2, match=match)
2256 if copy is None:
2257 copy = {}
2258 if opts.git or opts.upgrade:
2259 copy = copies.pathcopies(ctx1, ctx2, match=match)
2256 2260
2257 2261 if relroot is not None:
2258 2262 if not relfiltered:
General Comments 0
You need to be logged in to leave comments. Login now