comparison mercurial/revlog.py @ 30829:08b34c3a6f74

revlog: give EXTSTORED flag value to narrowhg Narrowhg has been using "1 << 14" as its revlog flag value for a long time. We (Google) have many repos with that value in production already. When the same value was reserved for EXTSTORED, it made those repos invalid. Upgrading them will be a little painful. We should clearly have reserved the value for narrowhg a long time ago. Since the EXTSTORED flag is not yet in any release and Facebook also says they have not started using it in production, so it should be okay to change it. This patch gives the current value (1 << 14) back to narrowhg and gives a new value (1 << 13) to EXTSTORED.
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 17 Jan 2017 11:25:02 -0800
parents 4c0a5a256ae8
children ef6888172437
comparison
equal deleted inserted replaced
30828:0b792507ea15 30829:08b34c3a6f74
52 REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS 52 REVLOG_DEFAULT_VERSION = REVLOG_DEFAULT_FORMAT | REVLOG_DEFAULT_FLAGS
53 REVLOGNG_FLAGS = REVLOGNGINLINEDATA | REVLOGGENERALDELTA 53 REVLOGNG_FLAGS = REVLOGNGINLINEDATA | REVLOGGENERALDELTA
54 54
55 # revlog index flags 55 # revlog index flags
56 REVIDX_ISCENSORED = (1 << 15) # revision has censor metadata, must be verified 56 REVIDX_ISCENSORED = (1 << 15) # revision has censor metadata, must be verified
57 REVIDX_EXTSTORED = (1 << 14) # revision data is stored externally 57 REVIDX_ELLIPSIS = (1 << 14) # revision hash does not match data (narrowhg)
58 REVIDX_EXTSTORED = (1 << 13) # revision data is stored externally
58 REVIDX_DEFAULT_FLAGS = 0 59 REVIDX_DEFAULT_FLAGS = 0
59 # stable order in which flags need to be processed and their processors applied 60 # stable order in which flags need to be processed and their processors applied
60 REVIDX_FLAGS_ORDER = [ 61 REVIDX_FLAGS_ORDER = [
61 REVIDX_ISCENSORED, 62 REVIDX_ISCENSORED,
63 REVIDX_ELLIPSIS,
62 REVIDX_EXTSTORED, 64 REVIDX_EXTSTORED,
63 ] 65 ]
64 REVIDX_KNOWN_FLAGS = util.bitsfrom(REVIDX_FLAGS_ORDER) 66 REVIDX_KNOWN_FLAGS = util.bitsfrom(REVIDX_FLAGS_ORDER)
65 67
66 # max size of revlog with inline data 68 # max size of revlog with inline data