Michael Matz (matz@suse.de) wrote:
On Tue, 10 Sep 2013, Adam Spiers wrote:
The timestamp is useless as mentioned previously
Mentioned by who? It's certainly not useless - it's *required* for correct chronological ordering, as I already mentioned.
You're too fixated on git. Correct chronological ordering is not depending on timestamps. It depends on some number that monotonically increases with commit time. svn revision numbers do for instance.
Ah, I see what you mean. Sorry, I thought we were just talking about git in this part of the thread. But yes you're right, svn revision numbers are sufficient for ordering. That's why I included support for '%r' expanding to the svn revision number in tar_scm's versionformat parameter. '%r' also expands correctly for bzr, just in case anyone still uses that ;-) And it supports {} keyword expansion for hg too.
And as timestamps indeed have the mentioned problem it's actually a bad way to ensure chronological ordering. Better than nothing I suppose, but not very good.
Well, when you don't know anything about the branching structure of a project, I fear it's the *only* way. In fact, there cannot ever be a silver bullet, because if you have multiple branches being developed in tandem (e.g. stable and development) then there is no strictly defined ordering. If someone commits something on the trunk, and then later commits something on the stable branch, which should be considered newer? There's no real answer - it's a bit like asking whether red comes before or after blue (although I expect most ANSI geeks would say before ;-)
An offset (with or without hash, depending on what's needed) is both short and precise.
Sorry, I don't understand this. Can you explain in more detail?
Offset == number of commits on top of some base (where base in git describe parlance is e.g. a tag).
I see. That would be fine if you could guarantee that an appropriate base existed. But when trying to formulate general guidelines for package versioning, that's not much help unfortunately. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org