Skip to content
Snippets Groups Projects
  1. May 19, 2015
  2. May 18, 2015
    • Matt Harbison's avatar
      match: explicitly naming a subrepo implies always() for the submatcher · ef4538ba67ef
      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.
      ef4538ba67ef
  3. May 17, 2015
    • Matt Harbison's avatar
      context: don't complain about a matcher's subrepo paths in changectx.walk() · ccb1623266eb
      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.
      ccb1623266eb
  4. May 19, 2015
    • Pierre-Yves David's avatar
      ssh: capture output with bundle2 again (issue4642) · 36111f98f23d
      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.
      36111f98f23d
  5. May 15, 2015
  6. May 10, 2015
    • Jordi Gutiérrez Hermoso's avatar
      rebase: clear merge when aborting before any rebasing (issue4661) · bd98d073a34f
      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.
      bd98d073a34f
    • Jordi Gutiérrez Hermoso's avatar
      test-rebase-abort: add test from issue4009 · 01ad8daae5be
      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.
      01ad8daae5be
  7. May 08, 2015
  8. May 01, 2015
    • Durham Goode's avatar
      histedit: fix --continue when rules are finished · 3c762cceedde
      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.
      3c762cceedde
    • Durham Goode's avatar
      histedit: fix serializing of None backupfile · a920abf5a592
      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.
      a920abf5a592
  9. May 06, 2015
    • Yuya Nishihara's avatar
      hgweb: bring back infinite scroll in shortlog of paper style · 169d2470d283
      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
      169d2470d283
    • Gregory Szorc's avatar
      extensions: clear aftercallbacks after execution (issue4646) · e6e7d1cce04d
      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.
      e6e7d1cce04d
  10. May 04, 2015
    • Yuya Nishihara's avatar
      templater: strictly parse leading backslashes of '{' (issue4569) (BC) · 890845af1ac2
      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 '\\{'.
      890845af1ac2
    • Yuya Nishihara's avatar
      templater: do not process \-escapes at parsestring() (issue4290) · db7463aa080f
      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.
      db7463aa080f
  11. May 05, 2015
    • Durham Goode's avatar
      histedit: fix test-histedit-edit on vfat · 5bc506ee87d2
      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.
      5bc506ee87d2
    • Matt Harbison's avatar
      archive: always use portable path component separators with subrepos · 41cd8171e58f
      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'.
      41cd8171e58f
  12. Apr 22, 2015
    • Durham Goode's avatar
      histedit: fix --edit-plan · b5eb01500696
      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.
      b5eb01500696
  13. Apr 30, 2015
  14. Apr 20, 2015
  15. May 03, 2015
  16. May 01, 2015
  17. Apr 30, 2015
  18. Apr 29, 2015
  19. Apr 30, 2015
    • Ryan McElroy's avatar
      10a13da8840d
    • Matt Harbison's avatar
      windows: make shellquote() quote any path containing '\' (issue4629) · eea3977e6fca
      Matt Harbison authored
      The '~' in the bug report is being expanded to a path with Windows style slashes
      before being passed to shellquote() via util.shellquote().  But shlex.split()
      strips '\' out of the string, leaving an invalid path in dispatch.aliasargs().
      
      This regressed in 1642eb429536.
      
      For now, the tests need to be conditionalized for Windows (because those paths
      are quoted).  In the future, a more complex regex could probably skip the quotes
      if all component separators are double '\'.  I opted to glob away the quotes in
      test-rename-merge2.t and test-up-local-change.t (which only exist on Windows),
      because they are in very large blocks of output and there are way too many diffs
      to conditionalize with #if directives.  Maybe the entire path should be globbed
      away like the following paths in each changed line.  Or, letting #if directives
      sit in the middle of the output as was mentioned a few months back would work
      too.
      
      Unfortunately, I couldn't figure out how to test the specific bug.  All of the
      'hg serve' tests have a #require serve declaration, causing them to be skipped
      on Windows.  Adding an alias for 'expandtest = outgoing ~/bogusrepo' prints the
      repo as '$TESTTMP/bogusrepo', so the test runner must be changing the
      environment somehow.
      eea3977e6fca
    • Matt Harbison's avatar
      test-commit-interactive: add more globs for no-execbit platforms · d7778b88838c
      Matt Harbison authored
      The ability to set the exec bit on Windows would be real handy for this test..
      d7778b88838c
    • Siddharth Agarwal's avatar
      ui: disable revsetaliases in plain mode (BC) · 09049042ab99
      Siddharth Agarwal authored
      ui.plain() is supposed to disable config options that change the UI to the
      detriment of scripts. As the test demonstrates, revset aliases can actually
      override builtin ones, just like command aliases. Therefore I believe this is a
      bugfix and appropriate for stable.
      09049042ab99
  20. Apr 29, 2015
    • Yuya Nishihara's avatar
      bundlerepo: disable filtering of changelog while constructing revision text · 995003a324da
      Yuya Nishihara authored
      This avoids the following error that happened if base revision of bundle file
      was hidden. bundlerevlog needs it to construct revision texts from bundle
      content as revlog.revision() does.
      
        File "mercurial/context.py", line 485, in _changeset
          return self._repo.changelog.read(self.rev())
        File "mercurial/changelog.py", line 319, in read
          text = self.revision(node)
        File "mercurial/bundlerepo.py", line 124, in revision
          text = self.baserevision(iterrev)
        File "mercurial/bundlerepo.py", line 160, in baserevision
          return changelog.changelog.revision(self, nodeorrev)
        File "mercurial/revlog.py", line 1041, in revision
          node = self.node(rev)
        File "mercurial/changelog.py", line 211, in node
          raise error.FilteredIndexError(rev)
        mercurial.error.FilteredIndexError: 1
      995003a324da
    • Matt Harbison's avatar
      merge: run update hook after the last wlock release · 51844b8b5017
      Matt Harbison authored
      There were 2 test failures in 3.4-rc when running test-hook.t with the
      largefiles extension enabled.  For context, the first is a commit hook:
      
        @@ -618,9 +621,9 @@
           $ echo 'update = hg id' >> .hg/hgrc
           $ echo bb > a
           $ hg ci -ma
        -  223eafe2750c tip
        +  d3354c4310ed+
           $ hg up 0
        -  cb9a9f314b8b
        +  223eafe2750c+ tip
           1 files updated, 0 files merged, 0 files removed, 0 files unresolved
      
         make sure --verbose (and --quiet/--debug etc.) are propagated to the local ui
      
      In both cases, largefiles acquires the wlock before calling into core, which
      also acquires the wlock.  The first case was fixed in 57f1dbc99631 by ensuring
      the hook only runs after the lock has been fully released.  The full release is
      important, because that is what writes dirstate to the disk, allowing external
      hooks to see the result of the update.  This simply changes how the update hook
      is called, so that it too is deferred until the lock is finally released.
      
      There are many uses of mergemod.update(), but in terms of commands, it looks
      like the following commands take wlock while calling mergemod.update(), and
      therefore will now have their hook fired at a later time:
      
          backout, fetch, histedit, qpush, rebase, shelve, transplant
      
      Unlike the others, fetch immediately unlocks after calling update(), so for all
      intents and purposes, its hook invocation is not deferred (but the external hook
      still sees the proper state).
      51844b8b5017
    • Katsunori FUJIWARA's avatar
      censor: remove meaningless explanation about .hgcensored · 5e111acc1170
      Katsunori FUJIWARA authored
      There is no code path handling ".hgcensored" in Mercurial source tree.
      
      This meaningless explanation may make users misunderstand about
      censor.
      5e111acc1170
    • Yuya Nishihara's avatar
      parsers: avoid signed integer overflow in calculation of leaf-node index · b3142ea2a0d4
      Yuya Nishihara authored
      If v = -INT_MAX - 1, -v would exceed INT_MAX. I don't think this would cause
      problems such as issue4627, but we can't blame it as a compiler bug because
      signed integer overflow is undefined in C.
      b3142ea2a0d4
    • Pierre-Yves David's avatar
      bundle2: disable ouput capture unless we use http (issue4613 issue4615) · e530cde6d115
      Pierre-Yves David authored
      The current bundle2 processing was capturing all output. This is nice as it
      provide better meta data about what output what, but this was changing two
      things:
      
      1) adding a prefix "remote: " to "other" output during local push (issue4613)
      2) local and ssh push does not provide real time output anymore (issue4615)
      
      As we are unsure about what form should be used in (1) and how to solve (2) we
      disable output capture in this two cases. Output capture can be forced using an
      experimental option.
      e530cde6d115
Loading