[issue1736] Push could warn about future timestamps

Steve Borho steve at borho.org
Mon Jul 13 14:04:22 CDT 2009


On Mon, Jul 13, 2009 at 1:51 PM, timeless<timeless at gmail.com> wrote:
> On Mon, Jul 13, 2009 at 7:11 PM, Timo
> Sirainen<mercurial-bugs at selenic.com> wrote:
>>
>> New submission from Timo Sirainen <tss at iki.fi>:
>>
>> I accidentally committed and pushed a change while my clock was a couple of
>> weeks into future. Maybe hg push could require -f parameter when changeset
>> timestamps are over a few minutes in future?
>
> oh man, i've been bugging guys locally to do that because one of our
> engineer's clocks is way off, and it really bugs me (it also breaks
> various tools we have which try to trigger stuff).
>
> Note that -f isn't the flag i want.
>
> it should be -intentional-future-date and the error message should
> provide it so that people can copy it when they get the error.
>
> Oh, and if you try to use -intentional-future-date and none of the
> item dates are in the future, your push should also fail.
>
> i.e. it shouldn't be possible for people to just add a flag to their
> .hgrc file which lets them work around this, and they shouldn't get in
> the habit of using -f.

Couldn't you do this with a pretxnchangegroup hook on the server and
just force users to fixup their times before pushing?

--
Steve Borho


More information about the Mercurial-devel mailing list