Skip to content
Snippets Groups Projects
  1. Jun 01, 2015
  2. May 29, 2015
  3. May 27, 2015
  4. May 26, 2015
  5. May 24, 2015
    • Katsunori FUJIWARA's avatar
      localrepo: pass hook argument txnid to pretxnopen hooks · a973b050
      Katsunori FUJIWARA authored
      Before this patch, hook argument `txnid` isn't passed to `pretxnopen`
      hooks, even though `hooks` section of `hg help config` describes so.
      
        ``pretxnopen``
          Run before any new repository transaction is open. The reason for the
          transaction will be in ``$HG_TXNNAME`` and a unique identifier for the
          transaction will be in ``HG_TXNID``. A non-zero status will prevent the
          transaction from being opened.
      a973b050
    • Katsunori FUJIWARA's avatar
      transaction: separate calculating TXNID from creating transaction object · 69c5cab0
      Katsunori FUJIWARA authored
      Before this patch, transaction ID (TXNID) is calculated from
      `transaction` object itself by `id()`, but this prevents TXNID from
      being passed to `pretxnopen` hooks, which should be executed before
      starting transaction processing (also any preparations for it, like
      writing journal files out).
      
      As a preparation for passing TXNID to `pretxnopen` hooks, this patch
      separates calculation of TXNID from creation of `transaction` object.
      
      This patch uses "random" library for reasonable unique ID. "uuid"
      library can't be used, because it was introduced since Python 2.5 and
      isn't suitable for Mercurial 3.4.x stable line.
      
      `%f` formatting for `random.random()` is used with explicit precision
      number 40, because default precision for `%f` is 6. 40 should be long
      enough, even if 10**9 transactions are executed in a short time (a
      second or less).
      
      On the other hand, `time.time()` is used to ensures uniqueness of
      TXNID in a long time, for safety.
      
      BTW, platform not providing `/dev/urandom` or so may cause failure of
      `import random` itself with some Python versions (see Python
      issue15340 for detail http://bugs.python.org/issue15340).
      
      But this patch uses "random" without any workaround, because:
      
        - "random" is already used directly in some code paths,
        - such platforms are very rare (e.g. Tru64 and HPUX), and
          http://bugs.python.org/issue15340#msg170000
        - updating Python runtime can avoid this issue
      69c5cab0
  6. May 23, 2015
    • Yuya Nishihara's avatar
      revbranchcache: return uncached branchinfo for nullrev (issue4683) · 38117278
      Yuya Nishihara authored
      This fixes the crash caused by "branch(null)" revset. No cache should be
      necessary for nullrev because changelog.branchinfo(nullrev) does not involve
      IO operation.
      
      Note that the problem of "branch(wdir())" isn't addressed by this patch.
      "wdir()" will raise TypeError in many places because of None. This is the
      reason why "wdir()" is still experimental.
      38117278
  7. May 24, 2015
    • Yuya Nishihara's avatar
      revset: drop magic of fullreposet membership test (issue4682) · e1645683
      Yuya Nishihara authored
      This patch partially backs out d2de20e1451f and adds an alternative workaround
      to functions that evaluate "null" and "wdir()". Because the new workaround is
      incomplete, "first(null)" and "min(null)" don't work as expected. But they were
      not usable until 3.4 and "null" isn't commonly used, we can postpone a complete
      fix for 3.5.
      
      The issue4682 was caused because "branch(default)" is evaluated to
      "<filteredset <fullreposet>>", keeping fullreposet magic. The next patch will
      fix crash on "branch(null)", but without this patch, it would make
      "null in <branch(default)>" be True, which means "children(branch(default))"
      would return all revisions but merge (p2 != null).
      
      I believe the right fix is to stop propagating fullreposet magic on filter(),
      but it wouldn't fit to stable release. Also, we should discuss how to handle
      "null" and "wdir()" in revset before.
      e1645683
  8. May 22, 2015
  9. May 19, 2015
  10. May 18, 2015
    • Matt Harbison's avatar
      match: explicitly naming a subrepo implies always() for the submatcher · ef4538ba
      Matt Harbison authored
      The files command supports naming directories to limit the output to children of
      that directory, and it also supports -S to force recursion into a subrepo.  But
      previously, using -S and naming a subrepo caused nothing to be output.  The
      reason was narrowmatcher() strips the current subrepo path off of each file,
      which would leave an empty list if only the subrepo was named.
      
      When matching on workingctx, dirstate.matches() would see the submatcher is not
      always(), so it returned the list of files in dmap for each file in the matcher-
      namely, an empty list.  If a directory in a subrepo was named, the output was as
      expected, so this was inconsistent.
      
      The 'not anypats()' check is enforced by an existing test around line 140:
      
          $ hg remove -I 're:.*.txt' sub1
      
      Without the check, this removed all of the files in the subrepo.
      ef4538ba
  11. May 17, 2015
    • Matt Harbison's avatar
      context: don't complain about a matcher's subrepo paths in changectx.walk() · ccb16232
      Matt Harbison authored
      Previously, the first added test printed the following:
      
        $ hg files -S -r '.^' sub1/sub2/folder
        sub1/sub2/folder: no such file in rev 9bb10eebee29
        sub1/sub2/folder: no such file in rev 9bb10eebee29
        sub1/sub2/folder/test.txt
      
      One warning occured each time a subrepo was crossed into.
      
      The second test ensures that the matcher copy stays in place.  Without the copy,
      the bad() function becomes an increasingly longer chain, and no message would be
      printed out for a file missing in the subrepo because the predicate would match
      in one of the replaced methods.  Manifest doesn't know anything about subrepos,
      so it needs help ignoring subrepos when complaining about bad files.
      ccb16232
  12. May 19, 2015
    • Pierre-Yves David's avatar
      ssh: capture output with bundle2 again (issue4642) · 36111f98
      Pierre-Yves David authored
      I just discovered that we are not displaying ssh server output in real time
      anymore. So we can just fall back to the bundle2 output capture for now. This
      fix the race condition issue we where seeing in tests. Re-instating real time
      output for ssh would fix the issue too but lets get the test to pass first.
      36111f98
  13. May 15, 2015
  14. May 10, 2015
    • Jordi Gutiérrez Hermoso's avatar
      rebase: clear merge when aborting before any rebasing (issue4661) · bd98d073
      Jordi Gutiérrez Hermoso authored
      The check of the inrebase function was not correct, and it failed to
      consider the situation in which nothing has been rebased yet, *and*
      the working dir had been updated away from the initial revision.
      
      But this is easy to fix. Given the rebase state, we know exactly where
      we should be standing: on the first unrebased commit. We check that
      instead. I also took the liberty to rename the function, as "inrebase"
      doesn't really describe the situation: we could still be in a rebase
      state yet the user somehow forcibly updated to a different revision.
      
      We also check that we're in a merge state, since an interrupted merge
      is the only "safe" way to interrupt a rebase. If the rebase got
      interrupted by power loss or whatever (so there's no merge state),
      it's still safer to not blow away the working directory.
      bd98d073
    • Jordi Gutiérrez Hermoso's avatar
      test-rebase-abort: add test from issue4009 · 01ad8daa
      Jordi Gutiérrez Hermoso authored
      The fix for issue4009, namely fe78eb7bcca0, introduced issue4661.
      Let's make sure that the fix for issue4661 will not reintroduce
      issue4009.
      01ad8daa
  15. May 08, 2015
  16. May 01, 2015
    • Durham Goode's avatar
      histedit: fix --continue when rules are finished · 3c762cce
      Durham Goode authored
      If histedit failed after all the rules were complete (for instance, if there was
      an exception in the cleanup phase), you couldn't --continue because it was
      unable to pop a rule. Let's just skip the rule execution phase of --continue if
      there are no more rules.
      3c762cce
    • Durham Goode's avatar
      histedit: fix serializing of None backupfile · a920abf5
      Durham Goode authored
      If the histedit backupfile was None (like if evolve is enabled) it would get
      serialized as 'None' into the state file. Later if the histedit was aborted and
      the top most commit was unreachable (ex: if it was obsolete or stripped),
      histedit would try to unbundle the backupfile and try to read .hg/None.
      
      This fixes it to not serialize None. Since it only happens with evolve, I'm not
      sure how to add test coverage here.
      a920abf5
  17. May 06, 2015
    • Yuya Nishihara's avatar
      hgweb: bring back infinite scroll in shortlog of paper style · 169d2470
      Yuya Nishihara authored
      Since fdf7794be41d, column headers are wrapped by <thead> element, so the first
      and only <tbody> contains changelog data. I got the following error without
      this patch:
      
          Uncaught TypeError: Cannot read property 'lastElementChild' of null
            scrollHandler @ mercurial.js:375
      169d2470
    • Gregory Szorc's avatar
      extensions: clear aftercallbacks after execution (issue4646) · e6e7d1cc
      Gregory Szorc authored
      It was reported that enabling pager without color could cause a hang.
      Inserting print statements revealed that the callbacks in
      extensions._aftercallbacks were being invoked twice.
      
      extensions.loadall can be called multiple times. If entries in
      extensions._aftercallbacks linger between calls, this could result
      in double execution of the callbacks. This can lead to unwanted
      behavior.
      
      The reproduce steps in the bug seem to only occur when the output of
      a command is less than the size of the current screen. This is not
      something that can easily be tested. I verified the test case works
      with this patch and that pager and color interaction continues to
      work. Since we have no existing automated tests for pager, this sadly
      appears to be the best testing I can do.
      e6e7d1cc
  18. May 04, 2015
    • Yuya Nishihara's avatar
      templater: strictly parse leading backslashes of '{' (issue4569) (BC) · 890845af
      Yuya Nishihara authored
      Because double backslashes are processed as a string escape sequence, '\\{'
      should start the template syntax. On the other hand, r'' disables any sort
      of \-escapes, so r'\{' can go either way, never start the template syntax
      or always start it. I simply chose the latter, which means r'\{' is the same
      as '\\{'.
      890845af
    • Yuya Nishihara's avatar
      templater: do not process \-escapes at parsestring() (issue4290) · db7463aa
      Yuya Nishihara authored
      This patch brings back pre-2.8.1 behavior.
      
      The result of parsestring() is stored in templater's cache, t.cache, and then
      it is parsed as a template string by compiletemplate(). So t.cache should keep
      an unparsed string no matter if it is sourced from config value. Otherwise
      backslashes would be processed twice.
      
      The test vector is borrowed from 64b4f0cd7336.
      db7463aa
  19. May 05, 2015
    • Durham Goode's avatar
      histedit: fix test-histedit-edit on vfat · 5bc506ee
      Durham Goode authored
      test-histedit-edit was broken because it relied on the HGEDITOR script being
      executable. Instead, lets just execute 'sh' and pass it the script to run. This
      seems to be the pattern followed in other tests.
      5bc506ee
    • Matt Harbison's avatar
      archive: always use portable path component separators with subrepos · 41cd8171
      Matt Harbison authored
      The previous behavior when archiving a subrepo 's' on Windows was to internally
      name the file under it 's\file', due to the use of vfs.reljoin().  When printing
      the file list from the archive on Windows or Linux, the file was named
      's\\file'.  The archive extracted OK on Windows, but if the archive was brought
      to a Linux system, it created a file named 's\file' instead of a directory 's'
      containing 'file'.
      
      *.zip format achives seemed not to have the problem, but this was definitely an
      issue with *.tgz archives.
      
      Largefiles actually got this right, but a test is added to keep this from
      regressing.  The subrepo-deep-nested-change.t test was repurposed to archive to
      a file, since there are several subsequent tests that archive to a directory.
      The output change is losing the filesystem prefix '../archive_lf' and not
      listing the directories 'sub1' and 'sub1/sub2'.
      41cd8171
  20. Apr 22, 2015
    • Durham Goode's avatar
      histedit: fix --edit-plan · b5eb0150
      Durham Goode authored
      --edit-plan was completely broken from the command line because it used an old
      api that was not updated (it would crash with a stack trace). Let's update it
      and add tests to catch this.
      b5eb0150
  21. Apr 30, 2015
  22. Apr 20, 2015
  23. May 03, 2015
  24. May 01, 2015
  25. Apr 30, 2015
Loading