Skip to content
Snippets Groups Projects
  1. Jun 07, 2014
  2. Jun 29, 2014
    • Angel Ezquerra's avatar
      repoview: do not crash when localtags refers to non existing revisions · 925d1bb9a971
      Angel Ezquerra authored
      This fixes a crash that may happen when using mercurial 3.0.x.
      
      The _gethiddenblockers function assumed that the output of tags.readlocaltags()
      was a dict mapping tags to of valid nodes. However this was not necessarily the
      case. When a repository had obsolete revisions and had local tag pointing to a
      non existing revision was found, many mercurial commands would crash.
      
      This revision fixes the problem by removing any tags from the output of
      tags.readlocaltags() which point to invalid nodes.
      
      We may want to add a warning when this happens (although it might be
      annoying to get that warning for every command, possibly even more than once per
      command).
      
      A test for this problem has been added to test-obsolete.t. Without this fix the
      test would output:
      
        $ hg tags
        abort: 00changelog.i@3816541e5485: no node!
        [255]
      
      Instead of:
      
        $ hg tags
        tiptag                             2:3816541e5485
        tip                                2:3816541e5485
        visible                            0:193e9254ce7e
      925d1bb9a971
  3. Jun 25, 2014
    • Siddharth Agarwal's avatar
      match: make glob '**/' match the empty string · a4b67bf1f0a5
      Siddharth Agarwal authored
      Previously, a glob pattern of the form 'foo/**/bar' would match 'foo/a/bar' but
      not 'foo/bar'. That was because the '**' in 'foo/**/bar' would be translated to
      '.*', making the final regex pattern 'foo/.*/bar'. That pattern doesn't match
      the string 'foo/bar'.
      
      This is a bug because the '**/' glob matches the empty string in standard Unix
      shells like bash and zsh.
      
      Fix that by making the ending '/' optional if an empty string can be matched.
      a4b67bf1f0a5
  4. Jun 19, 2014
  5. Jun 18, 2014
  6. Jun 16, 2014
  7. Jun 14, 2014
  8. Jun 13, 2014
  9. Jun 09, 2014
  10. Jun 11, 2014
  11. May 26, 2014
    • Mads Kiilerich <madski at unity3d.com>'s avatar
      resolve: keep wlock while resolving · 14560418856d
      Mads Kiilerich authored
      This will make resolve use correct locking and thus make it more safe.
      
      Resolve is usually a long running command spending a lot of time waiting for
      user input on hard problems. It is thus a real world scenario to start multiple
      resolves at once or run other commands (such as up -C and merge) while resolve
      is running. Proper locking prevents that.
      14560418856d
  12. Jun 05, 2014
    • Katsunori FUJIWARA's avatar
      keyword: suppress keyword expansion while 'hg fetch' for internal merge · 2668a78df8ba
      Katsunori FUJIWARA authored
      Before this patch, 'hg fetch' may cause unexpected conflict, if 'hg
      fetch'-ed changes are located near lines in which keywords are
      embedded, because keywords are substituted with other strings in the
      working directory.
      
      This patch suppresses keyword expansion while 'hg fetch' for internal
      merge by adding 'fetch' to 'restricted' command list like 'merge'.
      
      This patch uses 'hg import' to safely create the new head to be merged
      at succeeding 'hg fetch', because:
      
        - branch of revision #10 is different from one of #11 in 'Test'
          repository, so just 'hg fetch -r 11' doesn't cause merging between
          them
      
          this means the new head should be created manually.
      
        - 'hg import' is easier and safer than 'cat <<EOF' and 'hg commit'
          to replay same changes including special characters like '$'
      
          safeness of 'hg import' with keyword extension is already examined
          in 'test-keyword.t'.
      2668a78df8ba
    • Katsunori FUJIWARA's avatar
      keyword: suppress keyword expansion while 'hg histedit' for internal merge · e22cfd1ae97c
      Katsunori FUJIWARA authored
      Before this patch, 'hg histedit' may cause unexpected conflict, if 'hg
      histedit'-ed changes are located near lines in which keywords are
      embedded, because keywords are substituted with other strings in the
      working directory.
      
      This patch suppresses keyword expansion while 'hg histedit' for
      internal merge by adding 'histedit' to 'restricted' command list like
      'merge'.
      
      Test in this patch just swaps order of revision #13 and #14: this is
      enough to cause internal merge.
      e22cfd1ae97c
    • Katsunori FUJIWARA's avatar
      keyword: suppress keyword expansion while 'hg backout' for internal merge · 5c64c338fa9f
      Katsunori FUJIWARA authored
      Before this patch, 'hg backout' may cause unexpected conflict, if 'hg
      backout'-ed changes are located near lines in which keywords are
      embedded, because keywords are substituted with other strings in the
      working directory.
      
      This patch suppresses keyword expansion while 'hg backout' for
      internal merge by adding 'backout' to 'restricted' command list like
      'merge'.
      5c64c338fa9f
    • Katsunori FUJIWARA's avatar
      keyword: suppress keyword expansion while 'hg graft' for internal merge · dd5ca1a32109
      Katsunori FUJIWARA authored
      Before this patch, 'hg graft' may cause unexpected conflict, if 'hg
      graft'-ed changes are located near lines in which keywords are
      embedded, because keywords are substituted with other strings in the
      working directory.
      
      This patch suppresses keyword expansion while 'hg graft' for internal
      merge by adding 'graft' to 'restricted' command list like 'merge'.
      dd5ca1a32109
    • Katsunori FUJIWARA's avatar
      keyword: suppress keyword expansion while 'hg rebase' for internal merge · 65dd65c645ed
      Katsunori FUJIWARA authored
      Before this patch, 'hg rebase' may cause unexpected conflict, if 'hg
      rebase'-ed changes are located near lines in which keywords are
      embedded, because keywords are substituted with other strings in the
      working directory.
      
      This patch suppresses keyword expansion while 'hg rebase' for internal
      merge by adding 'rebase' to 'restricted' command list like 'merge'.
      
      This patch specifies '--keep' to 'hg rebase', because revision #10 is
      useful also for tests in succeeding patches.
      65dd65c645ed
    • Katsunori FUJIWARA's avatar
      keyword: suppress keyword expansion while 'hg unshelve' for internal merge · 99f7e5fe35f2
      Katsunori FUJIWARA authored
      Before this patch, 'hg unshelve' may cause unexpected conflict, if 'hg
      unshelve'-ed changes are located near lines in which keywords are
      embedded, because keywords are substituted with other strings in the
      working directory.
      
      This patch suppresses keyword expansion while 'hg unshelve' for
      internal merge by adding 'unshelve' to 'restricted' command list like
      'merge'.
      99f7e5fe35f2
  13. Jun 01, 2014
  14. May 22, 2014
  15. May 30, 2014
  16. May 07, 2014
  17. May 22, 2014
    • Pierre-Yves David's avatar
      wireproto: expose the list of getbundle arguments to extensions · 3cb2da25b171
      Pierre-Yves David authored
      For now, getbundle accepts a fixed number of arguments: ``heads``, ``common``
      and ``bundlecaps``. We make this list exposed at the module level to let
      extensions add content there. This is important for extensions that wish to use
      bundle2 for other contents than changegroup.
      3cb2da25b171
  18. May 08, 2014
  19. May 17, 2014
  20. May 27, 2014
  21. May 17, 2014
    • Yuya Nishihara's avatar
      alias: handle shlex error in command aliases · c5afb07c33d3
      Yuya Nishihara authored
      No command should fail with ValueError just because there is unparseable
      alias definition.
      
      It returns 1 like other badalias handlers, but should be changed to 255 in
      a later version because we use 255 for general command error.
      c5afb07c33d3
  22. May 08, 2014
    • Katsunori FUJIWARA's avatar
      subrepo: normalize path in the specific way for problematic encodings · 8dd17b19e722
      Katsunori FUJIWARA authored
      Before this patch, "reporelpath()" uses "rstrip(os.sep)" to trim
      "os.sep" at the end of "parent.root" path.
      
      But it doesn't work correctly with some problematic encodings on
      Windows, because some multi-byte characters in such encodings contain
      '\\' (0x5c) as the tail byte of them.
      
      In such cases, "reporelpath()" leaves unexpected '\\' at the beginning
      of the path returned to callers.
      
      "lcalrepository.root" seems not to have tail "os.sep", because it is
      always normalized by "os.path.realpath()" in "vfs.__init__()", but in
      fact it has tail "os.sep", if it is a root (of the drive): path
      normalization trims tail "os.sep" off "/foo/bar/", but doesn't trim
      one off "/".
      
      So, just avoiding "rstrip(os.sep)" in "reporelpath()" causes
      regression around issue3033 fixed by fccd350acf79.
      
      This patch introduces "pathutil.normasprefix" to normalize specified
      path in the specific way for problematic encodings without regression
      around issue3033.
      8dd17b19e722
    • Katsunori FUJIWARA's avatar
      subrepo: avoid sanitizing ".hg/hgrc" in meta data area for non-hg subrepos · 5900bc09e684
      Katsunori FUJIWARA authored
      Before this patch, sanitizing ".hg/hgrc" scans directories and files
      also in meta data area for non-hg subrepos: under ".svn" for
      Subversion subrepo, for example.
      
      This may cause not only performance impact (especially in large scale
      subrepos) but also unexpected removing meta data files.
      
      This patch avoids sanitizing ".hg/hgrc" in meta data area for non-hg
      subrepos.
      
      This patch stops checking "ignore" target at the first
      (case-insensitive) appearance of it, because continuation of scanning
      is meaningless in almost all cases.
      5900bc09e684
    • Katsunori FUJIWARA's avatar
      subrepo: make "_sanitize()" take absolute path to the root of subrepo · a01988cd9b61
      Katsunori FUJIWARA authored
      Before this patch, "hg update" doesn't sanitize ".hg/hgrc" in non-hg
      subrepos correctly, if "hg update" is executed not at the root of the
      parent repository.
      
      "_sanitize()" takes relative path to subrepo from the root of the
      parent repository, and passes it to "os.walk()". In this case,
      "os.walk()" expects CWD to be equal to the root of the parent
      repository.
      
      So, "os.walk()" can't find specified path (or may scan unexpected
      path), if CWD isn't equal to the root of the parent repository.
      
      Non-hg subrepo under nested hg-subrepos may cause same problem, too:
      CWD may be equal to the root of the outer most repository, or so.
      
      This patch makes "_sanitize()" take absolute path to the root of
      subrepo to sanitize correctly in such cases.
      
      This patch doesn't normalize the path to hostile files as the one
      relative to CWD (or the root of the outer most repository), to fix the
      problem in the simple way suitable for "stable".
      
      Normalizing should be done in the future: maybe as a part of the
      migration to vfs.
      a01988cd9b61
    • Katsunori FUJIWARA's avatar
      subrepo: invoke "_sanitize()" also after "git merge --ff" · 7f7f634d073d
      Katsunori FUJIWARA authored
      Before this patch, sanitizing ".hg/hgrc" in git subrepo doesn't work,
      when the working directory is updated by "git merge --ff".
      
      "_sanitize()" is not invoked after checking target revision out into
      the working directory in this case, even though it is invoked
      indirectly via "checkout" (or "rawcheckout") in other cases.
      
      This patch invokes "_sanitize()" explicitly also after "git merge
      --ff" execution.
      7f7f634d073d
Loading