# HG changeset patch # User Martin von Zweigbergk # Date 1484681102 28800 # Node ID 08b34c3a6f74800b5b357f371568177827963e2b # Parent 0b792507ea15fcfbd63300a71a198ca023063c3f 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. diff -r 0b792507ea15 -r 08b34c3a6f74 mercurial/help/internals/revlogs.txt --- a/mercurial/help/internals/revlogs.txt Tue Jan 17 11:45:10 2017 -0800 +++ b/mercurial/help/internals/revlogs.txt Tue Jan 17 11:25:02 2017 -0800 @@ -94,7 +94,10 @@ 0: REVIDX_ISCENSORED revision has censor metadata, must be verified. - 1: REVIDX_EXTSTORED revision data is stored externally. + 1: REVIDX_ELLIPSIS revision hash does not match its data. Used by + narrowhg + + 2: REVIDX_EXTSTORED revision data is stored externally. 8-11 (4 bytes) Compressed length of revision data / chunk as stored in revlog. diff -r 0b792507ea15 -r 08b34c3a6f74 mercurial/revlog.py --- a/mercurial/revlog.py Tue Jan 17 11:45:10 2017 -0800 +++ b/mercurial/revlog.py Tue Jan 17 11:25:02 2017 -0800 @@ -54,11 +54,13 @@ # revlog index flags REVIDX_ISCENSORED = (1 << 15) # revision has censor metadata, must be verified -REVIDX_EXTSTORED = (1 << 14) # revision data is stored externally +REVIDX_ELLIPSIS = (1 << 14) # revision hash does not match data (narrowhg) +REVIDX_EXTSTORED = (1 << 13) # revision data is stored externally REVIDX_DEFAULT_FLAGS = 0 # stable order in which flags need to be processed and their processors applied REVIDX_FLAGS_ORDER = [ REVIDX_ISCENSORED, + REVIDX_ELLIPSIS, REVIDX_EXTSTORED, ] REVIDX_KNOWN_FLAGS = util.bitsfrom(REVIDX_FLAGS_ORDER)