Req: Reset mtimes on reverts.
Martin Pool
mbp at sourcefrog.net
Thu Jul 26 18:07:40 BST 2007
On 7/25/07, Blake Winton <bwinton at latte.ca> wrote:
> > Since Make is more important for software development than PyBloxom, I
> > think it is unlikely that we will ever support reverting mtimes as
> > default behavior.
>
> That sounds fair. I'ld be more than happy to have it as an option, or a
> patch that's only applied to my tree.
I'd be happy to have an option to use the committed time for revert,
update, and other things that build or update a tree. I don't think
it's a high priority, but a clean and tested patch would be ok.
> >> I think I can just call
> >> working_tree.get_file_mtime(file_id) to get the mtime of the checked in
> >> file, but I'm not sure if that would work for historical revisions. Does
> >> the mtime of checked in files get stored?
> > No. Only the commit time is stored. But RevisionTree.get_mtime will
> > provide the commit time.
>
> So, what would working_tree.get_file_mtime give me?
The mtime of the file on disk - setting it back to this time would be
a noop (except it would update the ctime).
Personally, I configure my editor to save backups, then use
touch -r %~ %
to reset the current file's mtime to the time of its backup. (Where %
is the filename.)
I think (I'm not sure) that svn does store the files' mtimes when you
commit, but this seems a bit wasteful because almost nobody uses them.
--
Martin
More information about the bazaar
mailing list