Skip to content
Snippets Groups Projects
  1. Dec 27, 2011
  2. Dec 25, 2011
  3. Dec 19, 2011
  4. Dec 18, 2011
  5. Dec 17, 2011
  6. Dec 24, 2011
  7. Dec 25, 2011
    • Katsunori FUJIWARA's avatar
      i18n: use "encoding.lower()" to normalize string in hgweb search query · 917f263e
      Katsunori FUJIWARA authored
      some problematic encoding (e.g.: cp932) uses ASCII alphabet characters
      in byte sequence of multi byte characters.
      
      "str.lower()" on such byte sequence may treat distinct characters as
      same one, and cause unexpected log matching.
      
      this patch uses "encoding.lower()" instead of "str.lower()" to
      normalize strings for compare.
      917f263e
    • Katsunori FUJIWARA's avatar
      i18n: use "encoding.lower()" to normalize specified string for revset · 9b822ede
      Katsunori FUJIWARA authored
      some problematic encoding (e.g.: cp932) uses ASCII alphabet characters
      in byte sequence of multi byte characters.
      
      "str.lower()" on such byte sequence may treat distinct characters as
      same one, and cause unexpected log matching.
      
      this patch uses "encoding.lower()" instead of "str.lower()" to
      normalize strings for compare.
      9b822ede
    • Katsunori FUJIWARA's avatar
      i18n: use "encoding.lower()" to normalize specified keywords for log searching · 988409e4
      Katsunori FUJIWARA authored
      some problematic encoding (e.g.: cp932) uses ASCII alphabet characters
      in byte sequence of multi byte characters.
      
      "str.lower()" on such byte sequence may treat distinct characters as
      same one, and cause unexpected log matching.
      
      this patch uses "encoding.lower()" instead of "str.lower()" to
      normalize strings for compare.
      988409e4
    • Katsunori FUJIWARA's avatar
      win32mbcs: allow win32mbcs extension to be enabled on cygwin platform · 9e6a13c2
      Katsunori FUJIWARA authored
      this patch allows win32mbcs extension to be enabled on cygwin platform
      for problematic character encodings.
      
      on recent cygwin platform, even though
      "os.path.supports_unicode_filenames" is False, "os.listdir()" and
      other path manipulation functions can return the result correctly
      decoded in unicode for invocations with unicode arguments, if locale
      is configured properly.
      
      existing code to check "os.path.supports_unicode_filenames" is kept to
      prevent win32mbcs from being enabled on unexpected platform.
      9e6a13c2
  8. Dec 24, 2011
    • Katsunori FUJIWARA's avatar
      windows: use normalized path as path to subrepo · 1581da01
      Katsunori FUJIWARA authored
      path to subrepo is used to identify or check location of subrepo.
      
      it should be normalized (in "/" delimiter form), because it is also
      used with narrowmatcher which uses only normalized path even on
      Windows environment.
      
      this patch applies "util.pconvert()" on path to subrepo (called
      "subpath") to normalize it.
      
      for this patch, referers of below were checked.
      
        - subrepo.state()
        - subrepo.itersubrepos()
        - subrepo.subrepo()
        - context.sub()
        - context.substate()
      
      typical usecase is:
      
          for subpath in ctx.substate:
              sub = ctx.sub(subpath)
              ... ctx.substate[subpath] ....
      
      in this case, normalization has no side effect, because keys given
      from substate are used as key itself.
      
      other cases shown below also seem to require subpath to be normalized.
      
          - path components are joined by "/", in "commands.forget()":
      
              for subpath in ctx.substate:
                  subforget[subpath + '/' + fsub] = (fsub, sub)
      
          - normalized "file" is used to check below condition, in
            "commands.revert()", "localrepository.commit()", and
            "localrepository._checknested()"
      
              file in ctx.substate
      
          - substate.keys() is passed to dirstate.walk()/status() which use
            only normalized pathes
      1581da01
    • Katsunori FUJIWARA's avatar
      windows: use normalized path to check repository nesting · 417127af
      Katsunori FUJIWARA authored
      current "localrepository._checknested()" uses specified path itself to
      compare against subrepo pathes.
      
      it is invoked from "hgsubrepo.subrepo()" or pathauditor (as callback),
      and both use "os.sep" as separator.
      
      this causes unexpected nesting check result, if subrepo configuration
      uses "/" as path separator for sub repo path.
      
      this path uses "/" to join path components (or apply "util.pconvert()"
      on path) to normalize.
      417127af
    • Katsunori FUJIWARA's avatar
      windows: force specified path to be audited in localpath form · 4751d513
      Katsunori FUJIWARA authored
      pathauditor is invoked not only for localpath form using "os.sep" as
      separator, but also for normalized form using "/": for example, hg
      internal path like "store/data" under ".hg", or ones normalized by
      match object
      
      this causes insufficient repository nesting check, because current
      pathauditor implementation divides specified path into components by
      "os.sep", and this causes to treat multiple path components joined by
      "/" as single one on Windows environment.
      
      this patch applies "util.localpath()" on specified path to force it to
      be divided into components correctly.
      
      in fact, root for pathauditor also uses multiple path separator on
      Windows. but this does not affect audit itself, so "util.localpath()"
      is not applied on it.
      4751d513
  9. Dec 23, 2011
  10. Dec 22, 2011
  11. Dec 21, 2011
  12. Dec 19, 2011
  13. Dec 21, 2011
  14. Dec 16, 2011
    • Katsunori FUJIWARA's avatar
      cygwin: add cygwin specific normcase logic · c51c9dc1
      Katsunori FUJIWARA authored
      in cygwin environment, mount point part of path is treated as case
      sensitive, even though underlying NTFS is case insensitive.
      
      this patch preserves mount point part of specified path, only if it is
      absolute one.
      
      there is no easy way to get list of current mount points from python
      program, other than to execute "mount" external command, because
      cygwin does not store current mount points into Unix/Linux like
      /etc/XXXtab file.
      
      so, this patch introduces cygwinmountpoints variable to list mount
      points to be preserved case.
      
      this allows some other extensions to customize mount point
      configuration.
      c51c9dc1
    • Katsunori FUJIWARA's avatar
      icasefs: avoid path-absoluteness/existance check in util.fspath() for efficiency · f63e4004
      Katsunori FUJIWARA authored
      'dirstate._normalize()', the only caller of 'util.fspath()', has
      already confirmed exsistance of specified file as relative to root.
      
      so, this patch omits path-absoluteness/existance check from
      'util.fspath()'.
      f63e4004
    • Katsunori FUJIWARA's avatar
      icasefs: retry directory scan once for already invalidated cache · a1f4bd47
      Katsunori FUJIWARA authored
      some hg operation (e.g.: qpush) create new files after first
      dirstate.walk()-ing, and it invalidates _fspathcache for fspath().
      
      then, fspath() will fail to look up specified name in _fspathcache.
      
      this causes case preservation breaking, because parts of already
      normcase()-ed path are used as result at that time.
      
      in this case, file creation and writing out should be done before
      fspath() invocation, so the second invocation of os.listdir() has not
      so much impact on runtime performance.
      a1f4bd47
  15. Sep 29, 2011
    • Angel Ezquerra's avatar
      push: propagate --new-branch and --ssh options when pushing subrepos · 309e4949
      Angel Ezquerra authored
      Up until now the all the push command options were ignored when pushing
      subrepos. In particular, the fact that the --new-branch command was not passed
      down to subrepos made it not possible to push a repo when any of its
      subrepos had a new branch, even if you used the --new-branch option of the push
      command.
      
      In addition the error message was confusing since it showed the following hint:
      "--new-branch hint: use 'hg push --new-branch' to create new remote branches".
      However using the --new_branch flag did not fix the problem, as it was ignored
      when pushing subrepos.
      
      This patch passes the --new-branch and --ssh flags to every subrepo that is
      pushed.
      
      Issues/Limitations:
      
      - All subrepo types get these flags, but only the mercurial subrepos use them.
      - It is no longer possible to _not_ pass down these flags to subrepos when
      pushing:
         * An alternative would be to introduce a --subrepos flag that should be
      used to pass down these flags to the subrepos.
         * If we did this, it could make sense to make the --force flag respect this
         new --subrepos flag as well for consistency's sake.
      - Matt suggested that the ssh related flags could also be passed down to
      subrepos during pull and clone. However it seems that it would be the "update"
      command that would need to get those, since subrepos are only pulled on update.
      In any case I'd prefer to leave that for a later patch.
      309e4949
  16. Dec 21, 2011
  17. Dec 20, 2011
  18. Dec 21, 2011
  19. Dec 19, 2011
  20. Dec 20, 2011
  21. Dec 21, 2011
  22. Dec 20, 2011
  23. Dec 15, 2011
Loading