Handle post-commit for SVN repos that don't use the default layout.

Review Request #5486 — Created Feb. 16, 2014 and submitted

Information

Review Board
master
c853d3b...

Reviewers

Handle post-commit for SVN repos that don't use the default layout.

When connecting an SVN repo that doesn't use the default layout (trunk/,
branches/, tags/), the "New Review Request" would just show an empty bottom
panel (and have an un-caught exception to boot).

This change makes it so that if we don't see a 'trunk' directory in the root of
the repository, we'll just return the list of directories in the root as the
"branches" instead of nothing.

While I was doing this, I added some code to sort the branches for standard
layout repos with the Subvertpy backend (which gives us dirents in ctime order
instead of lexical order).

Connected the Apache ASF subversion repo (which has a bunch of projects in the
root) and loaded the new review request page. Saw that I got an alphabetized
list of projects, and could browse the commits on each of those projects as
expected. Verified with both PySVN and Subvertpy backends.

chipx86
  1. This looks good. Is there any chance we can get some unit tests for both backends?

    1. In order to add a test I'd have to add a whole new svn repo to our testdata just for this. That seems a little bit wasteful for something with code this straightforward.

    2. Okay. I feel this type of work could use more test coverage, especially if we tackle more repo layouts, but it's fine for now.

  2. 
      
chipx86
  1. Ship It!

  2. 
      
david
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (a04c6f8).
Loading...