jespern / bitbucket

This repository (bitbucket) is private, but has an open issue tracker.

You can view all issues and add comments, as well as creating new issues, but not make other changes.

Currently it doesn't appear like the user dropdown for repositories is sorted in any particular order.

Sorting it alphabetically would be nice.

Status: resolved Responsible: Mads Sülau Jørgensen / madssj Type: enhancement
Milestone: 1. Above the Law Component: usability Version: none

Comments and changes

#1

Jesper Noehr / jespern
4 months ago

→ Changed milestone from nothing to 1. Above the Law.

→ Changed responsible from nobody to jespern.

→ Changed type from proposal to enhancement.

→ Changed status from new to open.

#2

Mads Sülau Jørgensen / madssj
4 months ago

→ Changed status from open to resolved.

I've fixed this. Sorry for the issue theft.

#3

Eirik Stavem / eirik
4 months ago

→ Changed responsible from jespern to madssj.

→ Changed status from resolved to open.

Regression.

#5

Eirik Stavem / eirik
4 months ago

Used to work, doesn't anymore :)

#6

Mads Sülau Jørgensen / madssj
4 months ago

Works great here. Just looked at the __cmp__ method and the call to sorted() and both are intact in tip.

How does it look at your end? Are you running python 2.5 or 2.4? (not that it should matter) Are the two calls I've mentioned intact in your copy? Template changes? Dirty cache?

#7

Mads Sülau Jørgensen / madssj
4 months ago

Silly comment system, you should preserve my newlines!

#8

Eirik Stavem / eirik
4 months ago

Hm, I was actually just seeing it live, is your repository-dropdown sorted on bitbucket.org now?

#9

Mads Sülau Jørgensen / madssj
4 months ago

My repository dropdown is sorted on bitbucket.org, yes.

#10

Eirik Stavem / eirik
4 months ago

Ah, I see, the problem is probably the repositories where I'm owner. All my repos are sorted correctly, except that the first repo in the dropdown is my "Testing" repo, which I added recently.

#12

Mads Sülau Jørgensen / madssj
4 months ago

Right, just verified that repository names are not lowercased uppon creation. I'll just commit a fix to the __cmp__ method, that will force the lowercoding, but it's not a propper fix, #234 is.

#13

Mads Sülau Jørgensen / madssj
4 months ago

On second hand, I will not fix this in the sorting, but leave the fix for the other ticket. Otherwise the sorting will just be forgotten, and will yield an unexpected result.

The code needed to fix it would have been:

1
2
3
4
def __cmp__(self, other):
        if isinstance(other, self.__class__):
            return cmp(self.name.lower(), other.name.lower())
        return cmp(self.name.lower(), other.lower())

Add comment / attachment

Show/hide preview