comparison mercurial/commands.py @ 7847:30cb79d84352

resolve: keep .orig files
author Matt Mackall <mpm@selenic.com>
date Mon, 16 Mar 2009 16:58:41 -0500
parents b61e918ea767
children 89e05c02a4af
comparison
equal deleted inserted replaced
7834:2444285ec338 7847:30cb79d84352
2361 elif unmark: 2361 elif unmark:
2362 ms.mark(f, "u") 2362 ms.mark(f, "u")
2363 else: 2363 else:
2364 wctx = repo[None] 2364 wctx = repo[None]
2365 mctx = wctx.parents()[-1] 2365 mctx = wctx.parents()[-1]
2366
2367 # backup pre-resolve (merge uses .orig for its own purposes)
2368 a = repo.wjoin(f)
2369 util.copyfile(a, a + ".resolve")
2370
2371 # resolve file
2366 ms.resolve(f, wctx, mctx) 2372 ms.resolve(f, wctx, mctx)
2373
2374 # replace filemerge's .orig file with our resolve file
2375 util.rename(a + ".resolve", a + ".orig")
2367 2376
2368 def revert(ui, repo, *pats, **opts): 2377 def revert(ui, repo, *pats, **opts):
2369 """restore individual files or dirs to an earlier state 2378 """restore individual files or dirs to an earlier state
2370 2379
2371 (use update -r to check out earlier revisions, revert does not 2380 (use update -r to check out earlier revisions, revert does not