Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Clone

Read only, no credentials:

https://rodent.software/git/vole.git

Write over SSH with a registered key:

git clone ssh://git@0.0.0.0:2222/vole.git

A free and open-source forge that lives in your Git repo.

Serve changes at /r/<repo>/changes

8fb7aabf534adf208cd795724b1e3d287dc62f5a · Keenan Nemetz · 3d ago · parent b492b557

Serve changes at /r/<repo>/changes

The metadata tree and the interface say changes; the browser was the last
place spelling the route requests. Rename every method on that subtree and
the URLs the server builds: redirects, activity and search results, the
number alias, code links, templates, and the CLI's page links.

The old route is gone rather than aliased. Nothing has been publicly
released, so there is no bookmark or client to keep working, and a redirect
would leave two spellings of the same page in the code.

Refs #204 (01M6S6685JFG8S64ZFF452217W).

server/web_test.go +11−11

@@ -90,7 +90,7 @@ func TestRequestPageShowsWhatWouldLand(t *testing.T) {
90 90 t.Fatalf("request push: %v", err)
91 91 }
92 92
93 code, body := f.get("/r/" + f.repo + "/requests/" + reqID)
93 code, body := f.get("/r/" + f.repo + "/changes/" + reqID)
94 94 if code != 200 {
95 95 t.Fatalf("request page = %d", code)
96 96 }
@@ -100,7 +100,7 @@ func TestRequestPageShowsWhatWouldLand(t *testing.T) {
100 100 }
101 101 }
102 102
103 code, body = f.get("/r/" + f.repo + "/requests/" + reqID + "/files")
103 code, body = f.get("/r/" + f.repo + "/changes/" + reqID + "/files")
104 104 if code != 200 {
105 105 t.Fatalf("request files page = %d", code)
106 106 }
@@ -121,7 +121,7 @@ func TestRequestPageShowsWhatWouldLand(t *testing.T) {
121 121 }
122 122 // Each file is a review of its own: the top of the list is selected by default,
123 123 // and any other row opens the same surface.
124 code, body = f.get("/r/" + f.repo + "/requests/" + reqID + "/files/readme.md")
124 code, body = f.get("/r/" + f.repo + "/changes/" + reqID + "/files/readme.md")
125 125 if code != 200 {
126 126 t.Fatalf("request file page = %d", code)
127 127 }
@@ -177,7 +177,7 @@ func TestMergedRequestStillShowsWhatLanded(t *testing.T) {
177 177 }
178 178 }
179 179
180 code, body := f.get("/r/" + f.repo + "/requests/" + reqID)
180 code, body := f.get("/r/" + f.repo + "/changes/" + reqID)
181 181 if code != 200 {
182 182 t.Fatalf("merged request page = %d", code)
183 183 }
@@ -186,7 +186,7 @@ func TestMergedRequestStillShowsWhatLanded(t *testing.T) {
186 186 t.Fatalf("merged request page does not show %q:\n%s", want, body)
187 187 }
188 188 }
189 code, body = f.get("/r/" + f.repo + "/requests/" + reqID + "/files")
189 code, body = f.get("/r/" + f.repo + "/changes/" + reqID + "/files")
190 190 if code != 200 {
191 191 t.Fatalf("merged request files page = %d", code)
192 192 }
@@ -242,14 +242,14 @@ func TestRequestRecordsTheBranchItCameFrom(t *testing.T) {
242 242 }
243 243 }
244 244
245 code, body := f.get("/r/" + f.repo + "/requests/" + id)
245 code, body := f.get("/r/" + f.repo + "/changes/" + id)
246 246 if code != 200 {
247 247 t.Fatalf("request page = %d", code)
248 248 }
249 249 if !strings.Contains(body, ">feature</code>") {
250 250 t.Fatalf("the request page does not name the branch it came from:\n%s", body)
251 251 }
252 _, body = f.get("/r/" + f.repo + "/requests")
252 _, body = f.get("/r/" + f.repo + "/changes")
253 253 if !strings.Contains(body, ">feature</code>") {
254 254 t.Fatalf("the request list does not name the branch it came from:\n%s", body)
255 255 }
@@ -288,7 +288,7 @@ func TestRequestRecordsTheBranchItCameFrom(t *testing.T) {
288 288 if !strings.Contains(record, "head: "+second) {
289 289 t.Fatalf("the request did not follow the branch to %s:\n%s", second, record)
290 290 }
291 _, body = f.get("/r/" + f.repo + "/requests/" + id)
291 _, body = f.get("/r/" + f.repo + "/changes/" + id)
292 292 if !strings.Contains(body, "/commit/"+second) {
293 293 t.Fatalf("the page does not show the followed tip %s:\n%s", second, body)
294 294 }
@@ -298,7 +298,7 @@ func TestRequestRecordsTheBranchItCameFrom(t *testing.T) {
298 298 if _, errs, err := f.git(feature, "push", f.sshURL(f.repo), ":refs/heads/feature"); err != nil {
299 299 t.Fatalf("delete branch: %s", errs)
300 300 }
301 _, body = f.get("/r/" + f.repo + "/requests/" + id)
301 _, body = f.get("/r/" + f.repo + "/changes/" + id)
302 302 if !strings.Contains(body, "branch deleted") || !strings.Contains(body, ">feature</code>") ||
303 303 !strings.Contains(body, "/commit/"+second) {
304 304 t.Fatalf("a deleted branch is not labelled, or its last head is gone:\n%s", body)
@@ -513,7 +513,7 @@ func TestChangeListFiltersMergedRequests(t *testing.T) {
513 513 t.Fatalf("merge: %v\n%s", err, errs)
514 514 }
515 515
516 code, body := f.get("/r/" + f.repo + "/requests?state=merged")
516 code, body := f.get("/r/" + f.repo + "/changes?state=merged")
517 517 if code != 200 {
518 518 t.Fatalf("merged list = %d", code)
519 519 }
@@ -535,7 +535,7 @@ func TestChangeListFiltersMergedRequests(t *testing.T) {
535 535
536 536 // Closed means closed, not "no longer open": a landing is reachable through
537 537 // its own filter and is not counted twice.
538 code, body = f.get("/r/" + f.repo + "/requests?state=closed")
538 code, body = f.get("/r/" + f.repo + "/changes?state=closed")
539 539 if code != 200 {
540 540 t.Fatalf("closed list = %d", code)
541 541 }