compat: drop isobsnotesupported() that checks if storing notes is supported
authorAnton Shestakov <av6@dwimlabs.net>
Tue, 07 Jan 2020 16:30:18 +0700
changeset 5060 eded640fc61d
parent 5059 98c15ea18302
child 5061 d684c6d73374
compat: drop isobsnotesupported() that checks if storing notes is supported The check is identical to checking if core has e27f1f04c2cf (hg 4.4).
hgext3rd/evolve/cmdrewrite.py
hgext3rd/evolve/compat.py
--- a/hgext3rd/evolve/cmdrewrite.py	Tue Jan 07 16:05:44 2020 +0700
+++ b/hgext3rd/evolve/cmdrewrite.py	Tue Jan 07 16:30:18 2020 +0700
@@ -66,9 +66,6 @@
     if not note:
         return
 
-    if not compat.isobsnotesupported():
-        ui.warn(_(b"current hg version does not support storing"
-                  b" note in obsmarker\n"))
     if len(note) > 255:
         raise error.Abort(_(b"cannot store a note of more than 255 bytes"))
     if b'\n' in note:
--- a/hgext3rd/evolve/compat.py	Tue Jan 07 16:05:44 2020 +0700
+++ b/hgext3rd/evolve/compat.py	Tue Jan 07 16:30:18 2020 +0700
@@ -14,7 +14,6 @@
     copies,
     mdiff,
     obsolete,
-    obsutil,
     pycompat,
     registrar,
     repair,
@@ -58,14 +57,6 @@
 
 eh = exthelper.exthelper()
 
-def isobsnotesupported():
-    # hack to know obsnote is supported. The patches for obsnote support was
-    # pushed before the obsfateprinter patches, so this will serve as a good
-    # check
-    if not obsutil:
-        return False
-    return util.safehasattr(obsutil, 'obsfateprinter')
-
 # Evolution renaming compat
 
 TROUBLES = {