Skip to content
Snippets Groups Projects
  1. May 20, 2018
  2. May 18, 2018
  3. Mar 28, 2018
  4. Feb 21, 2018
    • Pulkit Goyal's avatar
      state: import the file to write state files from evolve extension · a2f83661f721
      Pulkit Goyal authored
      The current way of writing state files is very obscure with each state file
      having it's own format to store state files. There is no centralized way to
      write state files in a good format. Moreover the current state files are not
      extensible, you cannot add more data to store in state files in reliable ways.
      
      To solve the problem, I wrote my own serialization and deserialization format,
      looked into existing formats like Protobuf, MessagePack, JSON but CBOR looks
      very promising and is suggested by people in the community.
      
      The current interface to store state files is to directly write data in files
      when things abort. Using the class imported by this commit, we can create
      objects which has a dict like interface and can store data on the object and
      store it on the file when things abort.
      
      The evolve extension is using the state file for `evolve`, `grab` commands and
      using it for resolution of orphaness, phase-divergence and content-divergence.
      
      The file is moved from changeset e4ac2e2c2086f977afa35e23a62f849e9305a225 of the
      evolve extension which is also tagged as 7.3.0.
      The following changes are made to the file while moving to core:
      
        * import util from current directory as this file in mercurial/ now
        * make cmdstate class extend object
        * removed mutable default value for opts in cmdstate.__init__
        * some doc changes to replace out of core things with in-core ones
      
      evolve extension can be found at https://bitbucket.org/marmoute/mutable-history
      
      Differential Revision: https://phab.mercurial-scm.org/D2591
      a2f83661f721
  5. May 14, 2018
  6. May 15, 2018
  7. May 19, 2018
Loading