Mercurial > hg
diff mercurial/debugcommands.py @ 32315:67026d65a4fc
revlog: rename constants (API)
Feature flag constants don't need "NG" in the name because they will
presumably apply to non-"NG" version revlogs.
All feature flag constants should also share a similar naming
convention to identify them as such.
And, "RevlogNG" isn't a great internal name since it isn't obvious it
maps to version 1 revlogs. Plus, "NG" (next generation) is only a good
name as long as it is the latest version. Since we're talking about
version 2, now is as good a time as any to move on from that naming.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 17 May 2017 19:52:18 -0700 |
parents | ccef71de7d41 |
children | 46ba2cdda476 |
line wrap: on
line diff
--- a/mercurial/debugcommands.py Wed May 17 20:01:29 2017 -0700 +++ b/mercurial/debugcommands.py Wed May 17 19:52:18 2017 -0700 @@ -561,7 +561,7 @@ """ r = cmdutil.openrevlog(repo, 'debugdeltachain', file_, opts) index = r.index - generaldelta = r.version & revlog.REVLOGGENERALDELTA + generaldelta = r.version & revlog.FLAG_GENERALDELTA def revinfo(rev): e = index[rev] @@ -892,7 +892,7 @@ if format not in (0, 1): raise error.Abort(_("unknown format %d") % format) - generaldelta = r.version & revlog.REVLOGGENERALDELTA + generaldelta = r.version & revlog.FLAG_GENERALDELTA if generaldelta: basehdr = ' delta' else: @@ -1725,9 +1725,9 @@ format = v & 0xFFFF flags = [] gdelta = False - if v & revlog.REVLOGNGINLINEDATA: + if v & revlog.FLAG_INLINE_DATA: flags.append('inline') - if v & revlog.REVLOGGENERALDELTA: + if v & revlog.FLAG_GENERALDELTA: gdelta = True flags.append('generaldelta') if not flags: