Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 4002:d7b9ec589546
symlinks: use is_link wherever is_exec is used
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Fri, 29 Dec 2006 20:04:31 -0600 |
parents | c190df14338c |
children | 20af6a2f0b0e |
comparison
equal
deleted
inserted
replaced
4001:dda03b2d9ef1 | 4002:d7b9ec589546 |
---|---|
377 def _buildmanifest(self): | 377 def _buildmanifest(self): |
378 """generate a manifest corresponding to the working directory""" | 378 """generate a manifest corresponding to the working directory""" |
379 | 379 |
380 man = self._parents[0].manifest().copy() | 380 man = self._parents[0].manifest().copy() |
381 is_exec = util.execfunc(self._repo.root, man.execf) | 381 is_exec = util.execfunc(self._repo.root, man.execf) |
382 is_link = util.linkfunc(self._repo.root, man.linkf) | |
382 copied = self._repo.dirstate.copies() | 383 copied = self._repo.dirstate.copies() |
383 modified, added, removed, deleted, unknown = self._status[:5] | 384 modified, added, removed, deleted, unknown = self._status[:5] |
384 for i, l in (("a", added), ("m", modified), ("u", unknown)): | 385 for i, l in (("a", added), ("m", modified), ("u", unknown)): |
385 for f in l: | 386 for f in l: |
386 man[f] = man.get(copied.get(f, f), nullid) + i | 387 man[f] = man.get(copied.get(f, f), nullid) + i |
387 try: | 388 try: |
388 man.set(f, is_exec(f)) | 389 man.set(f, is_exec(f), is_link(f)) |
389 except OSError: | 390 except OSError: |
390 pass | 391 pass |
391 | 392 |
392 for f in deleted + removed: | 393 for f in deleted + removed: |
393 if f in man: | 394 if f in man: |