aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/vcs/darcs.py
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@cepl.eu>2024-01-19 03:07:54 +0100
committerMatěj Cepl <mcepl@cepl.eu>2024-01-21 21:57:15 +0100
commitb638466e6a6ada7478758cf740c89650d0f70f59 (patch)
treef34979881a12818ba46a4b74a7a7096e737e441a /libbe/storage/vcs/darcs.py
parentb11b63156666589ec9749fa318fe7ecd9d1f136d (diff)
downloadbugseverywhere-b638466e6a6ada7478758cf740c89650d0f70f59.tar.gz
WIP plenty of clean-ups and porting to Python 3.
Diffstat (limited to 'libbe/storage/vcs/darcs.py')
-rw-r--r--libbe/storage/vcs/darcs.py10
1 files changed, 2 insertions, 8 deletions
diff --git a/libbe/storage/vcs/darcs.py b/libbe/storage/vcs/darcs.py
index 5ec9a26..12eabf4 100644
--- a/libbe/storage/vcs/darcs.py
+++ b/libbe/storage/vcs/darcs.py
@@ -44,12 +44,6 @@ if libbe.TESTING:
import unittest
-# https://stackoverflow.com/a/56719588/164233
-def cmp(a, b):
- return (int(a) > int(b)) - (int(a) < int(b))
-
-
-
def new():
return Darcs()
@@ -286,9 +280,9 @@ class Darcs(base.VCS):
xml_str = output.encode('unicode_escape').replace(r'\n', '\n')
element = ElementTree.XML(xml_str)
assert element.tag == 'changelog', element.tag
- for patch in element.getchildren():
+ for patch in element:
assert patch.tag == 'patch', patch.tag
- for child in patch.getchildren():
+ for child in patch:
if child.tag == 'name':
text = unescape(str(child.text).decode('unicode_escape').strip())
revisions.append(text)