Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(755)

Unified Diff: dashboard/dashboard/pinpoint/models/change.py

Issue 2998883002: [pinpoint] Strip '.git' from the end of repository URLs in DEPS files. (Closed)
Patch Set: Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | dashboard/dashboard/pinpoint/models/change_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/pinpoint/models/change.py
diff --git a/dashboard/dashboard/pinpoint/models/change.py b/dashboard/dashboard/pinpoint/models/change.py
index 362fbe98575bc89715af36f0f45f9fcbc9c7ed90..5222e47b633dca0f8f13355805cb592a1c9de693 100644
--- a/dashboard/dashboard/pinpoint/models/change.py
+++ b/dashboard/dashboard/pinpoint/models/change.py
@@ -291,6 +291,9 @@ class Patch(collections.namedtuple('Patch', ('server', 'issue', 'patchset'))):
def _Repository(repository_url):
+ if repository_url.endswith('.git'):
+ repository_url = repository_url[:-4]
+
repositories = namespaced_stored_object.Get(_REPOSITORIES_KEY)
for repo_label, repo_info in repositories.iteritems():
if repository_url == repo_info['repository_url']:
@@ -300,10 +303,11 @@ def _Repository(repository_url):
def _AddRepository(repository_url):
+ if repository_url.endswith('.git'):
+ repository_url = repository_url[:-4]
+
repositories = namespaced_stored_object.Get(_REPOSITORIES_KEY)
repository = repository_url.split('/')[-1]
- if repository.endswith('.git'):
- repository = repository[:-4]
if repository in repositories:
raise AssertionError("Attempted to add a repository that's already in the "
« no previous file with comments | « no previous file | dashboard/dashboard/pinpoint/models/change_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698