← Back to team overview

dailydebs-team team mailing list archive

Re: Timestamps in version numbers

 

James,

On Thu, 2009-07-02 at 19:58 -0400, James Westby wrote:
> 
> Do any of you use timestamps in the version numbers for your packages?

I add timestamps in all my packages versions.
Initially, the requirement came from cvs, where there's no commit id.
I 1st used ~cvsYYYYMMDD but for busy projects with a lot of commits, it
was not enough so i moved to ~cvsYYYYMMDDtHHMM (t = time) 

Then git, where the commit ids are hashes, i.e. not sortable.
So I use ~gitYYYYMMDDrXXXXXX with XXXXXX is a part of the hash
(r = revision)

for small projects with very few commits per week, ~bzrXXX (with XXX =
commit id) is enough, but less informative.

> If so do you use local time or UTC?

I try to use UTC when the upstream VCS uses local committer times, like
hg, leading to dates in the past (sometimes weeks in the past) and then
to rejects. If I know the VCS uses a unique TZ with always increasing
dates, i don't really care about forcing UTC (not to mention it's not
always possible depending on the VCS).

The date is useful to quickly identify a commit window but it's
insufficient, the upstream commit id is needed. This is really what
upstream wants when filing a bug against trunk. The idea is that it must
be possible to grab the exact same source files, just using the info
encoded in the version. Obviously, it's not always possible with CVS,
but it is for svn/git/hg/../bzr.

I tried to work with a VCS imported in bzr but the commit ids ment
nothing to upstream, so i had to take another path. I'm interested to
know if/how you solved that.

/Fabien

> In
> 
>   https://code.launchpad.net/~malept/bzr-builder/bug.394117/+merge/8072
> 
> there is a fix for running the testsuite in a different timezone from
> me, but it prompted me to consider what we should be doing.
> 
> UTC would be more "correct" I think, but the chance of problems is low,
> and it may be surprising. Would you find it surprising/confusing if
> UTC timestamps were used?





Follow ups

References