##// END OF EJS Templates
diff: use fctx.size() to test empty...
Jun Wu -
r32188:776127b2 default
parent child Browse files
Show More
@@ -2508,6 +2508,9 b' def trydiff(repo, revs, ctx1, ctx2, modi'
2508 revinfo = ' '.join(["-r %s" % rev for rev in revs])
2508 revinfo = ' '.join(["-r %s" % rev for rev in revs])
2509 return 'diff %s %s' % (revinfo, f)
2509 return 'diff %s %s' % (revinfo, f)
2510
2510
2511 def isempty(fctx):
2512 return fctx is None or fctx.size() == 0
2513
2511 date1 = util.datestr(ctx1.date())
2514 date1 = util.datestr(ctx1.date())
2512 date2 = util.datestr(ctx2.date())
2515 date2 = util.datestr(ctx2.date())
2513
2516
@@ -2546,9 +2549,9 b' def trydiff(repo, revs, ctx1, ctx2, modi'
2546 # copy/rename
2549 # copy/rename
2547 f2 in copy or
2550 f2 in copy or
2548 # empty file creation
2551 # empty file creation
2549 (not f1 and not content2) or
2552 (not f1 and isempty(fctx2)) or
2550 # empty file deletion
2553 # empty file deletion
2551 (not content1 and not f2) or
2554 (isempty(fctx1) and not f2) or
2552 # create with flags
2555 # create with flags
2553 (not f1 and flag2) or
2556 (not f1 and flag2) or
2554 # change flags
2557 # change flags
General Comments 0
You need to be logged in to leave comments. Login now