D4174: absorb: port partway to Python 3

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Thu Aug 9 14:34:01 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9204445ad54c: absorb: port partway to Python 3 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D4174?vs=10106&id=10151

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

AFFECTED FILES
  contrib/python3-whitelist
  hgext/absorb.py

CHANGE DETAILS

diff --git a/hgext/absorb.py b/hgext/absorb.py
--- a/hgext/absorb.py
+++ b/hgext/absorb.py
@@ -245,7 +245,7 @@
     date = ctx.date()
     desc = ctx.description()
     user = ctx.user()
-    files = set(ctx.files()).union(memworkingcopy.iterkeys())
+    files = set(ctx.files()).union(memworkingcopy)
     store = overlaystore(ctx, memworkingcopy)
     return context.memctx(
         repo=ctx.repo(), parents=parents, text=desc,
@@ -286,7 +286,7 @@
 
         # following fields are built from fctxs. they exist for perf reason
         self.contents = [f.data() for f in fctxs]
-        self.contentlines = map(mdiff.splitnewlines, self.contents)
+        self.contentlines = pycompat.maplist(mdiff.splitnewlines, self.contents)
         self.linelog = self._buildlinelog()
         if self.ui.debugflag:
             assert self._checkoutlinelog() == self.contents
@@ -805,7 +805,7 @@
                 return False
             pctx = parents[0]
         # ctx changes more files (not a subset of memworkingcopy)
-        if not set(ctx.files()).issubset(set(memworkingcopy.iterkeys())):
+        if not set(ctx.files()).issubset(set(memworkingcopy)):
             return False
         for path, content in memworkingcopy.iteritems():
             if path not in pctx or path not in ctx:
diff --git a/contrib/python3-whitelist b/contrib/python3-whitelist
--- a/contrib/python3-whitelist
+++ b/contrib/python3-whitelist
@@ -1,4 +1,6 @@
 test-abort-checkin.t
+test-absorb-phase.t
+test-absorb-strip.t
 test-add.t
 test-addremove-similar.t
 test-addremove.t



To: durin42, pulkit, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list