Mercurial > public > mercurial-scm > hg
diff mercurial/merge.py @ 4006:67982d3ee76c
symlinks: add flags param to wwrite
Now wwrite can set symlink and exec for files
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 29 Dec 2006 20:04:31 -0600 |
parents | 656e06eebda7 |
children | 20da40cc1c73 |
line wrap: on
line diff
--- a/mercurial/merge.py Fri Dec 29 20:04:31 2006 -0600 +++ b/mercurial/merge.py Fri Dec 29 20:04:31 2006 -0600 @@ -346,7 +346,7 @@ merged += 1 if f != fd: repo.ui.debug(_("copying %s to %s\n") % (f, fd)) - repo.wwrite(fd, repo.wread(f)) + repo.wwrite(fd, repo.wread(f), flag and 'x' or '') if move: repo.ui.debug(_("removing %s\n") % f) os.unlink(repo.wjoin(f)) @@ -355,22 +355,19 @@ flag = a[2] repo.ui.note(_("getting %s\n") % f) t = mctx.filectx(f).data() - repo.wwrite(f, t) - util.set_exec(repo.wjoin(f), flag) + repo.wwrite(f, t, flag and 'x' or '') updated += 1 elif m == "d": # directory rename f2, fd, flag = a[2:] if f: repo.ui.note(_("moving %s to %s\n") % (f, fd)) t = wctx.filectx(f).data() - repo.wwrite(fd, t) - util.set_exec(repo.wjoin(fd), flag) + repo.wwrite(fd, t, flag and 'x' or '') util.unlink(repo.wjoin(f)) if f2: repo.ui.note(_("getting %s to %s\n") % (f2, fd)) t = mctx.filectx(f2).data() - repo.wwrite(fd, t) - util.set_exec(repo.wjoin(fd), flag) + repo.wwrite(fd, t, flag and 'x' or '') updated += 1 elif m == "e": # exec flag = a[2]