changeset 3695:3680f715c14f

compat: drop compat layer for cleanupnodes We no longer support version lower than 4.3.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Thu, 19 Apr 2018 16:51:53 +0200
parents c0d5e0929f8b
children 39231f02902b
files hgext3rd/topic/__init__.py hgext3rd/topic/compat.py
diffstat 2 files changed, 1 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/topic/__init__.py	Thu Apr 19 16:07:23 2018 +0200
+++ b/hgext3rd/topic/__init__.py	Thu Apr 19 16:51:53 2018 +0200
@@ -885,7 +885,7 @@
     # create obsmarkers and move bookmarks
     # XXX we should be creating marker as we go instead of only at the end,
     # this makes the operations more modulars
-    compat.cleanupnodes(repo, successors, 'changetopics')
+    scmutil.cleanupnodes(repo, successors, 'changetopics')
 
     # move the working copy too
     wctx = repo[None]
--- a/hgext3rd/topic/compat.py	Thu Apr 19 16:07:23 2018 +0200
+++ b/hgext3rd/topic/compat.py	Thu Apr 19 16:51:53 2018 +0200
@@ -9,8 +9,6 @@
 
 from mercurial import (
     obsolete,
-    scmutil,
-    util,
 )
 
 getmarkers = None
@@ -33,15 +31,3 @@
         ui.pager(cmd)
     except AttributeError:
         pass
-
-def cleanupnodes(repo, replacements, operation, moves=None):
-    # create obsmarkers and move bookmarks
-    # XXX we should be creating marker as we go instead of only at the end,
-    # this makes the operations more modulars
-    if util.safehasattr(scmutil, 'cleanupnodes'):
-        scmutil.cleanupnodes(repo, replacements, 'changetopics',
-                             moves=moves)
-    else:
-        relations = [(repo[o], tuple(repo[n] for n in new))
-                     for (o, new) in replacements.iteritems()]
-        obsolete.createmarkers(repo, relations, operation=operation)