Skip to content
Snippets Groups Projects
  1. May 15, 2015
  2. 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
  3. May 08, 2015
  4. 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
  5. 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
  6. 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
  7. 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
  8. 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
  9. Apr 30, 2015
  10. Apr 20, 2015
  11. May 03, 2015
  12. May 01, 2015
  13. Apr 30, 2015
  14. Apr 29, 2015
  15. Apr 30, 2015
    • Ryan McElroy's avatar
    • Matt Harbison's avatar
      windows: make shellquote() quote any path containing '\' (issue4629) · eea3977e
      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.
      eea3977e
    • Matt Harbison's avatar
      test-commit-interactive: add more globs for no-execbit platforms · d7778b88
      Matt Harbison authored
      The ability to set the exec bit on Windows would be real handy for this test..
      d7778b88
    • Siddharth Agarwal's avatar
      ui: disable revsetaliases in plain mode (BC) · 09049042
      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.
      09049042
  16. Apr 29, 2015
    • Yuya Nishihara's avatar
      bundlerepo: disable filtering of changelog while constructing revision text · 995003a3
      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
      995003a3
    • Matt Harbison's avatar
      merge: run update hook after the last wlock release · 51844b8b
      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).
      51844b8b
    • Katsunori FUJIWARA's avatar
      censor: remove meaningless explanation about .hgcensored · 5e111acc
      Katsunori FUJIWARA authored
      There is no code path handling ".hgcensored" in Mercurial source tree.
      
      This meaningless explanation may make users misunderstand about
      censor.
      5e111acc
    • Yuya Nishihara's avatar
      parsers: avoid signed integer overflow in calculation of leaf-node index · b3142ea2
      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.
      b3142ea2
    • Pierre-Yves David's avatar
      bundle2: disable ouput capture unless we use http (issue4613 issue4615) · e530cde6
      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.
      e530cde6
  17. Feb 03, 2015
    • Matt Harbison's avatar
      subrepo: propagate the --hidden option to hg subrepositories · cc497780
      Matt Harbison authored
      With many commands accepting a '-S' or an explicit path to trigger recursing
      into subrepos, it seems that --hidden needs to be propagated too.
      Unfortunately, many of the subrepo layer methods discard the options map, so
      passing the option along explicitly isn't currently an option.  It also isn't
      clear if other filtered views need to be propagated, so changing all of those
      commands may be insufficient anyway.
      
      The specific jam I got into was amending an ancestor of qbase in a subrepo, and
      then evolving.  The patch ended up being hidden, and outgoing said it would only
      push one unrelated commit.  But push aborted with an 'unknown revision' that I
      traced back to the patch.  (Odd it didn't say 'filtered revision'.)  A push with
      --hidden worked from the subrepo, but that wasn't possible from the parent repo
      before this.
      
      Since the underlying problem doesn't actually require a subrepo, there's
      probably more to investigate here in the discovery area.  Yes, evolve + mq is
      not exactly sane, but I don't know what is seeing the hidden revision.
      
      In lieu of creating a test for the above situation (evolving mq should probably
      be blocked), the test here is a marginally useful case where --hidden is needed
      in a subrepo: cat'ing a file in a hidden revision.  Without this change, cat
      aborts with:
      
        $ hg --hidden cat subrepo/a
        skipping missing subrepository: subrepo
        [1]
      cc497780
  18. Apr 28, 2015
  19. Apr 27, 2015
    • Laurent Charignon's avatar
      revert: make the interactive mode experimental · 12908cdb
      Laurent Charignon authored
      While fixing issue4304: "record: allow editing new files" we introduced
      changes in record/crecord. These changes need to be matched with changes in any
      command using record. Revert is one of these commands and the changes have
      not been made for this release. Therefore, revert -i should be an experimental
      feature for this release.
      12908cdb
    • Laurent Charignon's avatar
      shelve: make the interactive mode experimental · 3510ec97
      Laurent Charignon authored
      While fixing issue4304: "record: allow editing new files" we introduced
      changes in record/crecord. These changes need to be matched with changes in any
      command using record. Shelve is one of these commands and the changes have
      not been made for this release. Therefore, shelve -i should be an experimental
      feature for this release.
      3510ec97
Loading