Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(11)

Issue 40054: Add the ability to edit and delete repositories (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
17 years, 2 months ago by Collin Winter
Modified:
13 years, 1 month ago
Reviewers:
Andi Albrecht
CC:
GvR
Base URL:
http://rietveld.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Deleting a repository under this scheme will also delete all branches associated with that repository. Editing a repository name updates repo_name on the branches.

Patch Set 1 #

Patch Set 2 : Fix style issues #

Patch Set 3 : Additional code cleanup #

Patch Set 4 : Merge r408 #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+76 lines, -2 lines) Patch
M TODO View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M codereview/urls.py View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M codereview/views.py View 1 2 3 1 chunk +49 lines, -0 lines 4 comments Download
A templates/repo_edit.html View 1 chunk +21 lines, -0 lines 1 comment Download
M templates/repos.html View 1 2 3 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 3
Collin Winter
Andi, could you take a look at this patch when you get a chance?
17 years, 2 months ago (2009-04-11 01:05:14 UTC) #1
Collin Winter
On 2009/04/11 01:05:14, Collin Winter wrote: > Andi, could you take a look at this ...
17 years, 2 months ago (2009-04-14 21:31:09 UTC) #2
Andi Albrecht
17 years, 2 months ago (2009-04-14 21:49:36 UTC) #3
http://codereview.appspot.com/40054/diff/20/21
File codereview/views.py (right):

http://codereview.appspot.com/40054/diff/20/21#newcode2366
Line 2366: @login_required
What about adding a repo_owner_required decorator, similiar to the
issue_owner_required decorator?

http://codereview.appspot.com/40054/diff/20/21#newcode2393
Line 2393: branch.put()
I think it's better to use google.appengine.ext.db.put() here which takes a list
of objects to save, instead of saving each instance separately.

In addition I would add the repo to that list and add commit=False to the
form.save call.

http://codereview.appspot.com/40054/diff/20/21#newcode2405
Line 2405: return HttpResponseForbidden('Invalid request method: %s' %
request.method)
There's a post_required decorator defined in views.py

http://codereview.appspot.com/40054/diff/20/21#newcode2410
Line 2410: repo.delete()
google.appengine.ext.db.delete() with a list of objects to delete like in
views.delete() does the same in a single transaction.

http://codereview.appspot.com/40054/diff/20/24
File templates/repo_edit.html (right):

http://codereview.appspot.com/40054/diff/20/24#newcode17
Line 17: <tr><td><input type="submit" value="Delete This Repository"></td></tr>
The "Delete Issue" button on the edit issue page has a nice and convincing
warning ("There's no undo!"). Maybe we should at a similar notice here too...
;-)
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b