comparison mercurial/context.py @ 43117:8ff1ecfadcd1

cleanup: join string literals that are already on one line Thanks to Kyle for noticing this and for providing the regular expression to run on the codebase. This patch has been reviewed by the test suite and they approved of it. # skip-blame: fallout from mass reformatting Differential Revision: https://phab.mercurial-scm.org/D7028
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 08 Oct 2019 15:06:18 -0700
parents d783f945a701
children 0171483b082f
comparison
equal deleted inserted replaced
43116:defabf63e969 43117:8ff1ecfadcd1
1617 _(b"%s does not exist!\n") % self._repo.dirstate.pathto(dest) 1617 _(b"%s does not exist!\n") % self._repo.dirstate.pathto(dest)
1618 ) 1618 )
1619 return 1619 return
1620 if not (stat.S_ISREG(st.st_mode) or stat.S_ISLNK(st.st_mode)): 1620 if not (stat.S_ISREG(st.st_mode) or stat.S_ISLNK(st.st_mode)):
1621 self._repo.ui.warn( 1621 self._repo.ui.warn(
1622 _(b"copy failed: %s is not a file or a " b"symbolic link\n") 1622 _(b"copy failed: %s is not a file or a symbolic link\n")
1623 % self._repo.dirstate.pathto(dest) 1623 % self._repo.dirstate.pathto(dest)
1624 ) 1624 )
1625 else: 1625 else:
1626 with self._repo.wlock(): 1626 with self._repo.wlock():
1627 ds = self._repo.dirstate 1627 ds = self._repo.dirstate
1676 or len(d) >= 1024 1676 or len(d) >= 1024
1677 or b'\n' in d 1677 or b'\n' in d
1678 or stringutil.binary(d) 1678 or stringutil.binary(d)
1679 ): 1679 ):
1680 self._repo.ui.debug( 1680 self._repo.ui.debug(
1681 b'ignoring suspect symlink placeholder' b' "%s"\n' % f 1681 b'ignoring suspect symlink placeholder "%s"\n' % f
1682 ) 1682 )
1683 continue 1683 continue
1684 sane.append(f) 1684 sane.append(f)
1685 return sane 1685 return sane
1686 1686
1748 # in this case, writing changes out breaks 1748 # in this case, writing changes out breaks
1749 # consistency, because .hg/dirstate was 1749 # consistency, because .hg/dirstate was
1750 # already changed simultaneously after last 1750 # already changed simultaneously after last
1751 # caching (see also issue5584 for detail) 1751 # caching (see also issue5584 for detail)
1752 self._repo.ui.debug( 1752 self._repo.ui.debug(
1753 b'skip updating dirstate: ' b'identity mismatch\n' 1753 b'skip updating dirstate: identity mismatch\n'
1754 ) 1754 )
1755 except error.LockError: 1755 except error.LockError:
1756 pass 1756 pass
1757 finally: 1757 finally:
1758 # Even if the wlock couldn't be grabbed, clear out the list. 1758 # Even if the wlock couldn't be grabbed, clear out the list.