Skip to content
Snippets Groups Projects
  1. Aug 09, 2010
    • Martin Geisler's avatar
      Merge with stable · 4b8dc59e22b9
      Martin Geisler authored
      4b8dc59e22b9
    • Martin Geisler's avatar
      dirstate: ignore symlinks when fs cannot handle them (issue1888) · ca6cebd8734e
      Martin Geisler authored
      When the filesystem cannot handle the executable bit, we currently
      ignore it completely when looking for modified files. Similarly, it is
      impossible to set or clear the bit when the filesystem ignores it.
      
      This patch makes Mercurial treat symbolic links the same way.
      
      Symlinks are a little different since they manifest themselves as
      small files containing a filename (the symlink target). On Windows,
      these files show up as regular files, and on Linux and Mac they show
      up as real symlinks.
      
      Issue1888 presents a case where the symlink files are better ignored
      from the Windows side. A Linux client creates symlinks in a working
      copy which is shared over a network between Linux and Windows clients.
      
      The Samba server is helpful and defererences the symlink when the
      Windows client looks at it. This means that Mercurial on the Windows
      side sees file content instead of a file name in the symlink, and
      hence flags the link as modified. Ignoring the change would be much
      more helpful, similarly to how Mercurial does not report any changes
      when executable bits are ignored in a checkout on Windows.
      
      An initial checkout of a symbolic link on a file system that cannot
      handle symbolic links will still result in a regular file containing
      the target file name as its content. Sharing such a checkout with a
      Linux client will not turn the file into a symlink automatically, but
      'hg revert' can fix that. After the revert, the Windows client will
      see the correct file content (provided by the Samba server when it
      follows the link on the Linux side) and otherwise ignore the change.
      
      Running 'hg perfstatus' 10 times gives these results:
      
        Before:          After:
        min: 0.544703    min: 0.546549
        med: 0.547592    med: 0.548881
        avg: 0.549146    avg: 0.548549
        max: 0.564112    max: 0.551504
      
      The median time is increased about 0.24%.
      ca6cebd8734e
  2. Aug 08, 2010
  3. Aug 07, 2010
  4. Aug 06, 2010
  5. Aug 05, 2010
  6. Aug 04, 2010
  7. Aug 03, 2010
    • Brodie Rao's avatar
      hgcia/color: remove star imports · 26e413f55b5e
      Brodie Rao authored
      This plays nicer with demandimport and allows pyflakes to detect undefined
      names.
      26e413f55b5e
    • Renato Cunha's avatar
      hgfixes: added a fixer that makes bytes to be formatted correctly · e627fef94604
      Renato Cunha authored
      This patch implement a fixer that replaces all calls to the '%' when bytes
      arguments are used to a call to bytesformatter(), a function that knows how to
      format byte strings. As one can't be sure if a formatting call is done when
      only variables are used in a '%' call, these calls are also translated. The
      bytesformatter, in runtime, makes sure to return the "raw" % operation if
      that's what was intended.
      e627fef94604
    • Renato Cunha's avatar
      py3kcompat: added a "compatibility layer" for py3k · 37a70a784397
      Renato Cunha authored
      This patch adds some ugly constructs. The first of them is bytesformatter, a
      function that formats strings like when '%' is called. The main motivation for
      this function is py3k's strange behavior:
      
      >>> 'foo %s' % b'bar'
      "foo b'bar'"
      >>> b'foo %s' % b'bar'
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      TypeError: unsupported operand type(s) for %: 'bytes' and 'bytes'
      >>> b'foo %s' % 'bar'
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
      TypeError: unsupported operand type(s) for %: 'bytes' and 'str'
      
      In other words, if we can't format bytes with bytes, and recall that all
      mercurial strings will be converted by a fixer, then things will break badly if
      we don't take a similar approach.
      
      The other addition with this patch is that the os.environ dictionary is
      monkeypatched to have bytes items. Hopefully this won't be needed in the
      future, as python 3.2 might get a os.environb dictionary that holds bytes
      items.
      37a70a784397
    • Renato Cunha's avatar
      hgfixes: add a fixer to convert plain strings to bytestrings · 40d5633889bb
      Renato Cunha authored
      This patch implements a 2to3 fixer that converts all plain strings in a python
      source file to byte strings syntax. Example:
      
      foo = 'Normal string'
      
      would become
      
      foo = b'Normal string'
      
      The motivation behind this fixer can be found in
      http://selenic.com/pipermail/mercurial-devel/2010-June/022363.html or, in other
      words: the current hg source assumes that _most_ strings are "meant" to be byte
      sequences, so it makes sense to make the convertion implemented by this patch.
      
      As mentioned above, not all mercurial modules want to use strings as bytes,
      examples include i18n (which uses unicode), and demandimport (in py3k, module
      names are normal strings, thus unicode, and there's no need for a convertion).
      Therefore, these modules are blacklisted in the fixer. There are also a few
      functions that can take only unicode arguments, thus the convertion shouldn't
      be done for those.
      40d5633889bb
    • Vishakh H's avatar
      revlog: add shallow header flag · 46ac30b17978
      Vishakh H authored
      REVLOGSHALLOW header flag to mark revlog as shallow.
      The _shallow attribute of the revlog is used to check if the header flag is set.
      46ac30b17978
    • Vishakh H's avatar
      revlog: add punched revision flag · 138c055ec57d
      Vishakh H authored
      index flag to identify a revision as punched, i.e. it contains no data.
      REVIDX_PUNCHED_FLAG = 2, is used to mark a revision as punched.
      REVIDX_KNOWN_FLAGS is the accumulation of all index flags.
      138c055ec57d
    • Matt Mackall's avatar
      tests: unify test-tags · 5b53aa2d4b99
      Matt Mackall authored
      5b53aa2d4b99
    • Matt Mackall's avatar
      tests: unify test-empty · fc12420efcf4
      Matt Mackall authored
      fc12420efcf4
    • Matt Mackall's avatar
      tests: unify test-basic · 5dc8b3ee407b
      Matt Mackall authored
      5dc8b3ee407b
    • Matt Mackall's avatar
      tests: basic support for unified tests · 431e2bf37ae7
      Matt Mackall authored
      431e2bf37ae7
  8. Aug 02, 2010
  9. Aug 01, 2010
  10. Aug 02, 2010
  11. Jul 30, 2010
Loading