Updating commit timestamp on push.
Kastner Masilko, Friedrich
kastner-masilko at at.festo.com
Wed Dec 4 10:39:13 UTC 2013
> From: mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com] On Behalf Of Kannan Goundan
>
> ...It would be more useful to us if the
> timestamps represented when each commit made it to the central repo (at
> least within a minute or two).
Why would it be so, if I might ask? Perhaps you are better off with something like SonicHg ( https://kenai.com/projects/sonichg/pages/Pushlog ) instead?
> I looked at "pre-push" hooks and also looked at the way the "mq"
> extension creates a wrapper around the "push" command. Those options
> aren't straightforward because it looks like I need to parse the
> arguments to "push" (like "-b <branch>") to make sure I figure out the
> right set of commits. I think I can copy/paste some code from the
> Mercurial source's implementation of "push" to achieve my goal, but
> that seems brittle.
I think there are all kinds of pitfalls with "just" wrapping the push operation on this:
* What about specific pushes, i.e. those pushing only up to a certain revision? E.g. if you have a situation like this:
1-2-3-4-5-6-7-8-9
......^.....^
......|.....\push only up to here
......\already on server
This would mean your revisions 8 and 9 need rebase or (if available) evolve extension. Also having 5-7 getting the same timestamp seems pointless to me.
* What about bookmarks? They would need to be moved, too.
* What about pushing commits you've got from a colleague's repository? Now you've said that you work in a central manner, but nothing prohibits the user simply using another remote.
IMHO you would be better off using SVN on the central server and hgsubversion to commit to it. There the rewrite/rebase dance is already implemented, plus you get central user "stamping", too.
Regards,
Fritz
Development Software Systems
Festo Gesellschaft m.b.H.
Linzer Strasse 227
Austria - 1140 Wien
Firmenbuch Wien
FN 38435y
UID: ATU14650108
Tel: +43(1)91075-198
Fax:
www.festo.at
Der Inhalt dieser E-Mail und moeglicher Anhaenge sind ausschliesslich fuer den bezeichneten Adressaten bestimmt.
Jede Form der Kenntnisnahme, Veroeffentlichung, Vervielfaeltigung oder Weitergabe des Inhalts dieser E-Mail und
moeglicher Anhaenge durch unberechtigte Dritte ist unzulaessig. Wir bitten Sie, sich mit dem Absender der E-Mail in
Verbindung zu setzen, falls Sie nicht der Adressat dieser E-Mail sind sowie das Material von Ihrem Computer zu loeschen.
This e-mail and any attachments are confidential and intended solely for the addressee. The perusal, publication, copying or
dissemination of the contents of this e-mail by unauthorised third parties is prohibited. If you are not the intended recipient of this
e-mail, please delete it and immediately notify the sender.
More information about the Mercurial
mailing list