Skip to content
Snippets Groups Projects
  1. Jan 01, 2012
  2. Dec 31, 2011
  3. Dec 30, 2011
  4. Dec 29, 2011
  5. Dec 27, 2011
  6. 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
  7. Dec 20, 2011
  8. Dec 15, 2011
  9. Dec 19, 2011
  10. Dec 16, 2011
  11. Dec 09, 2011
    • Martin Geisler's avatar
      largefiles: handle merges between normal files and largefiles (issue3084) · 9036c7d1
      Martin Geisler authored
      The largefiles extension prevents users from adding a normal file
      named 'foo' if there is already a largefile with the same name.
      However, there was a loop-hole: when merging, it was possible to bring
      in a normal file named 'foo' while also having a '.hglf/foo' file.
      
      This patch fixes this by extending the manifest merge to deal with
      these kinds of conflicts. If there is a normal file 'foo' in the
      working copy, and the other parent brings in a '.hglf/foo' file, then
      the user will be prompted to keep the normal file or the largefile.
      Likewise for the symmetric case where a normal file is brought in via
      the second parent. The prompt looks like this:
      
        $ hg merge
        foo has been turned into a largefile
        use (l)argefile or keep as (n)ormal file?
      
      After the merge, either the '.hglf/foo' file or the 'foo' file will
      have been deleted. This would cause status to return output like:
      
        $ hg status
        M foo
        R foo
      
      To fix this, the lfiles_repo.status method is changed so that a
      removed normal file isn't shown if there is largefile with the same
      name, and vice versa for largefiles.
      9036c7d1
  12. Dec 14, 2011
  13. Dec 17, 2011
  14. Dec 15, 2011
  15. Dec 12, 2011
  16. Dec 15, 2011
  17. Dec 14, 2011
  18. Dec 15, 2011
  19. Dec 09, 2011
    • Martin Geisler's avatar
      largefiles: fix 'hg status' abort after merge · 5b66e55c
      Martin Geisler authored
      If a largefile is introduced on the branch that is merged into the
      working copy, then 'hg status' would abort with an error like:
      
         $ hg status
         abort: .hglf/foo@33fdd332ec64: not found in manifest!
      
      The problem was that the largefiles status code only looked in the
      first parent for the largefile. Largefiles are now always reported as
      modified if they don't exist in the first parent -- this matches the
      behavior of localrepo.status for normal files.
      5b66e55c
  20. Dec 06, 2011
  21. Dec 08, 2011
Loading