comparison tests/test-walkrepo.py @ 16321:e1615a24b73a stable

tests: make test-walkrepo use hg's symlink test
author Matt Mackall <mpm@selenic.com>
date Sat, 31 Mar 2012 10:44:31 -0500
parents 0b21ae0a2366
children 525fdb738975
comparison
equal deleted inserted replaced
16320:e11ab387e89c 16321:e1615a24b73a
1 import os 1 import os
2 from mercurial import hg, ui 2 from mercurial import hg, ui
3 from mercurial.scmutil import walkrepos 3 from mercurial.scmutil import walkrepos
4 from mercurial.util import checklink
4 from os import mkdir, chdir 5 from os import mkdir, chdir
5 from os.path import join as pjoin 6 from os.path import join as pjoin
6 7
7 u = ui.ui() 8 u = ui.ui()
8 sym = getattr(os, 'symlink', False) and getattr(os.path, 'samestat', False) 9 sym = checklink('.')
9 10
10 hg.repository(u, 'top1', create=1) 11 hg.repository(u, 'top1', create=1)
11 mkdir('subdir') 12 mkdir('subdir')
12 chdir('subdir') 13 chdir('subdir')
13 hg.repository(u, 'sub1', create=1) 14 hg.repository(u, 'sub1', create=1)