[PATCH 2 of 5 STABLE] merge: new format for the state file

Siddharth Agarwal sid0 at fb.com
Wed Feb 26 17:07:02 CST 2014


On 02/26/2014 02:58 PM, pierre-yves.david at ens-lyon.org wrote:
> +_pack = struct.pack
> +_unpack = struct.unpack
> +
>   class mergestate(object):
> -    '''track 3-way merge state of individual files'''
> -    statepath = "merge/state"
> +    '''track 3-way merge state of individual files
>   
> +    current format is a list of arbitrary record of the form:
> +
> +        [type][length][content]
> +
> +    Type is a single character, length is a 4 bytes integer, content is an
> +    arbitrary suites of bytes of lenght `length`.
> +
> +    Type should be a letter. Capital letter are mandatory record, Mercurial
> +    should abort if they are unknown. lower case record can be safely ignored.
> +
> +    Currently known record:
> +
> +    L: the node of the "local" part of the merge (hexified version)
> +    F: a file to be merged entry
> +    '''
> +    statepath = "merge/state2"

So a merge started with a version of hg with this patch cannot be 
completed with a version of hg without this patch, and vice versa.


More information about the Mercurial-devel mailing list