Patchwork [03,of,13] mergestate: add comments about couple of record types and minor reorder

login
register
mail settings
Submitter Pulkit Goyal
Date July 17, 2020, 8:59 a.m.
Message ID <ed6b80e5ed265851feb5.1594976364@workspace>
Download mbox | patch
Permalink /patch/46778/
State Accepted
Headers show

Comments

Pulkit Goyal - July 17, 2020, 8:59 a.m.
# HG changeset patch
# User Pulkit Goyal <7895pulkit@gmail.com>
# Date 1594292904 -19800
#      Thu Jul 09 16:38:24 2020 +0530
# Node ID ed6b80e5ed265851feb59d7855641b5d5254953b
# Parent  9e4a5e41f0ac3fa39a29d5376a1d3922e9221318
# EXP-Topic mergestate-refactor
mergestate: add comments about couple of record types and minor reorder

I am trying to divide the records into certain groups and then have dedicated
objects for them. Taking baby steps in that direction.

Differential Revision: https://phab.mercurial-scm.org/D8717

Patch

diff --git a/mercurial/mergestate.py b/mercurial/mergestate.py
--- a/mercurial/mergestate.py
+++ b/mercurial/mergestate.py
@@ -41,13 +41,17 @@  def _filectxorabsent(hexnode, ctx, f):
 # Merge state record types. See ``mergestate`` docs for more.
 RECORD_LOCAL = b'L'
 RECORD_OTHER = b'O'
+# record extra information about files
+RECORD_FILE_VALUES = b'f'
+# record merge labels
+RECORD_LABELS = b'l'
+
 RECORD_MERGED = b'F'
 RECORD_CHANGEDELETE_CONFLICT = b'C'
 RECORD_MERGE_DRIVER_MERGE = b'D'
 RECORD_PATH_CONFLICT = b'P'
+
 RECORD_MERGE_DRIVER_STATE = b'm'
-RECORD_FILE_VALUES = b'f'
-RECORD_LABELS = b'l'
 RECORD_OVERRIDE = b't'
 RECORD_UNSUPPORTED_MANDATORY = b'X'
 RECORD_UNSUPPORTED_ADVISORY = b'x'