Show More
@@ -430,12 +430,12 b' class Test(unittest.TestCase):' | |||
|
430 | 430 | shell is the shell to execute tests in. |
|
431 | 431 | """ |
|
432 | 432 | |
|
433 | self.path = path | |
|
433 | self.path = path.encode('utf-8') | |
|
434 | 434 | self.name = os.path.basename(path) |
|
435 | 435 | self._testdir = os.path.dirname(path) |
|
436 | 436 | self.errpath = os.path.join(self._testdir, '%s.err' % self.name) |
|
437 | 437 | |
|
438 | self._threadtmp = tmpdir | |
|
438 | self._threadtmp = tmpdir.encode('utf-8') | |
|
439 | 439 | self._keeptmpdir = keeptmpdir |
|
440 | 440 | self._debug = debug |
|
441 | 441 | self._timeout = timeout |
@@ -689,8 +689,8 b' class Test(unittest.TestCase):' | |||
|
689 | 689 | env["HGPORT"] = str(self._startport) |
|
690 | 690 | env["HGPORT1"] = str(self._startport + 1) |
|
691 | 691 | env["HGPORT2"] = str(self._startport + 2) |
|
692 | env["HGRCPATH"] = os.path.join(self._threadtmp, '.hgrc') | |
|
693 | env["DAEMON_PIDS"] = os.path.join(self._threadtmp, 'daemon.pids') | |
|
692 | env["HGRCPATH"] = os.path.join(self._threadtmp, b'.hgrc') | |
|
693 | env["DAEMON_PIDS"] = os.path.join(self._threadtmp, b'daemon.pids') | |
|
694 | 694 | env["HGEDITOR"] = ('"' + sys.executable + '"' |
|
695 | 695 | + ' -c "import sys; sys.exit(0)"') |
|
696 | 696 | env["HGMERGE"] = "internal:merge" |
@@ -721,27 +721,27 b' class Test(unittest.TestCase):' | |||
|
721 | 721 | def _createhgrc(self, path): |
|
722 | 722 | """Create an hgrc file for this test.""" |
|
723 | 723 | hgrc = open(path, 'wb') |
|
724 | hgrc.write('[ui]\n') | |
|
725 | hgrc.write('slash = True\n') | |
|
726 | hgrc.write('interactive = False\n') | |
|
727 | hgrc.write('mergemarkers = detailed\n') | |
|
728 | hgrc.write('promptecho = True\n') | |
|
729 | hgrc.write('[defaults]\n') | |
|
730 | hgrc.write('backout = -d "0 0"\n') | |
|
731 | hgrc.write('commit = -d "0 0"\n') | |
|
732 | hgrc.write('shelve = --date "0 0"\n') | |
|
733 | hgrc.write('tag = -d "0 0"\n') | |
|
734 | hgrc.write('[devel]\n') | |
|
735 | hgrc.write('all = true\n') | |
|
736 | hgrc.write('[largefiles]\n') | |
|
737 | hgrc.write('usercache = %s\n' % | |
|
738 | (os.path.join(self._testtmp, '.cache/largefiles'))) | |
|
724 | hgrc.write(b'[ui]\n') | |
|
725 | hgrc.write(b'slash = True\n') | |
|
726 | hgrc.write(b'interactive = False\n') | |
|
727 | hgrc.write(b'mergemarkers = detailed\n') | |
|
728 | hgrc.write(b'promptecho = True\n') | |
|
729 | hgrc.write(b'[defaults]\n') | |
|
730 | hgrc.write(b'backout = -d "0 0"\n') | |
|
731 | hgrc.write(b'commit = -d "0 0"\n') | |
|
732 | hgrc.write(b'shelve = --date "0 0"\n') | |
|
733 | hgrc.write(b'tag = -d "0 0"\n') | |
|
734 | hgrc.write(b'[devel]\n') | |
|
735 | hgrc.write(b'all = true\n') | |
|
736 | hgrc.write(b'[largefiles]\n') | |
|
737 | hgrc.write(b'usercache = %s\n' % | |
|
738 | (os.path.join(self._testtmp, b'.cache/largefiles'))) | |
|
739 | 739 | |
|
740 | 740 | for opt in self._extraconfigopts: |
|
741 | 741 | section, key = opt.split('.', 1) |
|
742 | 742 | assert '=' in key, ('extra config opt %s must ' |
|
743 | 743 | 'have an = for assignment' % opt) |
|
744 | hgrc.write('[%s]\n%s\n' % (section, key)) | |
|
744 | hgrc.write(b'[%s]\n%s\n' % (section, key)) | |
|
745 | 745 | hgrc.close() |
|
746 | 746 | |
|
747 | 747 | def fail(self, msg): |
General Comments 0
You need to be logged in to leave comments.
Login now