Skip to content
Snippets Groups Projects
  1. Apr 20, 2015
  2. Apr 18, 2015
  3. Apr 19, 2015
  4. Apr 18, 2015
    • Matt Harbison's avatar
      largefiles: don't mangle filesets when fixing up the log matcher · 2553ef73
      Matt Harbison authored
      The fileset-generated.t test previously failed with this:
      
        +  hg: parse error: unknown identifier: .hglf/modified
        +  (did you mean 'modified'?)
        +  [255]
      
      Filesets will find the standins on their own, without any help.  While that's
      useful for some things like modified(), clean(), etc., it is wrong for things
      like size().  Proper fileset support for largefiles is not trivial, but this was
      failing with just the extension enabled on a normal repo.
      2553ef73
    • Matt Harbison's avatar
      largefiles: don't crash when cloning to a remote repo · e4e69ceb
      Matt Harbison authored
      The immediate crash was when checking for requirements immediately after this,
      but lfcommands.downloadlfiles() will also crash if --all-largefiles is
      specified.  That has been in place since atleast 5884812686f7 (2.3-rc) without
      anyone noticing.
      
      I can't tell from the peer classes if there's a way to make the custom largefile
      functionality work in this case, but atleast it doesn't crash.
      e4e69ceb
  5. Apr 17, 2015
  6. Apr 16, 2015
  7. Apr 12, 2015
    • Matt Harbison's avatar
      match: add a subclass for dirstate normalizing of the matched patterns · baa11dde
      Matt Harbison authored
      This class is only needed on case insensitive filesystems, and only
      for wdir context matches. It allows the user to not match the case of
      the items in the filesystem- especially for naming directories, which
      dirstate doesn't handle[1]. Making dirstate handle mismatched
      directory cases is too expensive[2].
      
      Since dirstate doesn't apply to committed csets, this is only created by
      overriding basectx.match() in workingctx, and only on icasefs.  The default
      arguments have been dropped, because the ctx must be passed to the matcher in
      order to function.
      
      For operations that can apply to both wdir and some other context, this ends up
      normalizing the filename to the case as it exists in the filesystem, and using
      that case for the lookup in the other context.  See the diff example in the
      test.
      
      Previously, given a directory with an inexact case:
      
        - add worked as expected
      
        - diff, forget and status would silently ignore the request
      
        - files would exit with 1
      
        - commit, revert and remove would fail (even when the commands leading up to
          them worked):
      
              $ hg ci -m "AbCDef" capsdir1/capsdir
              abort: CapsDir1/CapsDir: no match under directory!
      
              $ hg revert -r '.^' capsdir1/capsdir
              capsdir1\capsdir: no such file in rev 64dae27060b7
      
              $ hg remove capsdir1/capsdir
              not removing capsdir1\capsdir: no tracked files
              [1]
      
      Globs are normalized, so that the -I and -X don't need to be specified with a
      case match.  Without that, the second last remove (with -X) removes the files,
      leaving nothing for the last remove.  However, specifying the files as
      'glob:**.Txt' does not work.  Perhaps this requires 're.IGNORECASE'?
      
      There are only a handful of places that create matchers directly, instead of
      being routed through the context.match() method.  Some may benefit from changing
      over to using ctx.match() as a factory function:
      
        revset.checkstatus()
        revset.contains()
        revset.filelog()
        revset._matchfiles()
        localrepository._loadfilter()
        ignore.ignore()
        fileset.subrepo()
        filemerge._picktool()
        overrides.addlargefiles()
        lfcommands.lfconvert()
        kwtemplate.__init__()
        eolfile.__init__()
        eolfile.checkrev()
        acl.buildmatch()
      
      Currently, a toplevel subrepo can be named with an inexact case.  However, the
      path auditor gets in the way of naming _anything_ in the subrepo if the top
      level case doesn't match.  That is trickier to handle, because there's the user
      provided case, the case in the filesystem, and the case stored in .hgsub.  This
      can be fixed next cycle.
      
        --- a/tests/test-subrepo-deep-nested-change.t
        +++ b/tests/test-subrepo-deep-nested-change.t
        @@ -170,8 +170,15 @@
           R sub1/sub2/test.txt
           $ hg update -Cq
           $ touch sub1/sub2/folder/bar
        +#if icasefs
        +  $ hg addremove Sub1/sub2
        +  abort: path 'Sub1\sub2' is inside nested repo 'Sub1'
        +  [255]
        +  $ hg -q addremove sub1/sub2
        +#else
           $ hg addremove sub1/sub2
           adding sub1/sub2/folder/bar (glob)
        +#endif
           $ hg status -S
           A sub1/sub2/folder/bar
           ? foo/bar/abc
      
      The narrowmatcher class may need to be tweaked when that is fixed.
      
      
      [1] http://www.selenic.com/pipermail/mercurial-devel/2015-April/068183.html
      [2] http://www.selenic.com/pipermail/mercurial-devel/2015-April/068191.html
      baa11dde
    • Matt Harbison's avatar
      match: move _normalize() into the match class · 0b1577c8
      Matt Harbison authored
      This will be overridden in an upcoming patch to also deal with dirstate
      normalization on case insensitive filesystems.
      0b1577c8
  8. Jan 17, 2015
    • Mads Kiilerich's avatar
      largefiles: always consider updatelfiles 'checked' parameter set · b8c3a099
      Mads Kiilerich authored
      mergeupdate already set the flag to update all. This will thus only change
      overriderevert and scmutilmarktouched ... where the flag effectually also were
      true. The test coverage thus shows no change.
      
      As the flag always is set, it is removed.
      
      This is mainly a change for keeping the code simple and consistent and correct,
      but it should also make it faster in many cases.
      b8c3a099
Loading