Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9e66ac6

Browse files
committed
merge
2 parents ce418b4 + 0e1a5b4 commit 9e66ac6

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

Tools/hg/hgtouch.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,19 @@
77
88
In addition to the dependency syntax, #-comments are supported.
99
"""
10+
import errno
1011
import os
1112

1213
def parse_config(repo):
13-
configfile = repo.wjoin(".hgtouch")
14-
if not os.path.exists(configfile):
14+
try:
15+
fp = repo.wfile(".hgtouch")
16+
except IOError, e:
17+
if e.errno != errno.ENOENT:
18+
raise
1519
return {}
1620
result = {}
17-
with open(configfile) as f:
18-
for line in f:
21+
with fp:
22+
for line in fp:
1923
# strip comments
2024
line = line.split('#')[0].strip()
2125
if ':' not in line:

0 commit comments

Comments
 (0)