Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 4005:656e06eebda7
replace filehandle version of wwrite with wwritedata
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 29 Dec 2006 20:04:31 -0600 |
parents | 6b4127c7d52a |
children | 67982d3ee76c |
comparison
equal
deleted
inserted
replaced
4004:c83c35f2f4e2 | 4005:656e06eebda7 |
---|---|
18 """ | 18 """ |
19 | 19 |
20 def temp(prefix, ctx): | 20 def temp(prefix, ctx): |
21 pre = "%s~%s." % (os.path.basename(ctx.path()), prefix) | 21 pre = "%s~%s." % (os.path.basename(ctx.path()), prefix) |
22 (fd, name) = tempfile.mkstemp(prefix=pre) | 22 (fd, name) = tempfile.mkstemp(prefix=pre) |
23 data = repo.wwritedata(ctx.path(), ctx.data()) | |
23 f = os.fdopen(fd, "wb") | 24 f = os.fdopen(fd, "wb") |
24 repo.wwrite(ctx.path(), ctx.data(), f) | 25 f.write(data) |
25 f.close() | 26 f.close() |
26 return name | 27 return name |
27 | 28 |
28 fcm = wctx.filectx(fw) | 29 fcm = wctx.filectx(fw) |
29 fco = mctx.filectx(fo) | 30 fco = mctx.filectx(fo) |