Gregory K. Ruiz-Ade wrote:
On Aug 17, 2007, at 2:36 PM, Andrew Lentvorski wrote:
Mercurial is easy enough that for the first time since RCS, the entire
OS on my computer is now under source control.
Now, when Apple pushes out some crappy "Software Update", I can see
exactly what they're fiddling with and decide to accept or reject.
Okay, now this got my attention.
Well, the thing that got this all started was VMWare. After installing
VMWare Fusion Beta, my system was exhibiting some strange instabilities.
Of course, VMWare demands a root password. Unusually, in this case,
VMWare actually needs it. It uses some kernel extensions to hook into
networking and device interception. However, I wanted to know that when
VMWare says it uninstalled everything, it really uninstalled *everything*.
Without a VCS, I couldn't tell. Now I can. And they didn't. They left
a kernel extension laying around that seems to have been the culprit.
They fixed the problem in a later Beta, but at least I knew.
Having everything under VCS also lets me relax my "no root password"
policy a bit. I can do an install of some software, check it out, and
be *sure* as to whether it's uninstall did the right thing or not. And,
if not, I can force the revert.
I'm really going to have to look at Mercurial now. I've been using
subversion for all my stuff, and one of my issues has actually been
"where do I stuff my repository".
Any idea how it handles Mac resource forks (if at all... what's using
those these days, anyway, aside from MS's Remote Desktop Client?)
I'm not sure it does. You might need to manually add the resource fork
files initially. You can access resource forks with dotfile magic, I
think it's something like .rsrc or something.
I don't think anything is using resource forks anymore, though.
The only thing you will bump into is that '/r' in filenames causes some
grief with Mercurial. This only pops up in "Icon\r" files on OS X.
Personally, I just delete them (I think I had two). Having filenames
with control characters is asking for a security compromise.
Also, is there a resource online somewhere about migrating from SVN to Hg?
I believe that would be Tailor or hgsvn.
Being able to put the whole system under version control also strikes me
as having some innate security benefits, as well...
Especially since most of these DVCS systems use hashes for file identity.
It also cuts down on the "I'm going to install programs and kernel
extensions in <unrelateddirectory> in order to be clever about piracy."
No, you're not. It's my computer, dammit! You will put things where I
tell you and if you do not I will revert the state to remove you. I
have done that with two applications so far and sent off bug reports to
the companies involved. One sent a very nice apology that they didn't
realize their copy-protection software was doing that and that they
would fix it (we'll see if they do). The other basically said to go
pound sand, they weren't changing. Both are acceptable, but I will not
be using anything from the second company.
A word of warning, the mercurial commands on my OS repository are slow.
It is spending time hashing about 30GB of stuff:
# time hg status
<deleted>
real 2m7.796s
user 0m30.559s
sys 0m19.883s
There are switches to disable hash checking and rely on timestamps, but
I don't change the OS very often so I'd rather run the hashes.
My repository takes up 9GB of space. However, it is picking up and
storing a lot of transient files that it probably shouldn't.
Originally, my repository was only taking up about 2.5GB of space, but
I've been making a lot of checkpoints so that I can revert individual
applications and updates if required. I probably wouldn't do that again.
This is my .hgignore:
.Trashes
.hotfiles.btree
^dev
^Users
^Developer
^Volumes
^automount
^cores
^private/var/vm
^private/tmp
^tmp
^Network
^Library/Printers
^sw
Developer and Users are each kept under their own mercurial repositories
so are excluded from the top-level one. sw is fink, so I don't really
care about it. I regularly have to blow away and reinstall fink when it
gets confused.
If I had to do it again, I'd be a little more aggressive about not
including things from /private, Caches, and Logs. I'd also relegate
Applications that like to diddle their files to user-only installs.
-a
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list