Ability to update a file's modification time to the revision time?

Brian de Alwis bsd at cs.ubc.ca
Sun Jun 15 22:01:54 BST 2008


I've had two occasions recently where I was looking for a way to embed  
the revno of the current branch in a particular file (once for a LaTeX  
document, the other for a source distribution).  In particular, I was  
seeking a way to output the revno as part of a formatted string to a  
particular file (e.g., "(rev {0})" or 'char revision[] = "rev {0}";'  
where {0} would be replaced by the revno) with the file's modification  
time set to the commit date of this revision.  By updating the  
modification times, I could update this file on each build but avoid  
rebuilding the document if the revno hasn't changed.

My apologies if there a way to do this, but I didn't see anything in  
the plugin list or in bzr revno or revision-info.

Brian.

-- 
  Brian de Alwis | Software Practices Lab | UBC | http://www.cs.ubc.ca/~bsd/
       "Amusement to an observing mind is study." - Benjamin Disraeli




More information about the bazaar mailing list