[PATCH] cvsps: use commitids (when present) to detect changesets

Bryan O'Sullivan bos at serpentine.com
Tue Jan 8 17:38:53 CST 2013


On Tue, Jan 08, 2013 at 08:18:00PM +0000, Frank Kingswood wrote:
> cvsps: use commitids (when present) to detect changesets

Applied, but ...

>          # first changeset and bar the next and MYBRANCH and MYBRANCH2
>          # should both start off of the bar changeset. No provisions are
>          # made to ensure that this is, in fact, what happens.
> +        if not (c and e.branchpoints == c.branchpoints and
> +                  (   # cvs commitids
> +                      (e.commitid is not None and e.commitid == c.commitid)
> +                      or
> +                      ( # no commitids, use fuzzy commit detection
> +                        (e.commitid is None or c.commitid is None) and
> +                        e.comment == c.comment and
> +                        e.author == c.author and
> +                        e.branch == c.branch and
> +                        ((c.date[0] + c.date[1]) <=
> +                         (e.date[0] + e.date[1]) <=
> +                         (c.date[0] + c.date[1]) + fuzz) and
> +                        e.file not in files
> +                      )
> +                  )):

This is the most incomprehensible if-expression I've seen in many a year :-(

(Don't worry, I'm aware you didn't make it worse.)


More information about the Mercurial-devel mailing list