##// END OF EJS Templates
largefiles: stylistic cleanup of filemerge
Mads Kiilerich -
r20298:9d350fa0 default
parent child Browse files
Show More
@@ -417,26 +417,21 b' def overridemanifestmerge(origfn, repo, '
417 417 # Override filemerge to prompt the user about how they wish to merge
418 418 # largefiles. This will handle identical edits without prompting the user.
419 419 def overridefilemerge(origfn, repo, mynode, orig, fcd, fco, fca):
420 # Use better variable names here. Because this is a wrapper we cannot
421 # change the variable names in the function declaration.
422 fcdest, fcother, fcancestor = fcd, fco, fca
423 420 if not lfutil.isstandin(orig):
424 return origfn(repo, mynode, orig, fcdest, fcother, fcancestor)
425 else:
426 if not fcother.cmp(fcdest): # files identical?
427 return None
421 return origfn(repo, mynode, orig, fcd, fco, fca)
422
423 if not fco.cmp(fcd): # files identical?
424 return None
428 425
429 if repo.ui.promptchoice(
430 _('largefile %s has a merge conflict\nancestor was %s\n'
431 'keep (l)ocal %s or\ntake (o)ther %s?'
432 '$$ &Local $$ &Other') %
433 (lfutil.splitstandin(orig),
434 fca.data().strip(), fcd.data().strip(), fco.data().strip()),
435 0) == 0:
436 return 0
437 else:
438 repo.wwrite(fcdest.path(), fcother.data(), fcother.flags())
439 return 0
426 if repo.ui.promptchoice(
427 _('largefile %s has a merge conflict\nancestor was %s\n'
428 'keep (l)ocal %s or\ntake (o)ther %s?'
429 '$$ &Local $$ &Other') %
430 (lfutil.splitstandin(orig),
431 fca.data().strip(), fcd.data().strip(), fco.data().strip()),
432 0) == 1:
433 repo.wwrite(fcd.path(), fco.data(), fco.flags())
434 return 0
440 435
441 436 # Copy first changes the matchers to match standins instead of
442 437 # largefiles. Then it overrides util.copyfile in that function it
General Comments 0
You need to be logged in to leave comments. Login now