Manually setting timestamp for commit?

Asked by Ethan Jucovy

Is there any way to manually set the timestamp of a commit, or to set a manual "creation timestamp" as well as the automatic "checkin timestamp?" (The latter would be by analogy to author vs contributor.)

My particular use case: I am writing a script to back up an online wiki into a BZR repository. I can use --author to store each edit's user ID, and everything else maps cleanly onto BZR concepts. The only problem is the timestamp. I would like to preserve the time of the original wiki edits, preferably using a primary bzr concept so that standard bzr UIs support it.

Currently I am using a custom revprop for this information, but this feels suboptimal.

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Vincent Ladeuil
Solved:
Last query:
Last reply:
Revision history for this message
Best Vincent Ladeuil (vila) said :
#1

commit has a --commit-time option (requires bzr >= 2.1.0)

Otherwise, have you looked at lp:wikkid which already use a bzr back end, your participation there will be warmly welcomed !

Revision history for this message
Ethan Jucovy (ethan-jucovy) said :
#2

> commit has a --commit-time option (requires bzr >= 2.1.0)

Thanks, this is perfect!

> Otherwise, have you looked at lp:wikkid which already use a bzr back end, your participation there will be warmly welcomed !

That's very interesting to me, thanks for pointing it out - I've never come across that before.

At the moment I'm only focusing on the bzr backend for content exports, but if this works well (which I expect it will) I am planning on exploring live bzr backends for my project's wikis as a future step. For r&d (and fun) I've been written my own little library for interfacing with bzr with a wiki-like workflow (http://github.com/ejucovy/sven) and a toy wiki/sitebuilder on top of it (http://github.com/ejucovy/svenweb) - I'll definitely look into wikkid ASAP.

Revision history for this message
Ethan Jucovy (ethan-jucovy) said :
#3

Thanks Vincent Ladeuil, that solved my question.