Re: [PATCH] revset: add experimental set subscript operator

2017-07-12 Thread Sean Farley
Jun Wu writes: > Excerpts from Yuya Nishihara's message of 2017-07-13 00:50:33 +0900: >> Do we want this experimental feature in 4.3? The patches are mostly ready, >> but this is completely new operator, so I'm not sure. >> >> > Note: the names (changeloglinear etc.) here are just examples, not

Re: [PATCH] revset: add experimental set subscript operator

2017-07-12 Thread Jun Wu
Excerpts from Yuya Nishihara's message of 2017-07-13 00:50:33 +0900: > Do we want this experimental feature in 4.3? The patches are mostly ready, > but this is completely new operator, so I'm not sure. > > > Note: the names (changeloglinear etc.) here are just examples, not final. > > It's called

Re: [PATCH] revset: add experimental set subscript operator

2017-07-12 Thread Sean Farley
Yuya Nishihara writes: > On Fri, 7 Jul 2017 08:26:53 -0700, Jun Wu wrote: >> I'm currently leaning towards "outside the operator". That could make "[]" >> closer to existing language. It also looks flexible and clean. For example, >> use "#ordertype", like: >> >> x#changelog[3]: x~-3 (appro

Re: [PATCH] revset: add experimental set subscript operator

2017-07-12 Thread Yuya Nishihara
On Fri, 7 Jul 2017 08:26:53 -0700, Jun Wu wrote: > I'm currently leaning towards "outside the operator". That could make "[]" > closer to existing language. It also looks flexible and clean. For example, > use "#ordertype", like: > > x#changelog[3]: x~-3 (approximately) > x#changelog[-3]: x~

Re: [PATCH] revset: add experimental set subscript operator

2017-07-07 Thread Yuya Nishihara
On Fri, 7 Jul 2017 10:43:39 -0700, Jun Wu wrote: > Excerpts from Yuya Nishihara's message of 2017-07-08 01:11:50 +0900: > > Just a nitpick. They are quite different operations if we take the #op > > as an order specifier. > > > > x[y] (indexing) selects the y-th element from x (inside x) > > x{y

Re: [PATCH] revset: add experimental set subscript operator

2017-07-07 Thread Jun Wu
Excerpts from Yuya Nishihara's message of 2017-07-08 01:11:50 +0900: > Just a nitpick. They are quite different operations if we take the #op > as an order specifier. > > x[y] (indexing) selects the y-th element from x (inside x) > x{y} goes to the y-th elements from x (outside x) > > But, ...

Re: [PATCH] revset: add experimental set subscript operator

2017-07-07 Thread Yuya Nishihara
On Fri, 7 Jul 2017 08:26:53 -0700, Jun Wu wrote: > Excerpts from Yuya Nishihara's message of 2017-07-07 21:25:17 +0900: > > On Thu, 06 Jul 2017 19:04:48 -0700, Sean Farley wrote: > > > Jun Wu writes: > > > > Could it be foo[+4][1] meaning what you want? An explicit "+" means > > > > it's an offset

Re: [PATCH] revset: add experimental set subscript operator

2017-07-07 Thread Jun Wu
Excerpts from Yuya Nishihara's message of 2017-07-07 21:25:17 +0900: > On Thu, 06 Jul 2017 19:04:48 -0700, Sean Farley wrote: > > Jun Wu writes: > > > Could it be foo[+4][1] meaning what you want? An explicit "+" means > > > it's an offset, the "1" without a "+" means it's a normal index. > > > >

Re: [PATCH] revset: add experimental set subscript operator

2017-07-07 Thread Yuya Nishihara
On Thu, 06 Jul 2017 19:04:48 -0700, Sean Farley wrote: > Jun Wu writes: > > Excerpts from Sean Farley's message of 2017-07-01 16:33:47 -0700: > >> > Yep. That's why I slightly prefer not using "{}". > >> > > >> > $ hg log -T '{revset(".{0}")}\n' > >> > ^^^ > >> >

Re: [PATCH] revset: add experimental set subscript operator

2017-07-06 Thread Sean Farley
Jun Wu writes: > Excerpts from Sean Farley's message of 2017-07-01 16:33:47 -0700: >> > Yep. That's why I slightly prefer not using "{}". >> > >> > $ hg log -T '{revset(".{0}")}\n' >> > ^^^ >> >this is not a revset operator, but expanded to '' >> >

Re: [PATCH] revset: add experimental set subscript operator

2017-07-06 Thread Jun Wu
Excerpts from Sean Farley's message of 2017-07-01 16:33:47 -0700: > > Yep. That's why I slightly prefer not using "{}". > > > > $ hg log -T '{revset(".{0}")}\n' > > ^^^ > >this is not a revset operator, but expanded to '' > > I like separating {} and

Re: [PATCH] revset: add experimental set subscript operator

2017-07-01 Thread Sean Farley
Yuya Nishihara writes: > On Fri, 30 Jun 2017 21:42:49 -0400, Matt Harbison wrote: >> On Fri, 30 Jun 2017 20:08:31 -0400, Jun Wu wrote: >> >> > Excerpts from Yuya Nishihara's message of 2017-06-30 23:58:43 +0900: >> >> # HG changeset patch >> >> # User Yuya Nishihara >> >> # Date 1498302078 -32

Re: [PATCH] revset: add experimental set subscript operator

2017-06-30 Thread Yuya Nishihara
On Fri, 30 Jun 2017 21:42:49 -0400, Matt Harbison wrote: > On Fri, 30 Jun 2017 20:08:31 -0400, Jun Wu wrote: > > > Excerpts from Yuya Nishihara's message of 2017-06-30 23:58:43 +0900: > >> # HG changeset patch > >> # User Yuya Nishihara > >> # Date 1498302078 -32400 > >> # Sat Jun 24 20:01:

Re: [PATCH] revset: add experimental set subscript operator

2017-06-30 Thread Matt Harbison
On Fri, 30 Jun 2017 20:08:31 -0400, Jun Wu wrote: Excerpts from Yuya Nishihara's message of 2017-06-30 23:58:43 +0900: # HG changeset patch # User Yuya Nishihara # Date 1498302078 -32400 # Sat Jun 24 20:01:18 2017 +0900 # Node ID b7f6740b0e58c468ecc82296fe1ee0800a7e0582 # Parent fe3419b

Re: [PATCH] revset: add experimental set subscript operator

2017-06-30 Thread Jun Wu
Excerpts from Yuya Nishihara's message of 2017-06-30 23:58:43 +0900: > # HG changeset patch > # User Yuya Nishihara > # Date 1498302078 -32400 > # Sat Jun 24 20:01:18 2017 +0900 > # Node ID b7f6740b0e58c468ecc82296fe1ee0800a7e0582 > # Parent fe3419b41a456661a3d35ae963d06a203d4446a2 > revset:

[PATCH] revset: add experimental set subscript operator

2017-06-30 Thread Yuya Nishihara
# HG changeset patch # User Yuya Nishihara # Date 1498302078 -32400 # Sat Jun 24 20:01:18 2017 +0900 # Node ID b7f6740b0e58c468ecc82296fe1ee0800a7e0582 # Parent fe3419b41a456661a3d35ae963d06a203d4446a2 revset: add experimental set subscript operator It only supports integer indices as a beg