##// END OF EJS Templates
test-revlog-raw: close file handles explicitly (issue5644)
Yuya Nishihara -
r33627:6788e648 stable
parent child Browse files
Show More
@@ -144,12 +144,18 b" def lowlevelcopy(rlog, tr, destname=b'_d"
144 text = None
144 text = None
145 cachedelta = (deltaparent, rlog.revdiff(deltaparent, r))
145 cachedelta = (deltaparent, rlog.revdiff(deltaparent, r))
146 flags = rlog.flags(r)
146 flags = rlog.flags(r)
147 ifh = dlog.opener(dlog.indexfile, 'a+')
147 ifh = dfh = None
148 dfh = None
148 try:
149 if not dlog._inline:
149 ifh = dlog.opener(dlog.indexfile, 'a+')
150 dfh = dlog.opener(dlog.datafile, 'a+')
150 if not dlog._inline:
151 dlog._addrevision(rlog.node(r), text, tr, r, p1, p2, flags, cachedelta,
151 dfh = dlog.opener(dlog.datafile, 'a+')
152 ifh, dfh)
152 dlog._addrevision(rlog.node(r), text, tr, r, p1, p2, flags,
153 cachedelta, ifh, dfh)
154 finally:
155 if dfh is not None:
156 dfh.close()
157 if ifh is not None:
158 ifh.close()
153 return dlog
159 return dlog
154
160
155 # Utilities to generate revisions for testing
161 # Utilities to generate revisions for testing
General Comments 0
You need to be logged in to leave comments. Login now