This works just right, I think.  There's a few things to make sure the code is 
really good though.

The commits in `testui2.git` could be more complicated so that the tests are 
stronger.  With just one or two files in a commit, its hard to ensure that 
sorting really is working right.  A good test case would be something like "add 
aaa.txt, remove bbb.txt, move ccc.txt to ddd.txt, add eee.txt" and check 
sorting then.

The test that has `# Check for sorted output.` isn't accurate, since sorting 
happens in the controller.  Can we have a test to validate that?  Would have to 
be a "functional" test and inspect the HTML (find some examples that use 
`r.html.find...` which is a 
[BeautifulSoup](https://www.crummy.com/software/BeautifulSoup/bs3/documentation.html)
 object and a good way to check for html elements).

The pre-existing comment `# show tree entry itself as well as subtrees 
(Commit.added_paths relies on this)` is something we should take note of 
carefully.  The docstring in `Commit.added_paths` also mentions that it relies 
on `paged_diffs` returning all paths.  `added_paths` is used within 
`LastCommit` which has some quite complicated logic (it determines what to show 
in the 'commit' column when browsing the repository directory structure).  So, 
just to make sure we don't break anything there, I suggest you make an optional 
parameter on `paged_diffs` to control whether to use `-t` or `-r` so that it 
still includes folder names in that case.


---

** [tickets:#7949] Better listing of files changed in a certain commit**

**Status:** in-progress
**Milestone:** unreleased
**Labels:** ux 
**Created:** Tue Aug 04, 2015 10:10 PM UTC by Dave Brondsema
**Last Updated:** Thu Mar 31, 2016 06:16 PM UTC
**Owner:** Pranav Sharma


Followup to [#7925] sort of - at least things noticed from there.

Would be nice to show copies and renames a little differently.  Not sure how 
though.

On a commit view for git, every parent directly is always listed as a change.  
This is due to `-t` in the `git.diff_tree` call.  We should be able to replace 
this with `-r` (with some confirmation that `added_paths()` still works right)

Commit views should list all files in alphabetical order, rather than grouped 
by add/remove/etc.  Make sure paginating through it works correctly still too.


---

Sent from forge-allura.apache.org because [email protected] is subscribed 
to https://forge-allura.apache.org/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://forge-allura.apache.org/p/allura/admin/tickets/options.  Or, if this is 
a mailing list, you can unsubscribe from the mailing list.

Reply via email to