Re: [PATCH] histedit: improve documentation and behaviour of dates (issue4820)

2017-02-21 Thread Ben Schmidt
On 22/02/2017 8:25 am, Augie Fackler wrote: Having thought about this more over the balance of my weekend, it makes sense that this is consistent with 'hg amend' from evolve, and it feels right enough. Since it wasn't previously documented we'll go ahead and do this, and if anyone complains we

Re: [PATCH] histedit: improve documentation and behaviour of dates (issue4820)

2017-02-21 Thread Augie Fackler
On Mon, Feb 20, 2017 at 12:17 AM, Ben Schmidt wrote: > I recognise there are probably use cases for the current 'roll' > behaviour as well. What I'm primarily interested in is solving the > problems raised in the bug, so if we can do that another way, such as >

Re: [PATCH] histedit: improve documentation and behaviour of dates (issue4820)

2017-02-19 Thread Ben Schmidt
It also adjusts and documents the new behaviour of 'roll'. It now fits nicely with the behaviour of 'commit --amend' and the 'edit' action, by discarding the date as well as the commit message of the second commit. Previously it used the later date, like 'fold', but this often wasn't desirable,

Re: [PATCH] histedit: improve documentation and behaviour of dates (issue4820)

2017-02-19 Thread Augie Fackler
> On Feb 20, 2017, at 12:00 AM, timeless wrote: > > Fwiw, recently someone identified that if's are roughly as expensive > as method calls. > > I /think/ that means it'd be better for: > +if self.firstdate(): > +commitopts['date'] = ctx.date() > +

Re: [PATCH] histedit: improve documentation and behaviour of dates (issue4820)

2017-02-19 Thread timeless
Fwiw, recently someone identified that if's are roughly as expensive as method calls. I /think/ that means it'd be better for: +if self.firstdate(): +commitopts['date'] = ctx.date() +else: +commitopts['date'] = max(ctx.date(), oldctx.date()) to be managed

Re: [PATCH] histedit: improve documentation and behaviour of dates (issue4820)

2017-02-19 Thread Ben Schmidt
On 20/02/2017 12:39 pm, Augie Fackler wrote: On Feb 19, 2017, at 8:23 PM, Augie Fackler wrote: On Sun, Feb 19, 2017 at 02:51:46PM +1100, Ben Schmidt wrote: # HG changeset patch # User Ben Schmidt # Date 1487413828 -39600 # Sat Feb

Re: [PATCH] histedit: improve documentation and behaviour of dates (issue4820)

2017-02-19 Thread Augie Fackler
> On Feb 19, 2017, at 8:23 PM, Augie Fackler wrote: > > On Sun, Feb 19, 2017 at 02:51:46PM +1100, Ben Schmidt wrote: >> # HG changeset patch >> # User Ben Schmidt >> # Date 1487413828 -39600 >> # Sat Feb 18 21:30:28 2017 +1100 >> #

Re: [PATCH] histedit: improve documentation and behaviour of dates (issue4820)

2017-02-19 Thread Augie Fackler
On Sun, Feb 19, 2017 at 02:51:46PM +1100, Ben Schmidt wrote: > # HG changeset patch > # User Ben Schmidt > # Date 1487413828 -39600 > # Sat Feb 18 21:30:28 2017 +1100 > # Node ID 4037ff1c9713d73b21ddc182580eacacba254ea7 > # Parent

[PATCH] histedit: improve documentation and behaviour of dates (issue4820)

2017-02-19 Thread Ben Schmidt
# HG changeset patch # User Ben Schmidt # Date 1487413828 -39600 # Sat Feb 18 21:30:28 2017 +1100 # Node ID 4037ff1c9713d73b21ddc182580eacacba254ea7 # Parent 1f51b4658f21bbb797e922d155c1046eddccf91d histedit: improve documentation and behaviour of dates