RIP subversion
authorSofian Brabez <sbz@6dev.net>
Wed, 14 Apr 2021 16:08:50 +0000 (17:08 +0100)
committersbz <sbz@6dev.net>
Wed, 14 Apr 2021 16:08:50 +0000 (17:08 +0100)
Remote deprecated sss script, it's useless now with usage of git and
clean the svn bits in other places

README.md
ports-mgmt/freebsd-maintainer-scripts/Makefile
sss.py [deleted file]
up.py

index 94837298c3f35d15eeceb69591792041ba120699..27b3762d5eaf67f3cd433ded8428f8db768d8510 100644 (file)
--- a/README.md
+++ b/README.md
@@ -33,11 +33,6 @@ tasks:
 
 [poudriere(8)][6] helper to process testport action on multiple jails
 
-+ **sss**
-
-[Python][2] script to display [subversion][7] verbose status (committer,
-message, files) updates by parsing XML log.
-
 + **sysctl-missing-desc**
 
 [Python][2] script to track [sysctl(8)][1] with missing description
index ca11d4f13f8760e31a1e44049001f28fcd5e1a0c..fe0bb0982ff171f025cb4b40ab55e30b55e30f32 100644 (file)
@@ -8,7 +8,6 @@ LICENSE=                BSD
 LICENSE_FILE=  ${WRKSRC}/LICENSE
 
 BUILD_DEPENDS= distilator>0:${PORTSDIR}/ports-mgmt/distilator \
-                               subversion>0:${PORTSDIR}/devel/subversion \
                                python3>0:${PORTSDIR}/lang/python3 \
                                portlint>0:${PORTSDIR}/ports-mgmt/portlint \
                                poudriere>0:${PORTSDIR}/devel/poudriere
diff --git a/sss.py b/sss.py
deleted file mode 100755 (executable)
index d0fde7e..0000000
--- a/sss.py
+++ /dev/null
@@ -1,69 +0,0 @@
-#!/usr/bin/env python3
-
-"""
-sss - sbz svn status verbose on one line
-"""
-
-import os
-import shlex
-import subprocess
-import sys
-import xml.etree.ElementTree as ET
-
-"""
-Algorithm:
-
-line = Parse output of svn up
-foreach path in lines
-    xml data = svn log -rHEAD path --xml
-    author, shortmsg, status, path = parse xml data
-    print status, path, shortmsg, status, author
-"""
-
-def valid_line(line):
-    if line.startswith('U ') or \
-       line.startswith('A ') or \
-       line.startswith('D '):
-        return True
-    else:
-        return False
-
-
-def main():
-    src_path = os.path.expanduser('~/svn/src/')
-    ports_path = os.path.expanduser('~/svn/ports/')
-    svn_path = sys.argv[1] if len(sys.argv) == 2 else src_path
-    out = {}
-    data = subprocess.run(shlex.split('svn up {0}'.format(svn_path)),
-                          stdout=subprocess.PIPE).stdout
-    data = data.decode("utf-8")
-    for line in data.split('\n'):
-        if not valid_line(line):
-            continue
-        status, path = line.split()
-        out['status'] = status
-        out['path'] = path
-        xml = subprocess.run(
-            shlex.split('svn log -l 1 {path} --xml'.format(path=path)),
-            stdout=subprocess.PIPE
-        )
-        xml_data = xml.stdout
-        xml_data = xml_data.decode("utf-8")
-        try:
-            root = ET.fromstring(xml_data)
-            for commit in root.findall('logentry'):
-                author = commit.find('author').text
-                date = commit.find('date').text
-                shortmsg = commit.find('msg').text.split('\n')[0]
-                out['author'] = author
-                out['shortmsg'] = shortmsg
-                out['rev'] = commit.attrib.get('revision', 'norev')
-                out['date'] = date.split('.')[0]
-                svnmsg = "{status} {path}\t {shortmsg} | {rev} | {author} | {date}"
-                print(svnmsg.format(**out))
-        except:
-            pass
-
-
-if __name__ == '__main__':
-    sys.exit(main())
diff --git a/up.py b/up.py
index 525cdf546b0b0f948680b9c129c3ec958cb7097c..6846e8c63a9a9c07599afd8e85165cb82001188d 100755 (executable)
--- a/up.py
+++ b/up.py
@@ -23,31 +23,20 @@ svn_update_cmd=svn update
 svn_clone_cmd=svn checkout
 
 [freebsd-src]
-scm=svn
-remote=svn+ssh://{1}@svn.freebsd.org/base/head
-local={0}/freebsd/svn/src
+remote=https://git.freebsd.org/src.git
+local={0}/freebsd/src
 
 [freebsd-ports]
-scm=svn
-remote=svn+ssh://{1}@svn.freebsd.org/ports/head
-local={0}/freebsd/svn/ports
+remote=https://git.freebsd.org/ports.git
+local={0}/freebsd/ports
 
 [freebsd-doc]
-scm=svn
-remote=svn+ssh://{1}@svn.freebsd.org/doc/head
-local={0}/freebsd/svn/doc
-
-[netbsd-src]
-remote=http://git.edgebsd.org/EdgeBSD/netbsd-src.git
-local={0}/netbsd/git/src
-
-[netbsd-pkgsrc]
-remote=http://git.edgebsd.org/EdgeBSD/netbsd-pkgsrc.git
-local={0}/netbsd/git/pkgsrc
+remote=https://git.freebsd.org/doc.git
+local={0}/freebsd/doc
 
 [openbsd-src]
-remote=git://anoncvs.estpak.ee/openbsd-src
-local={0}/openbsd/git/src
+remote=https://github.com/openbsd/src.git
+local={0}/openbsd/src
 """.format(pwd, user)
 
 cfg = configparser.ConfigParser()