comparison tests/run-tests.py @ 45108:a659d5a4d2d5

run-tests: replace '#' with '-' in temp path of repos created for tests If we have multiple cases in a test, that leads us to a temp path of format "<temp-path>-<case1>#<case2>". This leads to hg.parseurl() parsing the path and take part after `#` as a branch name. I encountered this bug while adding support for share-safe case in next patch. Differential Revision: https://phab.mercurial-scm.org/D8647
author Pulkit Goyal <7895pulkit@gmail.com>
date Mon, 22 Jun 2020 13:51:48 +0530
parents dd3050227a84
children de9ec12ee53c
comparison
equal deleted inserted replaced
45107:4a28f5e8408e 45108:a659d5a4d2d5
1593 super(TTest, self).__init__(path, *args, **kwds) 1593 super(TTest, self).__init__(path, *args, **kwds)
1594 if case: 1594 if case:
1595 casepath = b'#'.join(case) 1595 casepath = b'#'.join(case)
1596 self.name = '%s#%s' % (self.name, _bytes2sys(casepath)) 1596 self.name = '%s#%s' % (self.name, _bytes2sys(casepath))
1597 self.errpath = b'%s#%s.err' % (self.errpath[:-4], casepath) 1597 self.errpath = b'%s#%s.err' % (self.errpath[:-4], casepath)
1598 self._tmpname += b'-%s' % casepath 1598 self._tmpname += b'-%s' % casepath.replace(b'#', b'-')
1599 self._have = {} 1599 self._have = {}
1600 1600
1601 @property 1601 @property
1602 def refpath(self): 1602 def refpath(self):
1603 return os.path.join(self._testdir, self.bname) 1603 return os.path.join(self._testdir, self.bname)