##// END OF EJS Templates
py3: make a pycompat.osdevnull, use it in extdiff...
Kyle Lippincott -
r44229:765a9c29 default
parent child Browse files
Show More
@@ -271,7 +271,7 b' def _runperfilediff('
271 271 path1a = os.path.join(tmproot, dir1a, commonfile)
272 272 label1a = commonfile + rev1a
273 273 if not os.path.isfile(path1a):
274 path1a = os.devnull
274 path1a = pycompat.osdevnull
275 275
276 276 path1b = b''
277 277 label1b = b''
@@ -279,7 +279,7 b' def _runperfilediff('
279 279 path1b = os.path.join(tmproot, dir1b, commonfile)
280 280 label1b = commonfile + rev1b
281 281 if not os.path.isfile(path1b):
282 path1b = os.devnull
282 path1b = pycompat.osdevnull
283 283
284 284 path2 = os.path.join(dir2root, dir2, commonfile)
285 285 label2 = commonfile + rev2
@@ -468,12 +468,12 b' def dodiff(ui, repo, cmdline, pats, opts'
468 468 dir1a = os.path.join(tmproot, dir1a, common_file)
469 469 label1a = common_file + rev1a
470 470 if not os.path.isfile(dir1a):
471 dir1a = os.devnull
471 dir1a = pycompat.osdevnull
472 472 if do3way:
473 473 dir1b = os.path.join(tmproot, dir1b, common_file)
474 474 label1b = common_file + rev1b
475 475 if not os.path.isfile(dir1b):
476 dir1b = os.devnull
476 dir1b = pycompat.osdevnull
477 477 dir2 = os.path.join(dir2root, dir2, common_file)
478 478 label2 = common_file + rev2
479 479 else:
@@ -118,6 +118,7 b' if ispy3:'
118 118 osaltsep = os.altsep
119 119 if osaltsep:
120 120 osaltsep = osaltsep.encode('ascii')
121 osdevnull = os.devnull.encode('ascii')
121 122
122 123 sysplatform = sys.platform.encode('ascii')
123 124 sysexecutable = sys.executable
@@ -456,6 +457,7 b' else:'
456 457 ospardir = os.pardir
457 458 ossep = os.sep
458 459 osaltsep = os.altsep
460 osdevnull = os.devnull
459 461 long = long
460 462 stdin = sys.stdin
461 463 stdout = sys.stdout
@@ -515,3 +515,27 b' Test handling of non-ASCII paths in gene'
515 515 $ LC_MESSAGES=ja_JP.UTF-8 hg --config hgext.extdiff= --config extdiff.cmd.td=$U help td \
516 516 > | grep "^ '"
517 517 '\xa5\xa5'
518
519 $ cd $TESTTMP
520
521 Test that diffing a single file works, even if that file is new
522
523 $ hg init testsinglefile
524 $ cd testsinglefile
525 $ echo a > a
526 $ hg add a
527 $ hg falabala
528 diffing * */a (glob)
529 [1]
530 $ hg ci -qm a
531 $ hg falabala -c .
532 diffing * */a (glob)
533 [1]
534 $ echo a >> a
535 $ hg falabala
536 diffing */a */a (glob)
537 [1]
538 $ hg ci -qm 2a
539 $ hg falabala -c .
540 diffing */a */a (glob)
541 [1]
General Comments 0
You need to be logged in to leave comments. Login now