##// END OF EJS Templates
extdiff: move single file handling inside `not per-file` conditional...
Pulkit Goyal -
r45959:451e13cc default
parent child Browse files
Show More
@@ -456,23 +456,23 b' def diffrevs('
456 label1b = rev1b
456 label1b = rev1b
457 label2 = rev2
457 label2 = rev2
458
458
459 # If only one change, diff the files instead of the directories
459 if not opts.get(b'per_file'):
460 # Handle bogus modifies correctly by checking if the files exist
460 # If only one change, diff the files instead of the directories
461 if len(common) == 1:
461 # Handle bogus modifies correctly by checking if the files exist
462 common_file = util.localpath(common.pop())
462 if len(common) == 1:
463 dir1a = os.path.join(tmproot, dir1a, common_file)
463 common_file = util.localpath(common.pop())
464 label1a = common_file + rev1a
464 dir1a = os.path.join(tmproot, dir1a, common_file)
465 if not os.path.isfile(dir1a):
465 label1a = common_file + rev1a
466 dir1a = pycompat.osdevnull
466 if not os.path.isfile(dir1a):
467 if do3way:
467 dir1a = pycompat.osdevnull
468 dir1b = os.path.join(tmproot, dir1b, common_file)
468 if do3way:
469 label1b = common_file + rev1b
469 dir1b = os.path.join(tmproot, dir1b, common_file)
470 if not os.path.isfile(dir1b):
470 label1b = common_file + rev1b
471 dir1b = pycompat.osdevnull
471 if not os.path.isfile(dir1b):
472 dir2 = os.path.join(dir2root, dir2, common_file)
472 dir1b = pycompat.osdevnull
473 label2 = common_file + rev2
473 dir2 = os.path.join(dir2root, dir2, common_file)
474 label2 = common_file + rev2
474
475
475 if not opts.get(b'per_file'):
476 # Run the external tool on the 2 temp directories or the patches
476 # Run the external tool on the 2 temp directories or the patches
477 cmdline = formatcmdline(
477 cmdline = formatcmdline(
478 cmdline,
478 cmdline,
General Comments 0
You need to be logged in to leave comments. Login now