Req: Reset mtimes on reverts.
aaron.bentley at utoronto.ca
Thu Jul 26 01:57:58 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Blake Winton wrote:
> Aaron Bentley wrote:
>> Blake Winton wrote:
> If you revert back to an "older" version, and don't clean your output, I
> wouldn't be surprised at your getting strange results. :)
Well, technically it's an older version, but all the affected files will
have changed, so they'll be rebuilt. I haven't had a problem with this
> Although I still believe that "Version Control Systems" are useful for
> much more than software development.
Oh, certainly I agree. But I think software development is the most
important use today, and Bazaar tries to make choices that simplify the
software development case.
> For that matter, I also believe that Make is on its way out. It's been
> ages since I've had to use a makefile. A setup.py, or a build.xml, seem
> to be what I use these days.
There are certainly many alternatives, but Make is just about
universally supported. I think it will have a very long tail.
> That wouldn't be so useful for my purposes, unless I wanted all my files
> to appear on the day I last committed. :)
To make it work, you'd really have to commit each blog entry as part of
the publication process.
>>> 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?
That will give you the real mtime of the working copy of your file.
> There is of course a plugin which opens and reads every file to get the
> time, but I don't use it because it seems too heavyweight.
Well, it depends on the access patterns. It would be silly to do that
without any caching.
> And hey, weren't you just using Make's similar modification-time
> behaviour in support of one of your previous points?
Modern build systems may use hashes instead of mtimes, and this works
even better with revert. But I wouldn't call Make's behavior fragile.
It fails safe. As long as you're not changing mtimes to older values,
the worst that will happen is that it will rebuild when it doesn't need to.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar