Skip to content
Snippets Groups Projects
  1. Apr 22, 2017
  2. Mar 15, 2017
    • Durham Goode's avatar
      branchmap: handle nullrev in setcachedata · a5bad127128d
      Durham Goode authored
      906be86990c4 recently changed to switch from:
      
        self._rbcrevs[rbcrevidx:rbcrevidx + _rbcrecsize] = rec
      
      to
      
        pack_into(_rbcrecfmt, self._rbcrevs, rbcrevidx, node, branchidx)
      
      This causes an exception if rbcrevidx is -1 (i.e. the nullrev). The old code
      handled this because python handles out of bound sets to arrays gracefully. The
      new code throws because the self._rbcrevs buffer isn't long enough to write 8
      bytes to.  Normally it would've been resized by the immediately preceding line,
      but because the 0 length buffer is greater than the idx (-1) times the size, no
      resize happens.
      
      Setting the branch for the nullrev doesn't make sense anyway, so let's skip it.
      This was caught by external tests in the Facebook extensions repo, but I've
      added a test here that catches the issue.
      a5bad127128d
  3. Feb 25, 2017
  4. Aug 18, 2016
    • Yuya Nishihara's avatar
      templater: fix if() to not evaluate False as bool('False') · 034412ca28c3
      Yuya Nishihara authored
      Before, False was True. This patch fixes the issue by processing True/False
      transparently. The other values (including integer 0) are tested as strings
      for backward compatibility, which means "if(latesttagdistance)" never be False.
      
      Should we change the behavior of "if(0)" as well?
      034412ca28c3
  5. Aug 05, 2016
  6. Jul 18, 2016
  7. Mar 13, 2016
  8. Feb 08, 2016
  9. May 22, 2015
  10. Feb 25, 2015
    • Durham Goode's avatar
      revbranchcache: write cache even during read operations · 9347c15d8136
      Durham Goode authored
      Previously we would only actually write the revbranchcache to disk if we were in
      the middle of a write operation (like commit). Now we will also write it during
      any read operation. The cache knows how to invalidate itself, so it shouldn't
      become corrupt if multiple writers try at once (and the write-on-read
      behavior/risk is the same as all our other caches).
      9347c15d8136
  11. Mar 17, 2015
  12. Jan 14, 2015
    • Mads Kiilerich's avatar
      branchcache: add debug output whenever cache files use truncate · 7aa1405528a3
      Mads Kiilerich authored
      The cache files are usually append only but will automatically be truncated and
      recover in exceptional situations. Add a debug notice when such exceptional
      situations are encountered.
      7aa1405528a3
    • Mads Kiilerich's avatar
      tests: rework revision branch cache tests · 01426cad66dc
      Mads Kiilerich authored
      The tests that were added with the revision branch cache in 678f53865c68 had
      suffered from bit rot in the development iterations. They were no longer that
      "good".
      
      Now, the tests are rewritten and reworked to be more readable and maintainable
      and relevant for the actual implementation.
      
      This also utilizes the new 'f' helper tool for keeping an eye the cache files.
      01426cad66dc
  13. Jan 07, 2015
    • Mads Kiilerich's avatar
      revset: use localrepo revbranchcache for branch name filtering · 678f53865c68
      Mads Kiilerich authored
      Branch name filtering in revsets was expensive. For every rev it created a
      changectx and called .branch() which retrieved the branch name from the
      changelog.
      
      Instead, use the revbranchcache.
      
      The revbranchcache is used read-only. The revset implementation with generators
      and callbacks makes it hard to figure out when we are done using/updating the
      cache and could write it back. It would also be 'tricky' to lock the repo for
      writing from within a revset execution. Finally, the branchmap update will
      usually make sure that the cache is updated before any revset can be run.
      The revbranchcache is used without any locking but is short-lived and used in a
      tight loop where we can assume that the changelog doesn't change ... or where
      it not is relevant to us if it does.
      
      perfrevset 'branch(mobile)' on mozilla-central.
      Before:
      ! wall 10.989637 comb 10.970000 user 10.940000 sys 0.030000 (best of 3)
      After, no cache:
      ! wall 7.368656 comb 7.370000 user 7.360000 sys 0.010000 (best of 3)
      After, with cache:
      ! wall 0.528098 comb 0.530000 user 0.530000 sys 0.000000 (best of 18)
      
      The performance improvement even without cache come from being based on
      branchinfo on the changelog instead of using ctx.branch().
      
      Some tests are added to verify that the revbranchcache works and keep an eye on
      when the cache files actually are updated.
      678f53865c68
  14. Nov 04, 2014
  15. Oct 02, 2014
  16. May 02, 2013
    • Iulian Stana's avatar
      commit: amending with --close-branch (issue3445) · b500a663a2c7
      Iulian Stana authored
      You can't close a branch that hasn't got a head.
      newbranch + commit --close-branch must fail
      newbranch + commit + commit --amend --close-branch must fail
      
      You must not be allowed to close a branch that is not defined.
      b500a663a2c7
  17. May 07, 2013
  18. Apr 10, 2013
    • Mads Kiilerich's avatar
      commit: allow closing "non-head" changesets · f3245f22771c
      Mads Kiilerich authored
      Backout acd61dc44a39. The changeset prevented closing non-head changesets but
      did not provide any rationale or test case and I don't see what value it adds.
      Users might have their reasons to commit something anywhere - and close it
      immediately.
      
      And contrary to the comment that is removed: The topo heads set is _not_
      included in the branch heads set of the current branch. It do not include
      closed topological heads.
      
      The change thus prevented closing commits on top of closing commits. A valid
      usecase for that is to merge closed heads to reduce the number of topological
      heads.
      
      The only existing test coverage for this is the failing double close in
      test-revset.t. It was added in 3cc2e34d7a7d and seems to not be intentional.
      f3245f22771c
  19. Nov 27, 2012
    • Tim Henigan's avatar
      update: allow update to existing branches with invalid names (issue3710) · b74361cf7c0a
      Tim Henigan authored
      Starting with 361ab1e2086f, users are no longer able to update a
      working copy to a branch named with a "bad" character (such as ':').
      
      Prior to v2.4, it was possible to create branch names using "bad"
      characters, so this breaks backwards compatibility.
      
      Mercurial must allow users to update to existing branches with bad
      names.  However, it should continue to prevent the creation of new
      branches with bad names.
      
      A test was added to confirm that 'hg update' works as expected. The
      test uses a bundled repo that was created with an earlier version of
      Mercurial.
      b74361cf7c0a
  20. Oct 21, 2012
  21. Oct 18, 2012
    • Kevin Bullock's avatar
      scmutil: add bad character checking to checknewlabel · 361ab1e2086f
      Kevin Bullock authored
      This factors out the checks from tags and bookmarks, and newly applies
      the same prohibitions to branches. checknewlabel takes a new parameter,
      kind, indicating the kind of label being checked.
      
      Test coverage is added for all three types of labels.
      361ab1e2086f
  22. Jun 10, 2012
    • kiilerix's avatar
      tests: add missing trailing 'cd ..' · f2719b387380
      kiilerix authored
      Many tests didn't change back from subdirectories at the end of the tests ...
      and they don't have to. The missing 'cd ..' could always be added when another
      test case is added to the test file.
      
      This change do that tests (99.5%) consistently end up in $TESTDIR where they
      started, thus making it simpler to extend them or move them around.
      f2719b387380
  23. May 07, 2012
  24. Dec 08, 2011
  25. May 02, 2011
    • Peter Arrenbrecht's avatar
      localrepo: reuse parent manifest in commitctx if no files have changed · 301725c3df9a
      Peter Arrenbrecht authored
      This speeds up the in-memory version of debugbuilddag that I'm
      working on considerably for the case where we want to build just
      a 00changelog.i (for discovery tests, for instance).
      
      There are a couple of test changes because node ids in tests
      have changed.
      
      The changes to the patch names in test-mq-qdelete.t were required
      because they could collide with nodeid abbreviations and newly
      actually do (patch "c" collides with id "cafe..." for patch "b").
      301725c3df9a
  26. Apr 21, 2011
    • Danek Duvall's avatar
      color: add support for terminfo-based attributes and color · e0f07847f8de
      Danek Duvall authored
      Using terminfo instead of hard-coding ECMA-48 control sequences provides a
      greater assurance that the terminal codes are correct for the current
      terminal type; not everything supports the ANSI escape codes.
      
      It also allows us to use a wider range of colors when a terminal emulator
      supports it (such as 16- or 256-color xterm), and a few more non-color
      attributes, such as the ever-popular blink.
      e0f07847f8de
  27. Nov 08, 2010
  28. Sep 16, 2010
  29. Jul 29, 2010
    • Jeremy Whitlock's avatar
      color: enable branches support · 52ec5c813723
      Jeremy Whitlock authored
      This commit updates the branches command to use ui.label for the branch names
      and the changeset.  This implementation allows assigning colors to the four
      states of a branch: active, closed, current and inactive.  While you can
      configure color for the four states, only current and closed have default colors
      of green and black bold respectively.
      52ec5c813723
  30. Aug 14, 2010
  31. Feb 11, 2010
  32. Jul 01, 2009
Loading