Mercurial > public > mercurial-scm > hg
comparison mercurial/patch.py @ 12340:b0bb72460c44 stable
patch: fix target when patching broken symlinks (issue2368)
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Mon, 20 Sep 2010 21:42:11 +0200 |
parents | a4fbbe0fbc38 |
children | aca8b10bca6e |
comparison
equal
deleted
inserted
replaced
12320:40c40c6f20b8 | 12340:b0bb72460c44 |
---|---|
921 gooda = not nulla and util.lexists(afile) | 921 gooda = not nulla and util.lexists(afile) |
922 bbase, bfile = pathstrip(bfile_orig, strip) | 922 bbase, bfile = pathstrip(bfile_orig, strip) |
923 if afile == bfile: | 923 if afile == bfile: |
924 goodb = gooda | 924 goodb = gooda |
925 else: | 925 else: |
926 goodb = not nullb and os.path.exists(bfile) | 926 goodb = not nullb and os.path.lexists(bfile) |
927 createfunc = hunk.createfile | 927 createfunc = hunk.createfile |
928 missing = not goodb and not gooda and not createfunc() | 928 missing = not goodb and not gooda and not createfunc() |
929 | 929 |
930 # some diff programs apparently produce create patches where the | 930 # some diff programs apparently produce create patches where the |
931 # afile is not /dev/null, but afile starts with bfile | 931 # afile is not /dev/null, but afile starts with bfile |