aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/vcs/monotone.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/storage/vcs/monotone.py')
-rw-r--r--libbe/storage/vcs/monotone.py15
1 files changed, 5 insertions, 10 deletions
diff --git a/libbe/storage/vcs/monotone.py b/libbe/storage/vcs/monotone.py
index add7be9..1d74c5b 100644
--- a/libbe/storage/vcs/monotone.py
+++ b/libbe/storage/vcs/monotone.py
@@ -33,16 +33,11 @@ import libbe.ui.util.user
from ...util.subproc import CommandError
from . import base
-if libbe.TESTING == True:
+if libbe.TESTING:
import doctest
import sys
-# https://stackoverflow.com/a/56719588/164233
-def cmp(a, b):
- return (int(a) > int(b)) - (int(a) < int(b))
-
-
def new():
return Monotone()
@@ -127,7 +122,7 @@ class Monotone (base.VCS):
private = False
for line in output.splitlines():
line = line.strip()
- if private == True: # HACK. Just pick the first key.
+ if private: # HACK. Just pick the first key.
return line.split(' ', 1)[1]
if line == '[private keys]':
private = True
@@ -149,7 +144,7 @@ class Monotone (base.VCS):
'automate', 'get_workspace_root', cwd=dirname)
else:
mtn_dir = self._u_search_parent_directories(path, '_MTN')
- if mtn_dir == None:
+ if mtn_dir is None:
return None
return os.path.dirname(mtn_dir)
return output.strip()
@@ -206,7 +201,7 @@ class Monotone (base.VCS):
pass
def _vcs_get_file_contents(self, path, revision=None):
- if revision == None:
+ if revision is None:
return base.VCS._vcs_get_file_contents(self, path, revision)
else:
self._require_version_ge(4, 0)
@@ -373,7 +368,7 @@ class Monotone (base.VCS):
return self._parse_diff(self._diff(revision))
-if libbe.TESTING == True:
+if libbe.TESTING:
base.make_vcs_testcase_subclasses(Monotone, sys.modules[__name__])
unitsuite =unittest.TestLoader().loadTestsFromModule(sys.modules[__name__])