Skip to content
Snippets Groups Projects
  1. Oct 09, 2014
    • Pierre-Yves David's avatar
      test-import.t: use proper revset order · d7cedb32a8ab
      Pierre-Yves David authored
      This test, written after 3.0, is relying on addset being enforced ascending if
      both side are ascending. We are about to restore the ordering to 2.9 behavior
      (elements are ordered in the order they are specified). We fix the test before
      fixing the order.
      d7cedb32a8ab
    • Pierre-Yves David's avatar
      baseset: drop custom __sub__ method · 88e8a18329d3
      Pierre-Yves David authored
      This add method is enforcing non-laziness, disabling multiple optimisations.
      
      Benchmarks do not spot any significant difference but real usecase may. This
      will also be important for further improvements to addset later in this series.
      88e8a18329d3
    • Pierre-Yves David's avatar
      baseset: drop custom __and__ method · c1546d7400ef
      Pierre-Yves David authored
      This add method is enforcing non-laziness, disabling multiple optimisations.
      
      Benchmarks do not spot any significant regression but real usecase may. This
      even gives some speedup in some cases:
      
      revset #15: min(0::)
      before) wall 0.001247 comb 0.000000 user 0.000000 sys 0.000000 (best of 1814)
      after)  wall 0.000942 comb 0.000000 user 0.000000 sys 0.000000 (best of 2367)
      
      This will also be important for further improvement to addset later in this series.
      c1546d7400ef
    • Pierre-Yves David's avatar
      baseset: drop custom __add__ method · b5492b6bc7e8
      Pierre-Yves David authored
      This add method is enforcing non-laziness, disabling multiple optimisations.
      
      Benchmarks do not spot any significant differences but real usecase may. This
      will also be important for further improvements to addset later in this series.
      b5492b6bc7e8
  2. Sep 17, 2014
  3. Oct 09, 2014
    • Pierre-Yves David's avatar
      obsolete: introduce a new binary encoding for obsmarkers (version 1) · 974389427e5f
      Pierre-Yves David authored
      This new encoding explicitly stores the date and parents allowing a
      significantly faster marker decoding. See inline documentation for details.
      
      This format is not yet used to store format on disk. But it will be used in
      bundle2 exchange if both side support it. Support for on-disk format is coming
      in other changesets.
      974389427e5f
  4. Oct 10, 2014
    • Pierre-Yves David's avatar
      obsstore: add a flag for sha256 hashes · b078e4dc9f9a
      Pierre-Yves David authored
      We add flag to inform that the marker is using sha256 hashes. As format 0 is not
      able to handle sha256 hashes (32 bytes long), we plain crash if we even attempt to
      encode a sha256 with it.
      b078e4dc9f9a
  5. Oct 09, 2014
  6. Oct 10, 2014
  7. Oct 08, 2014
    • Jordi Gutiérrez Hermoso's avatar
      shelve: don't delete "." when rebase is a no-op (issue4398) · d43d116a118c
      Jordi Gutiérrez Hermoso authored
      When unshelving and facing a conflict, if we resolve all conflicts in
      favour of the committed changes instead of the shelved changes, then
      the ensuing implicit rebase is a no-op. That is, there is nothing to
      rebase. In this case, there are no extra intermediate shelve commits
      to strip either. Prior to this change, the commit being unshelved to
      would be marked for destruction in a rather catastrophic way.
      
      The relevant part of the test case failed as follows:
      
          $ hg unshelve -c
          unshelve of 'default' complete
          $ hg diff
          warning: ignoring unknown working parent 33f7f61e6c5e!
          diff --git a/a/a b/a/a
          new file mode 100644
          --- /dev/null
                 b/a/a
          @@ -0,0   1,3 @@
            a
            c
            x
          $ hg status
          warning: ignoring unknown working parent 33f7f61e6c5e!
          M a/a
          ? a/a.orig
          ? foo/foo
          $ hg summary
          warning: ignoring unknown working parent 33f7f61e6c5e!
          parent: -1:000000000000  (no revision checked out)
          branch: default
          commit: 1 modified, 2 unknown (new branch head)
          update: 4 new changesets (update)
      
      With this change, this test case now passes.
      d43d116a118c
    • Martin von Zweigbergk's avatar
      merge: make error message consistent with other commands · 18b3869179f9
      Martin von Zweigbergk authored
      If a merge is attempted when another merge is already ongoing, we give
      the message "outstanding uncommitted merges". Many other commands
      (such as backout, rebase, histedit) give the same message in singular
      form. Since the singular form also seems to make more sense, let's use
      that for 'hg merge' as well.
      18b3869179f9
  8. Oct 10, 2014
  9. Oct 09, 2014
    • durin42's avatar
      run-tests: handle --jobs and --first gracefully · 9a20f53e436f
      durin42 authored
      Without this change, --first causes currently-running tests to explode
      in violent and surprising ways when their temporary directory gets
      cleaned up. Now we just suppress failure messages from non-first
      failures when running in --first mode.
      9a20f53e436f
  10. Oct 06, 2014
    • Jordi Gutiérrez Hermoso's avatar
      config: use the same hgrc for a cloned repo as for an uninitted repo · 2be7d5ebd4d0
      Jordi Gutiérrez Hermoso authored
      This just copies the same local sample hgrc, except it sets the
      default path to the repo it was cloned from.
      
      This is cut-and-paste from the local sample hgrc, but I think it's
      acceptable, since the two pieces of code are right next to each other
      and they're small. There is danger of them going out of synch, but it
      would complicate the code too much to get rid of this C&P.
      
      I also add ui as an import to hg.py, but with demandimport, this
      should not be a noticeable performance hit.
      2be7d5ebd4d0
  11. Oct 08, 2014
    • Jordi Gutiérrez Hermoso's avatar
      config: give a more detailed sample repo config · 5a831e4e6d7a
      Jordi Gutiérrez Hermoso authored
      Some examples of the typical configurations that one might want to do
      in an .hg/hgrc file. This includes a default-push that happens to
      point to the same location as my-fork.
      
      I insist on the myfork terminology for a server-side clone. Bitbucket,
      Github, and others have widely popularised this meaning of "fork".
      
      This also includes a gentle nudge to use a repo-specific username,
      which is something that people might not instinctively realise is an
      option.
      5a831e4e6d7a
  12. Oct 07, 2014
  13. Oct 03, 2014
    • Pierre-Yves David's avatar
      baseset: explicitly track order of the baseset · 36e09c25f870
      Pierre-Yves David authored
      A baseset starts without an explicit order. But as soon as a sort is requested,
      we simply register that the baseset has an order and use the ordered version of
      the list to behave accordingly.
      
      We will want to properly record the order at creation time in the future. This
      would unlock more optimisation and avoid some sorting.
      36e09c25f870
    • Pierre-Yves David's avatar
      baseset: fix isascending and isdescending · 966860f7a1a8
      Pierre-Yves David authored
      We now have sufficient information to return the proper value there.
      966860f7a1a8
    • Pierre-Yves David's avatar
      baseset: prepare lazy ordering in __iter__ · c1107cb21df2
      Pierre-Yves David authored
      We'll explicitly track the order of the baseset to take advantage of the
      ascending and descending lists during iteration.
      c1107cb21df2
    • Pierre-Yves David's avatar
      baseset: implement a fastasc and fastdesc · 4ffb327e4719
      Pierre-Yves David authored
      Baseset contains already-computed revisions. It is considered "cheap" to do
      operations on an already-computed set. So we add attributes to hold version of
      the list in ascending and descending order and use them for `fastasc` and
      `fastdesc`. Having distinct lists is important to provide correct iteration in
      all cases. Altering a python list will impact an iterator connected to it.
      
      eg: not preserving order at iterator creation time
      
          >>> l = [0, 1]
          >>> i = iter(l)
          >>> l.reverse()
          >>> list(i)
          [1, 0]
      
      eg: corrupting in progress iteration
      
          >>> l = [0, 1]
          >>> i = iter(l)
          >>> i.next()
          0
          >>> l.reverse()
          >>> i.next()
          0
      4ffb327e4719
  14. Oct 06, 2014
    • Pierre-Yves David's avatar
      baseset: stop inheriting from built-in list class · 0e8bb81b58b9
      Pierre-Yves David authored
      The baseset is doing more and more smartset magic and using its list-like
      property less and less. So we store the list of revisions in an explicit
      attribute and stop inheriting.
      
      This requires reimplementing some basic methods.
      0e8bb81b58b9
  15. Oct 07, 2014
Loading