[PATCH 4 of 4] changeset_printer: hide manifest node for workingctx
Matt Mackall
mpm at selenic.com
Fri Apr 3 10:55:21 CDT 2015
On Fri, 2015-04-03 at 22:31 +0900, Yuya Nishihara wrote:
> On Thu, 02 Apr 2015 15:39:08 -0500, Matt Mackall wrote:
> > It's worth considering defining __cmp__ on ctxs. Obviously the semantics
> > of ctxa < ctxb are not a perfect match for a mere partial ordering.. but
> > we do have a partial ordering that we regularly use as a shortcut and we
> > should make it convenient.
>
> Is your suggestion something like this?
>
> def __cmp__(self, other):
> return cmp(intrev(self), intrev(other))
Like this.
> or
>
> def __cmp__(self, other):
> if self == other:
> return 0
> elif other in self.ancestors(): # naive implementation
> return -1
> else:
> return 1
>
> I agree it will be sometimes convenient, but I'm not sure how often we'll
> do "ctxa < ctxb".
We already compare revs in a bunch of places.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list