svn commit: r1936411 - in subversion/branches/1.15.x: . tools/dist

[email protected] Tue, 21 Jul 2026 04:00:20 -0000
Newsgroups gmane.comp.version-control.subversion.svn
Message-ID <178460642034.3456923.6765867503209457101@svn03-he-fi>
Author: svn-role
Date: Tue Jul 21 04:00:20 2026
New Revision: 1936411

Log:
Merge the r1936310 group from trunk:

* r1936310, r1936311, r1932433, r1936312, r1936317
  Remove backport.pl
  Justification:
    Remove backport.pl as discussed on dev@
  Votes:
    +1: dsahlberg, ivan

Deleted:
   subversion/branches/1.15.x/tools/dist/backport.pl
   subversion/branches/1.15.x/tools/dist/backport_tests_pl.py
   subversion/branches/1.15.x/tools/dist/backport_tests_py.py
   subversion/branches/1.15.x/tools/dist/nominate.pl
Modified:
   subversion/branches/1.15.x/   (props changed)
   subversion/branches/1.15.x/STATUS
   subversion/branches/1.15.x/tools/dist/README.backport
   subversion/branches/1.15.x/tools/dist/backport_tests.py   (contents, props changed)

Modified: subversion/branches/1.15.x/STATUS
==============================================================================
--- subversion/branches/1.15.x/STATUS	Tue Jul 21 02:46:51 2026	(r1936410)
+++ subversion/branches/1.15.x/STATUS	Tue Jul 21 04:00:20 2026	(r1936411)
@@ -93,13 +93,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
-* r1936310, r1936311, r1932433, r1936312, r1936317
-  Remove backport.pl
-  Justification:
-    Remove backport.pl as discussed on dev@
-  Votes:
-    +1: dsahlberg, ivan
-
  * r1932158, r1932159, r1932160, r1932154
    Properly use const string pointers
    Justification:

Modified: subversion/branches/1.15.x/tools/dist/README.backport
==============================================================================
--- subversion/branches/1.15.x/tools/dist/README.backport	Tue Jul 21 02:46:51 2026	(r1936410)
+++ subversion/branches/1.15.x/tools/dist/README.backport	Tue Jul 21 04:00:20 2026	(r1936411)
@@ -7,29 +7,16 @@ F1. Auto-merge bot; the nightly svn-role
 
 F2. Conflicts detector bot; the backportbot GitHub Action.
 
-And two interactive functions¹:
+And two interactive functions:
 
 F3. Reviewing STATUS nominations and casting votes.
 
 F4. Adding new entries to STATUS.
 
-
-
 The scripts are:
 
