Skip to content
Snippets Groups Projects
  1. Dec 02, 2015
  2. Nov 25, 2015
  3. Dec 01, 2015
  4. Nov 15, 2015
    • liscju's avatar
      rebase: add returning value from pullrebase function · 6979fe2a
      liscju authored
      So far pullrebase function has always returned None value, no matter
      what orig function returned. This behaviour made impossible for
      pull to change returned value from mercurial process (it has always
      ended with 0 value by default). This patch makes pullrebase returning
      with returned value from orig.
      6979fe2a
  5. Nov 13, 2015
  6. Nov 12, 2015
    • Gregory Szorc's avatar
      tags: create new sortdict for performance reasons · 8a256cee
      Gregory Szorc authored
      sortdict internally maintains a list of keys in insertion order. When a
      key is replaced via __setitem__, we .remove() from this list. This
      involves a linear scan and array adjustment. This is an expensive
      operation.
      
      The tags reading code was calling into sortdict.__setitem__ for each tag
      in a read .hgtags revision. For repositories with thousands of tags or
      thousands of .hgtags revisions, the overhead from list.remove()
      noticeable.
      
      This patch creates a new sortdict() so __setitem__ calls don't incur a
      list.remove.
      
      This doesn't appear to have any performance impact on my Firefox
      repository. But that's only because tags reading doesn't show up in
      profiles to begin with. I'm still waiting to hear from a user with over
      10,000 tags and hundreds of heads on the impact of this patch.
      8a256cee
    • Katsunori FUJIWARA's avatar
      share: wrap bmstore._writerepo for transaction sensitivity (issue4940) · a7eecd02
      Katsunori FUJIWARA authored
      46dec89fe888 made 'bmstore.write()' transaction sensitive, to restore
      original bookmarks correctly at failure of a transaction.
      
      For example, shelve and unshelve imply steps below:
      
        before 46dec89fe888:
          1. move active bookmark forward at internal rebasing
          2. 'bmstore.write()' writes updated ones into .hg/bookmarks
          3. rollback transaction to remove internal commits
          4. restore updated bookmarks manually
      
        after 46dec89fe888:
          1. move active bookmark forward at internal rebasing
          2. 'bmstore.write()' doesn't write updated ones into .hg/bookmarks
             (these are written into .hg/bookmarks.pending, if external hook
             is spawn)
          3. rollback transaction to remove internal commits
          4. .hg/bookmarks should be clean, because it isn't changed while
             transaction running: see (2) above
      
      But if shelve or unshelve is executed in the repository created with
      "shared bookmarks" ("hg share -B"), this doesn't work as expected,
      because:
      
        - share extension makes 'bmstore.write()' write updated bookmarks
          into .hg/bookmarks of shared source repository regardless of
          transaction activity, and
      
        - intentional transaction failure at the end of shelve/unshelve
          doesn't restore already updated .hg/bookmarks of shared source
      
      This patch makes share extension wrap 'bmstore._writerepo()' instead
      of 'bmstore.write()', because the former is used to actually write
      bookmark changes out.
      a7eecd02
  7. Nov 10, 2015
  8. Nov 09, 2015
  9. Nov 07, 2015
    • Anton Shestakov's avatar
      dockerlib: allow non-unique uid and gid of $DBUILDUSER (issue4657) · 271a8020
      Anton Shestakov authored
      There are make targets for building mercurial packages for various
      distributions using docker. One of the preparation steps before building is to
      create inside the docker image a user with the same uid/gid as the current user
      on the host system, so that the resulting files have appropriate
      ownership/permissions.
      
      It's possible to run `make docker-<distro>` as a user with uid or gid that is
      already present in a vanilla docker container of that distibution. For example,
      issue4657 is about failing to build fedora packages as a user with uid=999 and
      gid=999 because these ids are already used in fedora, and groupadd fails.
      useradd would fail too, if the flow ever got to it (and there was a user with
      such uid already).
      
      A straightforward (maybe too much) way to fix this is to allow non-unique uid
      and gid for the new user and group that get created inside the image. I'm not
      sure of the implications of this, but marmoute encouraged me to try and send
      this patch for stable.
      271a8020
  10. Nov 09, 2015
    • Mateusz Kwapich's avatar
      dirstate: fix filefoldmap incosistency on file delete · 663eff02
      Mateusz Kwapich authored
      The _filefoldmap is not updated in when files are deleted from dirstate. In the
      case where the file with the same but differently cased name is added afterwards
      it renders _filefoldmap incorrect.  Those steps must occur to for a problem to
      reproduce:
       - call status (with listunknown=True),
       - update working rectory to a commit which does a casefolding change (A -> a)
       - call status again (it will show the file "a" as deleted)
      
      Unfortunately I'm unable to write a test for it because I don't know any
      core-mercurial command able to reproduce those steps.
      
      The bug was originally spotted when hgwatchman was enabled. It caused the
      changeset contents change during hg rebase (one file unrelarted to changeset
      was deleted in it after rebase).
      
      The hgwatchman is able to hit it because when hgignore changes the hgwatchmans
      overridestatus is calling original status with listunknown=True.
      663eff02
    • Steve Borho's avatar
      wix: style-coal.css has been renamed · 29ca5b76
      Steve Borho authored
      29ca5b76
  11. Nov 05, 2015
  12. Nov 06, 2015
  13. Nov 01, 2015
    • Yuya Nishihara's avatar
      demandimport: fix level passed to loader of sub-modules · 78d05778
      Yuya Nishihara authored
      As the fromlist gives the names of sub-modules, they should be searched in
      the parent directory of the package's __init__.py, which is level=1.
      
      I got the following error by rewriting hgweb to use absolute_import, where
      the "mercurial" package is referenced as ".." (level=2):
      
        ValueError: Attempted relative import beyond toplevel package
      
      I know little about the import mechanism, but this change seems correct.
      Before this patch, the following code did import the os module with no error:
      
        from mercurial import demandimport
        demandimport.enable()
        from mercurial import os
        print os.name
      78d05778
  14. Nov 07, 2015
    • Yuya Nishihara's avatar
      parsers: fix width of datalen variable in fm1readmarkers · ce03e728
      Yuya Nishihara authored
      Because parsers.c does not define PY_SSIZE_T_CLEAN, "s#" format requires
      (const char*, int), not (const char*, Py_ssize_t).
      
      https://docs.python.org/2/c-api/arg.html
      
      This error had no problem before 042344313939, where datalen wasn't used.
      But now fm1readmarkers() fails with "overflow in obsstore" on Python 2.6.9
      (amd64) because upper bits of datalen seem to be filled with 1, making it
      a negative integer.
      
      This problem seems not visible on our Python 2.7 environment because upper
      bits happen to be filled with 0.
      ce03e728
  15. Nov 06, 2015
    • Pierre-Yves David's avatar
      hooks: back 9f272bf3b342 out · 10a1a4b3
      Pierre-Yves David authored
      Changeset 9f272bf3b342 alters the 'HG_PENDING' mechanism to be "always" there.
      This change is made under the assumption than we previously did it only when
      "writepending() actually wrote something". This assumption was wrong,
      'writepending()' informs of pending changes the first time something is written
      and for all following calls. We back this change out to restore the former
      behavior, which was already correct.
      10a1a4b3
  16. Nov 04, 2015
    • Durham Goode's avatar
      hooks: fix hooks not firing if prechangegroup was set (issue4934) · e7c618ce
      Durham Goode authored
      We need to call delayupdate again after writing to the changelog.
      Otherwise the prechangegroup hook consumes the delayupdate subscription and
      future hooks don't see the pending changes (see issue 4934 for more details).
      
      Adds a test that triggers the prechangegroup hook before the pretxnchangegroup
      hook and verifies that the output of pretxnchangegroup doesn't change.
      e7c618ce
    • Durham Goode's avatar
      hooks: always include HG_PENDING · 9f272bf3
      Durham Goode authored
      Previously we would only include HG_PENDING in the hook args if the
      transaction's writepending() actually wrote something. This is a bad criteria,
      since it's possible that a previous call to writepending() wrote stuff and the
      hooks want to still see that.
      
      The solution is to always have hooks execute within the scope of the pending
      changes by always putting HG_PENDING in the environment.
      9f272bf3
  17. Nov 03, 2015
    • Gregory Szorc's avatar
      wireproto: move clonebundles command from extension (issue4931) · e5a1df51
      Gregory Szorc authored
      The SSH peer class accesses wireproto.commands[cmd] as part of encoding
      command arguments. Previously, the wire protocol command was defined in
      the clonebundles extension. If the client didn't have this extension
      enabled (which it likely doesn't since it is meant as a server-side
      extension), then clients attempting to clone via ssh:// would get a
      crash due to a KeyError accessing wireproto.commands['clonebundles']
      when cloning from a server that is advertising clone bundles.
      
      Moving the definition of the wire protocol command to wireproto.py makes
      this problem go away.
      
      A side effect of this code move is servers will always respond to
      "clonebundles" wire protocol command requests. This should be fine: the
      server will return an empty response unless a clone bundles manifest
      file is present and clients shouldn't call the command unless the server
      is advertising the capability, which only happens if the clonebundles
      extension is enabled and the manifest file exists.
      e5a1df51
  18. Nov 04, 2015
    • Yuya Nishihara's avatar
      templatefilters: try round-trip utf-8 conversion by json filter (issue4933) · baa77652
      Yuya Nishihara authored
      As JSON string is known to be a unicode, we should try round-trip conversion
      for localstr type. This patch tests localstr type explicitly because
      encoding.fromlocal() may raise Abort for undecodable str, which is probably
      not what we want. Maybe we can refactor json filter to use encoding module
      more later.
      
      Still "{desc|json}" can't round-trip because showdescription() modifies a
      localstr object.
      baa77652
  19. Nov 03, 2015
  20. Nov 01, 2015
  21. Oct 31, 2015
    • Katsunori FUJIWARA's avatar
      i18n: look translation of both "DEPRECATED" and "(DEPRECATED)" up · 47dd34f2
      Katsunori FUJIWARA authored
      Since 44cc9f63a2f1, deprecated commands, options and so on are
      detected by "(DEPRECATED)" instead of "DEPRECATED".
      
      "hg.pot" generated from recent source files doesn't contain msgid
      "DEPRECATED", and looking the translation of "DEPRECATED" up in
      up-to-date *.po files works incorrectly.
      
      But on the other hand, there are still old *.po files, which contain
      msgid "DEPRECATED" but not "(DEPRECATED)". Looking the translation of
      "(DEPRECATED)" up in such old *.po files also works incorrectly.
      
      This patch resolves this problem by looking translation of both
      "DEPRECATED" and "(DEPRECATED)" up.
      
      This should work correctly, because previous patch makes "deprecated"
      checker be applied only on translations, of which msgid contains exact
      "(DEPRECATED)" string.
      
      'p.msgstr' examination in 'deprecatedsetup()' is needed to ignore
      untranslated entries. This also makes 'deprecatedpe.msgstr'
      examination in 'deprecated()' meaningless.
    • Katsunori FUJIWARA's avatar
      i18n: fix regexp pattern to detect translation for DEPRECATED · 33894fac
      Katsunori FUJIWARA authored
      Since 44cc9f63a2f1, deprecated commands, options and so on are
      detected by "(DEPRECATED)" instead of "DEPRECATED".
      
      Therefore, 'deprecated' checker in i18n/check-translation.py should
      check translation, of which msgid contains "(DEPRECATED)" instead of
      "DEPRECATED".
      
      At glance, it seems to do so, but it actually doesn't, because Python
      regexp treats "()" as grouping of patterns and "(DEPRECATED)" matches
      only against "DEPRECATED".
      33894fac
  22. Nov 01, 2015
    • Matt Harbison's avatar
      scmutil: abort if an empty revision is given to revpair() · 88c4e97b
      Matt Harbison authored
      When using 'extdiff --patch' to check the changes in a rebase, 'precursors(x)'
      evaluated to an empty set because I forgot the --hidden flag, so the other
      revision was used as the replacement for the empty set.  The result was the
      patch for the other revision was diffed against itself, and the tool saying
      there were no differences.  That's misleading since the expected diff args were
      silently changed, so it's better to bail out.
      
      The other uses of scmutil.revpair() are commands.diff and commands.status, and
      it doesn't make sense to allow an empty revision there either.  The code here
      was suggested by Yuya Nishihara.
      88c4e97b
    • Wagner Bruna's avatar
      i18n-pt_BR: synchronized with a9ed5a8fc5e0 · 6fabc931
      Wagner Bruna authored
      6fabc931
  23. Oct 31, 2015
  24. Oct 26, 2015
    • Augie Fackler's avatar
      packaging: rework version detection and declaration (issue4912) · 6474b640
      Augie Fackler authored
      Previously the -rc in our rc tags got dropped, meaning that those
      packages looked newer to the packaging system than the later release
      build. This rectifies the issue, though some damage may already have
      been done on 3.6-rc builds.
      
      I'm mostly cargo-culting the RPM version format - there don't appear
      to be rules for RPM about how to handle this. Hopefully an RPM
      enthusiast can fix up what I've done as a followup.
      6474b640
  25. Oct 27, 2015
Loading