[damned-lies] Removed CVS repository support
- From: Claude Paroz <claudep src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [damned-lies] Removed CVS repository support
- Date: Sat, 8 May 2021 10:22:41 +0000 (UTC)
commit 0042abcd0a054cff81450b2b8f8184651e711f04
Author: Claude Paroz <claude 2xlibre net>
Date: Sat May 8 12:22:24 2021 +0200
Removed CVS repository support
stats/migrations/0001_initial.py | 2 +-
stats/models.py | 1 -
stats/repos.py | 18 +-----------------
3 files changed, 2 insertions(+), 19 deletions(-)
---
diff --git a/stats/migrations/0001_initial.py b/stats/migrations/0001_initial.py
index 6afaecfa..5def3d8b 100644
--- a/stats/migrations/0001_initial.py
+++ b/stats/migrations/0001_initial.py
@@ -88,7 +88,7 @@ class Migration(migrations.Migration):
('bugs_base', models.CharField(max_length=50, null=True, blank=True)),
('bugs_product', models.CharField(max_length=50, null=True, blank=True)),
('bugs_component', models.CharField(max_length=50, null=True, blank=True)),
- ('vcs_type', models.CharField(max_length=5, choices=[('cvs', 'CVS'), ('svn', 'Subversion'),
('git', 'Git'), ('hg', 'Mercurial')])),
+ ('vcs_type', models.CharField(max_length=5, choices=[('svn', 'Subversion'), ('git', 'Git'),
('hg', 'Mercurial')])),
('vcs_root', models.CharField(max_length=200)),
('vcs_web', models.URLField()),
('ext_platform', models.URLField(help_text='URL to external translation platform, if any',
null=True, blank=True)),
diff --git a/stats/models.py b/stats/models.py
index 54612d7a..fef75a74 100644
--- a/stats/models.py
+++ b/stats/models.py
@@ -65,7 +65,6 @@ validate_slug = RegexValidator(
)
VCS_TYPE_CHOICES = (
- ('cvs', 'CVS'),
('svn', 'Subversion'),
('git', 'Git'),
('hg', 'Mercurial'),
diff --git a/stats/repos.py b/stats/repos.py
index f7fc2bf9..8bbe1726 100644
--- a/stats/repos.py
+++ b/stats/repos.py
@@ -8,7 +8,7 @@ from stats.utils import STATUS_OK, url_join
class RepoBase:
@classmethod
def repo_class_by_type(cls, tp):
- return {'cvs': CVSRepo, 'svn': SVNRepo, 'git': GitRepo, 'hg': MercurialRepo}.get(tp)
+ return {'svn': SVNRepo, 'git': GitRepo, 'hg': MercurialRepo}.get(tp)
def __init__(self, branch):
self.branch = branch
@@ -148,22 +148,6 @@ class SVNRepo(RepoBase):
shutil.rmtree(str(self.branch.co_path))
-class CVSRepo(RepoBase):
- def init_checkout(self):
- run_shell_command([
- 'cvs', '-d%s' % self.branch.module.vcs_root, '-z4', 'co',
- '-d%s' % self.branch.module.name + "." + self.branch.name,
- '-r%s' % self.branch.name, self.module.name
- ], cwd=settings.SCRATCHDIR / self.branch.module.vcs_type)
-
- def update(self):
- run_shell_command(['cvs', '-z4', 'up', '-Pd'], raise_on_error=True, cwd=self.branch.co_path)
-
- def remove(self):
- if os.access(str(self.branch.co_path), os.W_OK):
- shutil.rmtree(str(self.branch.co_path))
-
-
class MercurialRepo(RepoBase):
def exists(self):
return self.branch.id is not None and os.access(str(self.branch.co_path), os.X_OK | os.W_OK)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]