-backport.pl:
-    oldest script, implements [F1], [F2], and [F3].  Deprecated, not used
-    in production.
-
-nominate.pl:
-    Symlink to backport.pl.  Implements [F4].  (The script inspects its argv[0].)
-
-backport_tests_pl.py:
-    Regression tests for backport.pl.
-
-
 backport/*.py:
-    New Python-based library implementation of STATUS parsing (status.py),
+    Python-based library implementation of STATUS parsing (status.py),
     of merging nominated revisions (merger.py) and some WC helper functions
     (wc.py).  Colloquially referred to as 'backport.py', even though there is
     no script by that name.  Written in Python 3.
@@ -37,7 +24,7 @@ backport/*.py:
     The modules include their unit tests, see 'python3 -munittest
     backport.status' and 'python3 -munittest backport.merger'.  However,
     changes to these files should be tested both by the unit tests and by the
-    backport_tests_py.py blackbox/regression tests.
+    backport_tests.py blackbox/regression tests.
 
 detect-conflicting-backports.py:
     Implementation of [F2] using backport.py.  Used by GitHub Actions, see
@@ -54,36 +41,19 @@ manage-backports.py:
 nominate-backport.py:
     Implementation of [F4] using backport.py.
 
-backport_tests_py.py:
-    Regression tests for detect-conflicting-backports.py and merge-approved-backports.py
-
-
 backport_tests.py:
-    Common part of backport_tests_pl.py and backport_tests_py.py.  Uses the
-    svntest framework (../../subversion/tests/cmdline/svntest/), which is
-    written in Python 2.
-
-    Note that backport_tests.py and backport/*.py are written in different
-    languages, so they never 'import' each other.  backport_tests.py invokes
-    detect-conflicting-backports.py, merge-approved-backports.py, and
-    backport.pl in the same manner: through subprocess.check_call().
+    Regression tests for detect-conflicting-backports.py and merge-approved-backports.py
+    Uses the svntest framework (../../subversion/tests/cmdline/svntest/).
 
 backport_tests_data/backport*.dump:
     Expected output files for backport_tests.py; see the BackportTest
     decorator in backport_tests.py.
 
-
 All scripts can be run with '--help' to display their usage messages.
 
-backport.pl is considered deprecated since backport.py is better architected
-and is written in a language that many more active developers are comfortable
-with.  The unattended jobs [F1] and [F2] have been converted to using
-backport.py.  Since interactive versions of [F3] and [F4] are now available
-based on backport.py, backport.pl will be removed in Subversion 1.16.
-
+Previously there was a Perl based script backport.pl implementing the same
+features. It unmaintained and removed in Subversion 1.15.x, replaced by the
+above scripts.
 
 TODO: document that "Notes: ... --accept=foo ..." is parsed, see backport_tests.py #3.
 
-
-¹ For backport.pl's interactive features, see:
-<http://mail-archives.apache.org/mod_mbox/subversion-dev/201503.mbox/%3c20150304225114.GD2036-Y181QtavBiEu4QD/[email protected]%3e>

Modified: subversion/branches/1.15.x/tools/dist/backport_tests.py
==============================================================================
--- subversion/branches/1.15.x/tools/dist/backport_tests.py	Tue Jul 21 02:46:51 2026	(r1936410)
+++ subversion/branches/1.15.x/tools/dist/backport_tests.py	Tue Jul 21 04:00:20 2026	(r1936411)
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 # py:encoding=utf-8
 #
-#  backport_tests.py:  Test backport.pl or backport.py
+#  backport_tests.py:  Test backport.py
 #
 #  Subversion is a tool for revision control.
 #  See https://subversion.apache.org for more information.
@@ -37,12 +37,6 @@
 # ### temporarily until we switch over to backport.py and remove backport.pl.
 # ###
 # ### See svntest.testcase.FunctionTestCase.get_sandbox_name().
-try:
-  run_backport, run_conflicter
-except NameError:
-  raise Exception("Failure: %s should not be run directly, or the wrapper "
-                  "does not define both run_backport() and run_conflicter()"
-                  % __file__)
 
 # General modules
 import contextlib
@@ -51,6 +45,29 @@ import os
 import re
 import sys
 
+def run_backport(sbox, error_expected=False):
+  "Run the backport.py auto-merger."
+  args = [
+      '/usr/bin/env',
+      'SVN=' + svntest.main.svn_binary,
+      'python3', os.path.abspath(os.path.join(os.path.dirname(__file__),
+                                              'merge-approved-backports.py')),
+  ]
+  with chdir(sbox.ospath('branch')):
+    return svntest.main.run_command(args[0], error_expected, False, *(args[1:]))
+
+def run_conflicter(sbox, error_expected=False):
+  "Run the backport.py conflicts detector."
+  args = [
+      '/usr/bin/env',
+      'SVN=' + svntest.main.svn_binary,
+      'python3',
+      os.path.abspath(os.path.join(os.path.dirname(__file__),
+                                   'detect-conflicting-backports.py')),
+  ]
+  with chdir(sbox.ospath('branch')):
+    return svntest.main.run_command(args[0], error_expected, False, *(args[1:]))
+
 @contextlib.contextmanager
 def chdir(dir):
   """This is a context manager that saves the current working directory's