Skip to content
Snippets Groups Projects
  1. Oct 17, 2013
    • Kaz Nishimura's avatar
      win32: improve the performance of win32.unlink() over CIFS · 1a9ebc83
      Kaz Nishimura authored
      Emulating POSIX unlink() behavior with os.rename() and os.unlink() is often slow
      especially over CIFS from Windows clients due to its protocol overhead. This
      patch changes win32.unlink() to try first an exclusive open with the Win32
      delete-on-close flag, and if a sharing violation is detected, to fall back to
      the original emulation.
      
      This patch also removes a test with os.path.isdir() since we expect opening a
      directory shall fail as os.unlink() would.
      
      Example measurements (repeated 3-times after 1-time calibration):
      
      (Without this patch: hg update from null to default)
      127 files updated, 0 files merged, 0 files removed, 0 files unresolved
      time: real 19.871 secs (user 0.328+0.000 sys 1.794+0.000)
      time: real 19.622 secs (user 0.312+0.000 sys 2.044+0.000)
      time: real 19.138 secs (user 0.250+0.000 sys 1.872+0.000)
      
      (Without this patch: hg update from default to null)
      0 files updated, 0 files merged, 127 files removed, 0 files unresolved
      time: real 35.158 secs (user 0.156+0.000 sys 2.512+0.000)
      time: real 35.272 secs (user 0.250+0.000 sys 2.512+0.000)
      time: real 36.569 secs (user 0.203+0.000 sys 2.387+0.000)
      
      (With this patch: hg update from null to default)
      127 files updated, 0 files merged, 0 files removed, 0 files unresolved
      time: real 17.893 secs (user 0.328+0.000 sys 1.700+0.000)
      time: real 18.512 secs (user 0.265+0.000 sys 1.529+0.000)
      time: real 20.238 secs (user 0.312+0.000 sys 1.685+0.000)
      
      (With this patch: hg update from default to null)
      0 files updated, 0 files merged, 127 files removed, 0 files unresolved
      time: real 12.312 secs (user 0.250+0.000 sys 0.811+0.000)
      time: real 12.471 secs (user 0.156+0.000 sys 0.889+0.000)
      time: real 9.727 secs (user 0.125+0.000 sys 0.858+0.000)
      1a9ebc83
  2. Feb 18, 2014
  3. Feb 03, 2014
    • Lucas Moscovicz's avatar
      revset: changed revsets to use spanset · 9ad6dae6
      Lucas Moscovicz authored
      Performance Benchmarking:
      
      $ hg perfrevset "first(all())"
      ! wall 0.304936 comb 0.300000 user 0.280000 sys 0.020000 (best of 33)
      
      $ ./hg perfrevset "first(all())"
      ! wall 0.175640 comb 0.180000 user 0.160000 sys 0.020000 (best of 56)
      9ad6dae6
  4. Feb 18, 2014
  5. Feb 17, 2014
  6. Feb 16, 2014
  7. Feb 11, 2014
  8. Feb 12, 2014
    • Durham Goode's avatar
      template: add 'current' to scope during {bookmarks % ...} · 5c65ee41
      Durham Goode authored
      This adds the keyword 'current' to the template scope when processing a
      bookmark list. The 'current' keyword resolves to the name of the currently
      active bookmark in the repo. This allows us to apply special labels to the
      current bookmark to distinguish it (especially in the case where there are
      multiple bookmarks on the same commit).
      
      Example: "{bookmarks % '{bookmark}{ifeq(bookmark, current, \"*\")} '}"
      
      Results in a space separated list of bookmarks where the current bookmark has
      an asterix.
      5c65ee41
    • Durham Goode's avatar
      template: add revset() template function · cda9d2b6
      Durham Goode authored
      Adds a template function that executes a revset and returns the list of
      revisions as the result. It has the signature 'revset(query [, args...])'. The
      args are optional and are applied to the query string using the standard
      python string.format(args) pattern. This allows things like:
      '{revset("parents({0})", rev)}' to produce the parents of each individual
      commit in the log output.  If no args are specified, the revset result is
      cached for the duration of the templater; so it's better to not use args if
      performance is a concern.
      
      By itself, revset() can be used to print commit parents, print the common
      ancestor of a commit with the main branch, etc.
      
      It can be used with the ifcontains() function to do things like
      '{ifcontains(rev, revset('.'), label(...), ...)}' to color the working copy
      parent, to color certain branches, to color draft commits, etc.
      cda9d2b6
    • Durham Goode's avatar
      template: add ifcontains template function · 1e43f15a
      Durham Goode authored
      Adds a template function with the signature 'ifcontains(item, set, then[,
      else])'.  It can be used to do things like '{ifcontains('.hgignore',
      file_mods, label(...), ...)}' to color commits that edit the .hgignore file.
      A future patch will add the revset() function which will combine with
      ifcontains to allow us to color commits if they are in the revset.
      1e43f15a
  9. Feb 14, 2014
    • Pierre-Yves David's avatar
      createmarkers: allow to pass metadata for a marker only · 2158e8f3
      Pierre-Yves David authored
      The `metadata` argument only allow to specify metadata for all new markers. We
      extension the format of the `relations` argument to support optional metadata
      argument.
      
      The first user of this should be the evolve extension who want to store parent
      information of pruned changeset in extra (until we make a second version of the
      format)
      2158e8f3
    • Pierre-Yves David's avatar
      obsstore: update create docstring to point to the coder friendly function · 3af218cf
      Pierre-Yves David authored
      The `obsstore` class have a `create` method that create new obsolescence marker
      from node. There is another function in the same module `createmarkers`. This
      other function is higher level and automatically missing meta data (ultimately
      calling the first one)
      
      We add a new comment in the docstring of `obsstore.create` highlighting that
      people writing new code probably want to use the top level one.
      3af218cf
  10. Feb 15, 2014
    • Katsunori FUJIWARA's avatar
      i18n: check equality of initial indentation between msgid and msgstr · 6afbfb9b
      Katsunori FUJIWARA authored
      Document generation by runrst in "doc" directory may succeed silently,
      even though initial indentation is different between msgid and msgstr:
      for example, it may be unexpected or missing indentation.
      
      This patch adds the checker to check equality of initial indentation
      between msgid and msgstr.
      
      This checker is categorized as "warning" level, because problem
      detected by this is not so serious for usual Mercurial usage.
      6afbfb9b
    • Katsunori FUJIWARA's avatar
      i18n: check equality of tail '::'-ness between msgid and msgstr · 410c8053
      Katsunori FUJIWARA authored
      Document generation by runrst in "doc" directory may succeed silently,
      even though there is the translated message missing tail '::'. In this
      case, it uses "<blockquote>" instead of "<pre>" to surround succeeding
      text block unexpectedly in generated HTML file.
      
      This patch adds the checker to check equality of tail '::'-ness
      between msgid and msgstr.
      
      To detect also msgstr unexpectedly ending with '::', this checker
      doesn't have matching regexp against msgid, and is applied on all
      msgid/msgstr pairs.
      
      This checker is categorized as "warning" level, because problem
      detected by this is not so serious for usual Mercurial usage.
      410c8053
    • Patrick Mézard's avatar
      run-tests: fix heredoctest for out-of-tree extensions · dcd3bebf
      Patrick Mézard authored
      heredoctest.py directory must be in python path to use heredoctest (>>>) in
      out-of-tree extension tests like:
      
        $ cd ext/tests
        $ python /some/hg/install/tests/run-tests.py test-ext.t
      dcd3bebf
  11. Feb 04, 2014
  12. Feb 16, 2014
  13. Feb 13, 2014
    • Simon Heimberg's avatar
      run-tests: unnecessary globs also count as warnings · edfbcc31
      Simon Heimberg authored
      When a glob is unnecessary, now there's a diff output and 'run-tests.py -i'
      works for accepting the output.
      On windows, some tests which have "passed" currently (with some info lines
      printed) will now be reported as "warned". (I recommend to recognize "warned"
      by buildbot before applying this patch.)
      edfbcc31
    • Simon Heimberg's avatar
      run-tests: report a test as warned when only missing globs · 8ac08939
      Simon Heimberg authored
      On windows, some test reported as failed will now be reported as "warned".
      8ac08939
    • Simon Heimberg's avatar
      run-tests: add possibility for test-runners to report a "warned" test result · 91d4f82c
      Simon Heimberg authored
      A test result is recognized as "warned" when the test runner returns the exit
      code False. (False is similar to 0, which is reporting a command has run
      sucessfully.)
      
      The only difference in display is that the failure message while running writes
      "Warning:" instead of "ERROR:". The diff output is the same as when the test
      fails. Runing "run-tests.py -i" asks to accept the changed result also for
      tests reported as "warned".
      
      When running tests, a "warned" test would look like this:
      ..
       --- xxxx\tests\test-something.t
       +++ xxxx\tests\test-something.t.err
      @@ -1279,7 +1279,7 @@
         $ echo anything
         $ hg commit -S -m whatever
         committing subrepository s
      -  committing subrepository s/sbs
      +  committing subrepository s/sbs (glob)
         warning: something happened
         committing subrepository t
         $ echo something
      
      Warning: xxxx\tests\test-sOMETHING.t output changed
      ~.s...s...s..
      
      
      Reporting a test result as "warned" will be used in following patches.
      91d4f82c
    • Simon Heimberg's avatar
      run-tests: separate exit code when no failed tests but warned ones · 38444739
      Simon Heimberg authored
      This can be used by buildbot to set the result "warnings" instead of "failed".
      38444739
    • Simon Heimberg's avatar
      run-tests: introduce 'warned' as test result · a46c9fea
      Simon Heimberg authored
      While running, a test resulting in 'warned' is shown as '~'.
      Test results with state warned are listed between the skipped and the failed
      tests. Example:
      Skipped test-revert-flags.t: missing feature: executable bit
      Skipped test-inotify-lookup.t: missing feature: inotify extension support
      Warned test-something.t: output changed
      Failed test-largefiles.t: output changed
      Failed test-subrepo.t: output changed
      # Ran 11 tests, 2 skipped, 1 warned, 2 failed.
      
      
      The test result "warned" will be used in later patches.
      a46c9fea
    • Simon Heimberg's avatar
      eca34583
    • Simon Heimberg's avatar
      run-tests: remove unnecessary variable initialisation · c230dba6
      Simon Heimberg authored
      ret is always set before it is used, so remove ret = 0
      c230dba6
  14. Feb 14, 2014
  15. Feb 07, 2014
  16. Feb 06, 2014
    • Mads Kiilerich's avatar
      discovery: improve "note: unsynced remote changes!" warning · 8a9e0b52
      Mads Kiilerich authored
      This message frequently caused confusion. "unsynced" is not a well established
      user-facing concept in Mercurial and the message was not very specific or
      helpful.
      
      Instead, show a message like:
        remote has heads on branch 'default' that are not known locally: 6c0482d977a3
      
      This message will also (when relevant) be shown before aborting on "push
      creates new remote head".
      
      A similar (but actually very different) message was addressed in 6b618aa08b6e.
      8a9e0b52
  17. Feb 12, 2014
    • Pierre-Yves David's avatar
      import: move tryone closure in cmdutil · ce3f3082
      Pierre-Yves David authored
      We extract the `tryone` function into the `cmdutil` module. A lot of the command
      context have to be passed to the utility function, but having and explicit
      declaration will allow extension to wrap it. This will allows use to make
      changeset evolution related experiment in dedicated extension.
      
      Improving the API of this function is noble goal but outside of the scope of
      this patches.
      ce3f3082
  18. Feb 13, 2014
  19. Feb 12, 2014
  20. Jan 17, 2014
  21. Feb 13, 2014
  22. Jan 31, 2014
    • Pierre-Yves David's avatar
      pull: move changeset pulling in its own function · 7b5ec1c7
      Pierre-Yves David authored
      pull: move changeset pulling in its own function
      
      Now that every necessary information is held in the `pulloperation` object, we
      can finally extract the changeset pulling to it's own function.
      
      This changeset is pure code movement only.
      7b5ec1c7
  23. Feb 11, 2014
    • Pierre-Yves David's avatar
      pull: move `fetch` subset into the object · 76e66654
      Pierre-Yves David authored
      Tree discovey use a `fetch` variable to know what is being pulled. We move this
      information in the `pulloperation` object. This make it possible to extract the
      changeset pulling logic into its own function.
      76e66654
Loading