Mercurial > public > mercurial-scm > hg-stable
diff hgext/censor.py @ 32355: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 | d5883fd055c6 |
children | 46ba2cdda476 |
line wrap: on
line diff
--- a/hgext/censor.py Wed May 17 20:01:29 2017 -0700 +++ b/hgext/censor.py Wed May 17 19:52:18 2017 -0700 @@ -102,7 +102,7 @@ hint=_('clean/delete/update first')) flogv = flog.version & 0xFFFF - if flogv != revlog.REVLOGNG: + if flogv != revlog.REVLOGV1: raise error.Abort( _('censor does not support revlog version %d') % (flogv,)) @@ -117,7 +117,7 @@ # Using two files instead of one makes it easy to rewrite entry-by-entry idxread = repo.svfs(flog.indexfile, 'r') idxwrite = repo.svfs(flog.indexfile, 'wb', atomictemp=True) - if flog.version & revlog.REVLOGNGINLINEDATA: + if flog.version & revlog.FLAG_INLINE_DATA: dataread, datawrite = idxread, idxwrite else: dataread = repo.svfs(flog.datafile, 'r')