Patchwork crecord: remove obsolete version check

login
register
mail settings
Submitter Jordi Gutiérrez Hermoso
Date Feb. 14, 2019, 3:47 p.m.
Message ID <9c5c236afcc631d0dfc6.1550159230@chloe>
Download mbox | patch
Permalink /patch/38751/
State Accepted
Headers show

Comments

Jordi Gutiérrez Hermoso - Feb. 14, 2019, 3:47 p.m.
# HG changeset patch
# User Jordi Gutiérrez Hermoso <jordigh@octave.org>
# Date 1550158907 18000
#      Thu Feb 14 10:41:47 2019 -0500
# Node ID 9c5c236afcc631d0dfc6a3e1424e353f6c6c85bf
# Parent  5d383d9636d0b81b416398913b32b8c715e98db5
crecord: remove obsolete version check

An internal function shouldn't be checking compatibility with
Mercurial versions.
Pulkit Goyal - Feb. 14, 2019, 5:09 p.m.
On Thu, Feb 14, 2019 at 6:48 PM Jordi Gutiérrez Hermoso <jordigh@octave.org>
wrote:

> # HG changeset patch
> # User Jordi Gutiérrez Hermoso <jordigh@octave.org>
> # Date 1550158907 18000
> #      Thu Feb 14 10:41:47 2019 -0500
> # Node ID 9c5c236afcc631d0dfc6a3e1424e353f6c6c85bf
> # Parent  5d383d9636d0b81b416398913b32b8c715e98db5
> crecord: remove obsolete version check
>
> An internal function shouldn't be checking compatibility with
> Mercurial versions.
>

Queued this, many thanks!

Patch

diff --git a/mercurial/crecord.py b/mercurial/crecord.py
--- a/mercurial/crecord.py
+++ b/mercurial/crecord.py
@@ -1546,14 +1546,7 @@  are you sure you want to review/edit and
         new changeset will be created (the normal commit behavior).
         """
 
-        try:
-            ver = float(util.version()[:3])
-        except ValueError:
-            ver = 1
-        if ver < 2.19:
-            msg = _("The amend option is unavailable with hg versions < 2.2\n\n"
-                    "Press any key to continue.")
-        elif opts.get('amend') is None:
+        if opts.get('amend') is None:
             opts['amend'] = True
             msg = _("Amend option is turned on -- committing the currently "
                     "selected changes will not create a new changeset, but "