Mercurial > hg
view tests/test-convert-svn-tags.t @ 35450:e31773898197
run-tests: use context managers for file descriptors
I've seen the following error a few times recently when running the tests with
`yes | ./run-tests.py --local -j9 -i`:
Errored test-add.t: Traceback (most recent call last):
File "./run-tests.py", line 821, in run
self.runTest()
File "./run-tests.py", line 910, in runTest
if self._result.addOutputMismatch(self, ret, out, self._refout):
File "./run-tests.py", line 1774, in addOutputMismatch
rename(test.errpath, test.path)
File "./run-tests.py", line 571, in rename
os.remove(src)
WindowsError: [Error 32] The process cannot access the file because it is being
used by another process: 'c:\\Users\\Matt\\projects\\hg\\tests\\test-add.t.err'
This change doesn't fix the problem, but it seems like a simple enough
improvement.
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Sun, 17 Dec 2017 14:06:49 -0500 |
parents | 7a9cbb315d84 |
children |
line wrap: on
line source
#require svn svn-bindings $ cat >> $HGRCPATH <<EOF > [extensions] > convert = > EOF $ svnadmin create svn-repo $ svnadmin load -q svn-repo < "$TESTDIR/svn/tags.svndump" Convert $ hg convert --datesort svn-repo A-hg initializing destination A-hg repository scanning source... sorting... converting... 5 init projA 4 adda 3 changea 2 changea2 1 changea3 0 changea updating tags $ cd A-hg $ hg log -G --template '{rev} {desc|firstline} tags: {tags}\n' o 6 update tags tags: tip | o 5 changea tags: trunk.goodtag | o 4 changea3 tags: | o 3 changea2 tags: trunk.v1 | o 2 changea tags: | o 1 adda tags: | o 0 init projA tags: $ hg tags -q tip trunk.goodtag trunk.v1 $ cd .. Convert without tags $ hg convert --datesort --config convert.svn.tags= svn-repo A-notags-hg initializing destination A-notags-hg repository scanning source... sorting... converting... 5 init projA 4 adda 3 changea 2 changea2 1 changea3 0 changea $ hg -R A-notags-hg tags -q tip