Mercurial > public > mercurial-scm > hg-stable
diff mercurial/localrepo.py @ 19650:36f48c7d5944
localrepo.status: ignore empty symlink placeholders
A symlink's target should never be empty in normal use. Solaris and some BSDs
do allow empty symlinks to be created (with varying semantics on dereference),
but a symlink placeholder that started off as empty is either
- going to be empty, in which case ignoring it is fine, since it's unchanged, or
- going to not be empty, in which case this check is irrelevant.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Sat, 31 Aug 2013 10:16:06 -0700 |
parents | b9b7dc267e9f |
children | 55ef79031009 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Tue Sep 03 15:12:35 2013 -0400 +++ b/mercurial/localrepo.py Sat Aug 31 10:16:06 2013 -0700 @@ -1557,7 +1557,7 @@ for f in modified: if ctx2.flags(f) == 'l': d = ctx2[f].data() - if len(d) >= 1024 or '\n' in d or util.binary(d): + if d == '' or len(d) >= 1024 or '\n' in d or util.binary(d): self.ui.debug('ignoring suspect symlink placeholder' ' "%s"\n' % f) continue