##// END OF EJS Templates
copies: remove most early returns from pathcopies() and _forwardcopies()...
Martin von Zweigbergk -
r42795:a48f6f18 default
parent child Browse files
Show More
@@ -326,8 +326,10 b' def _forwardcopies(a, b, match=None):'
326 if b.rev() is None:
326 if b.rev() is None:
327 cm = _committedforwardcopies(a, b.p1(), match)
327 cm = _committedforwardcopies(a, b.p1(), match)
328 # combine copies from dirstate if necessary
328 # combine copies from dirstate if necessary
329 return _chainandfilter(a, b, cm, _dirstatecopies(b._repo, match))
329 copies = _chainandfilter(a, b, cm, _dirstatecopies(b._repo, match))
330 return _committedforwardcopies(a, b, match)
330 else:
331 copies = _committedforwardcopies(a, b, match)
332 return copies
331
333
332 def _backwardrenames(a, b, match):
334 def _backwardrenames(a, b, match):
333 if a._repo.ui.config('experimental', 'copytrace') == 'off':
335 if a._repo.ui.config('experimental', 'copytrace') == 'off':
@@ -366,15 +368,17 b' def pathcopies(x, y, match=None):'
366 if y.rev() is None and x == y.p1():
368 if y.rev() is None and x == y.p1():
367 # short-circuit to avoid issues with merge states
369 # short-circuit to avoid issues with merge states
368 return _dirstatecopies(repo, match)
370 return _dirstatecopies(repo, match)
369 return _forwardcopies(x, y, match=match)
371 copies = _forwardcopies(x, y, match=match)
370 if a == y:
372 elif a == y:
371 if debug:
373 if debug:
372 repo.ui.debug('debug.copies: search mode: backward\n')
374 repo.ui.debug('debug.copies: search mode: backward\n')
373 return _backwardrenames(x, y, match=match)
375 copies = _backwardrenames(x, y, match=match)
374 if debug:
376 else:
375 repo.ui.debug('debug.copies: search mode: combined\n')
377 if debug:
376 return _chainandfilter(x, y, _backwardrenames(x, a, match=match),
378 repo.ui.debug('debug.copies: search mode: combined\n')
377 _forwardcopies(a, y, match=match))
379 copies = _chainandfilter(x, y, _backwardrenames(x, a, match=match),
380 _forwardcopies(a, y, match=match))
381 return copies
378
382
379 def mergecopies(repo, c1, c2, base):
383 def mergecopies(repo, c1, c2, base):
380 """
384 """
General Comments 0
You need to be logged in to leave comments. Login now