Skip to content
Snippets Groups Projects
  1. Jan 21, 2014
  2. Jan 20, 2014
  3. Jan 21, 2014
  4. Jan 20, 2014
  5. Jan 16, 2014
    • Jordi Gutiérrez Hermoso's avatar
      record: re-enable whitespace-ignoring options · 4988e4246537
      Jordi Gutiérrez Hermoso authored
      It looks like somewhere down the line, patch.diffopts changed the
      names of the options that it recognises, but record.recordfunc wasn't
      updated to the new names. Instead of trying to write down names at
      all, we now use whatever names are provided in commands.diffwsopts and
      pass that along to patch.diffopts, along with a couple of custom
      options
      4988e4246537
    • Jordi Gutiérrez Hermoso's avatar
      record: use commands.diffwsopts instead of ad-hoc diffopts · 0076643077a3
      Jordi Gutiérrez Hermoso authored
      The record extension is writing its own version of commands.diffwsopts
      which is identical to commands.diffwsopts. Based on the principle that
      code duplication increases maintenance burden, this patch removes
      record's ad-hoc diffopts in favour of commands.diffwsopts
      0076643077a3
  6. Nov 17, 2013
  7. Nov 16, 2013
    • Mads Kiilerich's avatar
      largefiles: stylistic cleanup of filemerge · 9d350fa0708e
      Mads Kiilerich authored
      9d350fa0708e
    • Mads Kiilerich's avatar
      largefiles: show hashes before prompting for conflict resolution · 8f412d034173
      Mads Kiilerich authored
      The largefile hashes are mostly an implementation detail, but they are "leaked"
      in several places anyway, and showing the hashes is better than not giving the
      user any information about the options in the prompt.
      
      The hashes are long, but it is largefile hashes and it would thus be confusing
      to shorten them.
      8f412d034173
    • Mads Kiilerich's avatar
      largefiles: don't try to explain rename history before prompt for conflicts · 675f578856dd
      Mads Kiilerich authored
      Before it tried to explain the exact situation when merging moved largefiles.
      That do not happen for normal merges and is not more relevant for largefiles
      than for normal files. It is unneeded complexity - remove it.
      675f578856dd
    • Mads Kiilerich's avatar
      largefiles: drop redundant special handling of merges of renames · 36333ff8c54d
      Mads Kiilerich authored
      It is unclear what cases this was supposed to cover but it do no longer seem
      relevant.
      36333ff8c54d
    • Mads Kiilerich's avatar
      diff: search beyond ancestor when detecting renames · 243ea5ffdf31
      Mads Kiilerich authored
      This removes an optimization that was introduced in 91eb4512edd0 but was too
      aggressive - as indicated by how it changed test-mq-merge.t .
      
      We are walking filelogs to find copy sources and we can thus not be sure to hit
      the base revision and find the renamed file there - it could also be in the
      first ancestor of the base ... in the filelog.
      
      We are walking the filelog and can thus not easily know when we hit the first
      ancestor of the base revision and which filename to look for there. Instead, we
      use _findlimit like mergecopies do: The lower bound for how far we have to go
      is found from the lowest changelog revision that is an ancestor of only one of
      the compared revisions. Any filelog ancestor with a revision number lower than
      that revision will be the ancestor of both compared revisions, and there is
      thus no reason to go further back than that.
      243ea5ffdf31
  8. Jan 14, 2014
    • Durham Goode's avatar
      cat: increase perf when catting single files · 2f6b3900be64
      Durham Goode authored
      Special case the single file case in hg cat. This allows us to avoid
      parsing the manifest, which shaves 15% off hg cat perf. This is worth
      it, since automation often uses hg cat for retrieving single files.
      2f6b3900be64
    • Durham Goode's avatar
      changectx: increase perf of walk function · 8dc254198a8f
      Durham Goode authored
      When running 'hg cat -r . <file>' it was doing an expensive ctx.walk(m) which
      applied the regex to every file in the manifest.
      
      This changes changectx.walk to iterate over just the files in the regex, if no
      other patterns are specified. This cuts hg cat time by 50% in our repo and
      probably benefits a few other commands as well.
      8dc254198a8f
  9. Jan 16, 2014
  10. Jan 17, 2014
    • Katsunori FUJIWARA's avatar
      doc: add description about pattern matching against directories · 50db996bccaf
      Katsunori FUJIWARA authored
      Before this patch, there is no explicit description about pattern
      matching against directories, even though users may understand it from
      "plain examples" in "hg help patterns".
      
      This patch adds description about pattern matching against
      directories.
      50db996bccaf
    • Katsunori FUJIWARA's avatar
      revset: add explanation about the pattern without explicit kind · 96be25f1da45
      Katsunori FUJIWARA authored
      Before this patch, online help of "adds()", "contains()", "filelog()",
      "file()", "modifies()" and "removes()" predicates doesn't explain
      about how the pattern without explicit kind like "glob:" is treated,
      even though each predicates treat it differently:
      
        - as "relpath:" by "adds()", "modifies()" and "removes()"
      
        - as "glob:" by "file()"
      
        - as special by "contains()" and "filelog()"
          - be relative to cwd, and
          - match against a file exactly
            ("relpath:" matches also against a directory)
      
      This may confuse users.
      
      This patch adds explanation about the pattern without explicit kind
      to these predicates.
      96be25f1da45
    • Katsunori FUJIWARA's avatar
      revset: use "canonpath()" for "filelog()" pattern without explicit kind · b61ad01c4e73
      Katsunori FUJIWARA authored
      Before this patch, revset predicate "filelog()" uses "match.files()"
      to get filename also for the pattern without explicit kind.
      
      But in such case, only canonicalization of relative path is required,
      and other initializations of "match" object including regexp
      compilation are meaningless.
      
      This patch uses "pathutil.canonpath()" directly for "filelog()"
      pattern without explicit kind like "glob:", for efficiency.
      
      This patch also does below as a part of introducing "canonpath()":
      
        - move location of "matchmod.match()" invocation, because "m" is no
          more used in "if not matchmod.patkind(pat)" code path
      
        - omit passing "default" argument to "matchmod.match()", because
          "pat" should have explicit kind of pattern in this code path
      b61ad01c4e73
    • Katsunori FUJIWARA's avatar
      revset: avoid loop for "match.files()" having always one element for efficiency · f3cef19befb1
      Katsunori FUJIWARA authored
      This patch avoids the loop for "match.files()" having always one
      element in revset predicate "filelog()" for efficiency: "match" object
      "m" is constructed with "[pat]" as "patterns" argument.
      f3cef19befb1
    • Katsunori FUJIWARA's avatar
      revset: make default kind of pattern for "contains()" rooted at cwd · 760151697a4f
      Katsunori FUJIWARA authored
      Before this patch, default kind of pattern for revset predicate
      "contains()" is treated as the exact file path rooted at the root of
      the repository. This decreases usability, because:
      
        - all other predicates taking pattern argument (also "filelog()")
          treat such pattern as the path rooted at the current working
          directory
      
        - "contains()" doesn't describe this difference in its help
      
        - this difference may confuse users
      
          for example, this prevents revset aliases from sharing same
          argument between "contains()" and other predicates
      
      
      This patch makes default kind of pattern for revset predicate
      "contains()" be rooted at the current working directory.
      
      This patch uses "pathutil.canonpath()" instead of creating "match"
      object for efficiency.
      760151697a4f
    • Katsunori FUJIWARA's avatar
      revset: narrow scope of the variable referred only in specific code path · 189fe1b3d16a
      Katsunori FUJIWARA authored
      This patch narrows scope of the variable "m" in the function for
      revset predicate "contains()", because it is referred only in "else"
      code path of "if not matchmod.patkind(pat)" examination.
      189fe1b3d16a
    • Simon Heimberg's avatar
      tests: fix test-run-tests.py on OS X · e1e6ddaef299
      Simon Heimberg authored
      Do the same hack as in test-doctests.py to let the test pass on OS X.
      e1e6ddaef299
    • Simon Heimberg's avatar
      tests: test-debugcommands.t also matches stack trace on python 2.4 · 2b96073f3138
      Simon Heimberg authored
      Some versions of python 2.4 write ? instead of <module>. Ignore this detail by
      a glob.
      This fixes a failure spotted on buildbot, existing since this test lines were
      introduced 47d0843647d1.
      2b96073f3138
  11. Jan 15, 2014
    • Sean Farley's avatar
      commands: use bookmarks.validdest instead of duplicating logic · 2cfb720592fe
      Sean Farley authored
      Now that bookmarks.py has grown a validdest method that even handles successor
      changesets, we use that instead of duplicating the logic in commands.py
      2cfb720592fe
    • Sean Farley's avatar
      update: consider successor changesets when moving active bookmark · 67ee87a371b2
      Sean Farley authored
      Previously, when an obsolete changeset was bookmarked, successor changesets were not considered
      when moving the bookmark forward. Now that a bare update will move to the tip most of the
      successor changesets, we also update the bookmark logic to allow the bookmark to move with this
      update.
      
      Tests have been updated and keep issue4015 covered as well.
      67ee87a371b2
    • Sean Farley's avatar
      merge: consider successor changesets for a bare update · 95b9c6149e17
      Sean Farley authored
      Previously, a bare update would ignore any successor changesets thus
      potentially leaving you on an obsolete head. This happens commonly when there
      is an old bookmark that hasn't been moved forward which is the motivating
      reason for this patch series.
      
      Now, we will check for successor changesets if two conditions hold: 1) we are
      doing a bare update 2) *and* we are currently on an obsolete head.
      
      If we are in this situation, then we calculate the branchtip of the successor
      set and update to that changeset.
      
      Tests coverage has been added.
      95b9c6149e17
  12. Nov 06, 2013
  13. Jan 16, 2014
  14. Jan 09, 2014
  15. Jan 08, 2014
    • Pierre-Yves David's avatar
      backout: avoid update on simple case. · 2123d27ff75d
      Pierre-Yves David authored
      Before the changeset the backout process was:
      1) go to <target>
      2) revert to <target> parent
      3) update back to changeset we came from
      
      The two update steps can takes a very long time to move back and forth unrelated
      file change between <target> and current working directory.
      
      The new process is just merging current working directory with the parent of
      <target> using <target> as ancestor. This give the very same result but skip
      the two updates. On big repo with a lot of files and changes that save a lots of
      time (x20 for one week window).
      
      The "merge" version (hg backout --merge) is still done with upgrades. We could
      imagine using in memory commit to speed it up but this is another fish.
      2123d27ff75d
  16. Jan 16, 2014
    • Simon Heimberg's avatar
      run-tests: print more information on unnecessary glob matching · 7a259dfe24f7
      Simon Heimberg authored
      Extend the message with the test name and the approximate line number. (The
      line number is the one of the command producing the output.)
      Finding the line to fix is easier now.
      
      old message:
      ......
      Info, unnecessary glob: at a/b/c (glob)
      ..
      
      new message:
      ......
      Info, unnecessary glob in test-example.t (after line 9): at a/b/c (glob)
      ..
      
      
      The test result is still pass as before.
      7a259dfe24f7
    • Simon Heimberg's avatar
      run-tests: suggest to append glob when only path sep does not match · d9d6cbbeef0d
      Simon Heimberg authored
      When the line does not match because of \ instead of / (on windows), append
      (glob) in the expected output.
      This allows to rename test-bla.t.err to test-bla.t for getting a correct
      output. This worked for other failures like missing (esc), but not here.
      
        Output example (only +- lines of diff):
      Before:
      -  path/with/local/sep
      +  path\\with\\local/sep
      Now:
      -  path/with/local/sep
      +  path/with/local/sep (glob)
      d9d6cbbeef0d
    • Simon Heimberg's avatar
      run-tests: test each line matching function on its own · 9e3eb009a404
      Simon Heimberg authored
      This has several advantages.
       * Each match function can return some information to the caller runone (used in
         the next patch).
       * It is not checked that the line ends in " (glob)" when rematch() returns
         false.
       * And it looks more readable.
      9e3eb009a404
    • Simon Heimberg's avatar
      tests: new test for line matching functions in run-tests · 4453d08a616a
      Simon Heimberg authored
      Test for failing matches and warnings. (The existing test-run-tests.t can not
      do both by design.) And simulate matching on other os.
      4453d08a616a
  17. Jan 09, 2014
Loading