[PATCH 1 of 2 v2] Allow commit date before Unix epoch

Christian Ebert blacktrash at gmx.net
Sat Apr 2 05:00:36 EDT 2016


* Adrian Buehlmann on Saturday, April 02, 2016 at 09:58:27 +0200
> On 2016-04-02 02:55, Florent Gallaire wrote:
>> # HG changeset patch
>> # User Florent Gallaire <fgallaire at gmail.com>
>> # Date 1459212616 -7200
>> #      Tue Mar 29 02:50:16 2016 +0200
>> # Node ID 8152e614ee77606b3e26f8935ded4157b4caa86c
>> # Parent  ff0d3b6b287f89594bd8d0308fe2810d2a18ea01
>> date: allow negative timestamp
>> 
>> DVCS are very useful to store various texts (as legislation) written before
>> Unix epoch. Fri, 13 Dec 1901 is a nice gain over Thu, 01 Jan 1970.
> 
> This change would backout change dd24f3e7ca9e and thus reintroduce issue
> 2513.
> 
> In case you indeed manage to find a different solution for old issue
> 2513, you would have to introduce that solution together with the
> removal of the check for negative t values.
> 
> Putting the mercurial codebase into an intermediate state which
> reintroduces a bug is not acceptable.
> 
> Perhaps a different solution for dd24f3e7ca9e is possible, but it likely
> is quite a bit more complex than what you sent with your other patches.
> 
> For example, you would have to explain the strategy how to introduce
> negative time values. The current method of mercurial seems to be to
> refuse negative time values on input - because it cannot handle these.
> 
> If you introduce a solution which can handle negative time values, then
> you have to show how such a soulution can be released. Old and new
> versions of Mercurial coexist in the wild. For example, it has been a
> long standing requirement that old versions of mercurial can talk to new
> versions over the wire (push and pull). Introducing a change which
> produces history data that old versions of mercurial can't handle is
> usually a rather complex matter.
> 
> See also:
> https://www.mercurial-scm.org/wiki/CompatibilityRules
> https://www.mercurial-scm.org/wiki/RequiresFile
> https://www.mercurial-scm.org/wiki/ContributingChanges

Maybe the best way forward would be to develop this as an
extension? If and once it's stable enough it could become either
a shipped extension or part of core.

Speaking from a rather selfish point of view, as the feature
could be useful for a personal project of mine.

-- 
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions


More information about the Mercurial-devel mailing list