Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/patch.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 | c190df14338c |
children | 49237d6ae97d |
comparison
equal
deleted
inserted
replaced
4005:656e06eebda7 | 4006:67982d3ee76c |
---|---|
375 if gp and gp.mode: | 375 if gp and gp.mode: |
376 x = gp.mode & 0100 != 0 | 376 x = gp.mode & 0100 != 0 |
377 dst = os.path.join(repo.root, gp.path) | 377 dst = os.path.join(repo.root, gp.path) |
378 # patch won't create empty files | 378 # patch won't create empty files |
379 if ctype == 'ADD' and not os.path.exists(dst): | 379 if ctype == 'ADD' and not os.path.exists(dst): |
380 repo.wwrite(gp.path, '') | 380 repo.wwrite(gp.path, '', x and 'x' or '') |
381 util.set_exec(dst, x) | 381 else: |
382 util.set_exec(dst, x) | |
382 cmdutil.addremove(repo, cfiles, wlock=wlock) | 383 cmdutil.addremove(repo, cfiles, wlock=wlock) |
383 files = patches.keys() | 384 files = patches.keys() |
384 files.extend([r for r in removes if r not in files]) | 385 files.extend([r for r in removes if r not in files]) |
385 files.sort() | 386 files.sort() |
386 | 387 |