comparison mercurial/localrepo.py @ 21393:a45af4da0421

localrepo: move symlink logic to workingctx
author Sean Farley <sean.michael.farley@gmail.com>
date Fri, 07 Mar 2014 13:32:37 -0800
parents 3b4c75690206
children 20a30cd41d21
comparison
equal deleted inserted replaced
21392:b1ce47dadbdf 21393:a45af4da0421
1607 del mf1[fn] 1607 del mf1[fn]
1608 elif fn not in deleted: 1608 elif fn not in deleted:
1609 added.append(fn) 1609 added.append(fn)
1610 removed = mf1.keys() 1610 removed = mf1.keys()
1611 1611
1612 if working and modified and not self.dirstate._checklink: 1612 if working:
1613 # Symlink placeholders may get non-symlink-like contents 1613 modified = ctx2._filtersuspectsymlink(modified)
1614 # via user error or dereferencing by NFS or Samba servers,
1615 # so we filter out any placeholders that don't look like a
1616 # symlink
1617 sane = []
1618 for f in modified:
1619 if ctx2.flags(f) == 'l':
1620 d = ctx2[f].data()
1621 if d == '' or len(d) >= 1024 or '\n' in d or util.binary(d):
1622 self.ui.debug('ignoring suspect symlink placeholder'
1623 ' "%s"\n' % f)
1624 continue
1625 sane.append(f)
1626 modified = sane
1627 1614
1628 r = modified, added, removed, deleted, unknown, ignored, clean 1615 r = modified, added, removed, deleted, unknown, ignored, clean
1629 1616
1630 if listsubrepos: 1617 if listsubrepos:
1631 for subpath, sub in scmutil.itersubrepos(ctx1, ctx2): 1618 for subpath, sub in scmutil.itersubrepos(ctx1, ctx2):