durin42 updated this revision to Diff 5513.
durin42 edited the summary of this revision.
durin42 retitled this revision from "revlog: move ELLIPSIS_NODE_FLAG to core 
from narrowrevlog" to "narrow: move from ELLIPSIS_NODE_FLAG to 
revlog.REVIDX_ELLIPSIS".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2008?vs=5499&id=5513

REVISION DETAIL
  https://phab.mercurial-scm.org/D2008

AFFECTED FILES
  hgext/narrow/narrowchangegroup.py
  hgext/narrow/narrowrevlog.py
  hgext/narrow/narrowtemplates.py

CHANGE DETAILS

diff --git a/hgext/narrow/narrowtemplates.py b/hgext/narrow/narrowtemplates.py
--- a/hgext/narrow/narrowtemplates.py
+++ b/hgext/narrow/narrowtemplates.py
@@ -8,15 +8,14 @@
 from __future__ import absolute_import
 
 from mercurial import (
+    revlog,
     revset,
     templatekw,
     util,
 )
 
-from . import narrowrevlog
-
 def _isellipsis(repo, rev):
-    if repo.changelog.flags(rev) & narrowrevlog.ELLIPSIS_NODE_FLAG:
+    if repo.changelog.flags(rev) & revlog.REVIDX_ELLIPSIS:
         return True
     return False
 
diff --git a/hgext/narrow/narrowrevlog.py b/hgext/narrow/narrowrevlog.py
--- a/hgext/narrow/narrowrevlog.py
+++ b/hgext/narrow/narrowrevlog.py
@@ -13,11 +13,6 @@
    util,
 )
 
-ELLIPSIS_NODE_FLAG = 1 << 14
-revlog.REVIDX_KNOWN_FLAGS |= ELLIPSIS_NODE_FLAG
-if ELLIPSIS_NODE_FLAG not in revlog.REVIDX_FLAGS_ORDER:
-    revlog.REVIDX_FLAGS_ORDER.append(ELLIPSIS_NODE_FLAG)
-
 def readtransform(self, text):
     return text, False
 
@@ -27,7 +22,7 @@
 def rawtransform(self, text):
     return False
 
-revlog.addflagprocessor(ELLIPSIS_NODE_FLAG,
+revlog.addflagprocessor(revlog.REVIDX_ELLIPSIS,
                         (readtransform, writetransform, rawtransform))
 
 def setup():
diff --git a/hgext/narrow/narrowchangegroup.py 
b/hgext/narrow/narrowchangegroup.py
--- a/hgext/narrow/narrowchangegroup.py
+++ b/hgext/narrow/narrowchangegroup.py
@@ -15,12 +15,12 @@
     manifest,
     mdiff,
     node,
+    revlog,
     util,
 )
 
 from . import (
     narrowrepo,
-    narrowrevlog,
 )
 
 def setup():
@@ -83,11 +83,11 @@
     extensions.wrapfunction(
         changegroup.cg1packer, 'generatefiles', generatefiles)
 
-    def ellipsisdata(packer, rev, revlog, p1, p2, data, linknode):
-        n = revlog.node(rev)
-        p1n, p2n = revlog.node(p1), revlog.node(p2)
-        flags = revlog.flags(rev)
-        flags |= narrowrevlog.ELLIPSIS_NODE_FLAG
+    def ellipsisdata(packer, rev, revlog_, p1, p2, data, linknode):
+        n = revlog_.node(rev)
+        p1n, p2n = revlog_.node(p1), revlog_.node(p2)
+        flags = revlog_.flags(rev)
+        flags |= revlog.REVIDX_ELLIPSIS
         meta = packer.builddeltaheader(
             n, p1n, p2n, node.nullid, linknode, flags)
         # TODO: try and actually send deltas for ellipsis data blocks



To: durin42, indygreg, #hg-reviewers
Cc: martinvonz, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to