Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/filemerge.py @ 26610:f9f82c444ff7
filemerge: only copy to backup during premerge step
The premerge might leave the original file in an unclean state. Therefore it's
important to only copy the file in the beginning.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Sun, 11 Oct 2015 20:04:40 -0700 |
parents | 47681e77e484 |
children | a5ff66e6d77a |
comparison
equal
deleted
inserted
replaced
26609:47681e77e484 | 26610:f9f82c444ff7 |
---|---|
503 | 503 |
504 a = repo.wjoin(fd) | 504 a = repo.wjoin(fd) |
505 b = temp("base", fca) | 505 b = temp("base", fca) |
506 c = temp("other", fco) | 506 c = temp("other", fco) |
507 back = a + ".orig" | 507 back = a + ".orig" |
508 util.copyfile(a, back) | 508 if premerge: |
509 util.copyfile(a, back) | |
509 files = (a, b, c, back) | 510 files = (a, b, c, back) |
510 | 511 |
511 r = 1 | 512 r = 1 |
512 try: | 513 try: |
513 markerstyle = ui.config('ui', 'mergemarkers', 'basic') | 514 markerstyle = ui.config('ui', 'mergemarkers', 'basic') |