equal
deleted
inserted
replaced
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) |