Hi Thomas,

yes, makes sense to change it. so far, this class was only used
to sort revisions in the document maps where none of the revisions
has a branch flag.

but it's perfectly reasonable to also compare revisions from
a branch and this should work as well.

Regards
 Marcel

On 16/10/14 07:54, "Thomas Mueller" <[email protected]> wrote:

>Hi,
>
>I wonder if there is a bug in the StableRevisionComparator. It uses
>Revision.compareRevisionTimeThenClusterId, which doesn't take the "branch"
>flag into account. I would probably use the following instead:
>
>/**
> * Compare all components of two revisions.
> * 
> * @param other the other revision
> * @return -1, 0, or 1
> */
>    int compareTo(Revision other) {
>    int comp = compareRevisionTimeThenClusterId(other);
>    if (comp == 0) {
>        if (branch != other.branch) {
>            return branch ? -1 : 1;
>        }
>    }
>    return comp;
>    }
>
>
>
>Regards,
>Thomas
>

Reply via email to