Home Directory In CVS
shamir_k writes "Joey Hess has come up with an innovative solution to a problem we have all faced. He's put his whole home directory in CVS. Not only can he move between multiple computers easily, he also has automatic distributed backups."
Don't forget the -kb switch when you do "cvs add pr0n.avi", otherwise you'll be disappointed when check the file out again.
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
Man, I have a hard enough time trying to get them to accept my insurance card for prescriptions. Hats off to him for getting them to take his files...
I have no sig, the eyebrows seal the deal. That's right. Eyebrows.
I asked this on a local linux mailing group recently- what do people think about the idea of a version control file system? Disk space is cheap these days, we can afford it space wise. Think of all the problems it would solve.
*Made a mistake in your config file? Revert it
*User deleted the file? Revert it
*Want to see why you made a change to any given file? Check the comments (commenting would be optional, of course)
*Your system was exploited? Revert the entire system to before the exploit
*Upgraded an app and regret it? Revert the files
And so on. I'm not sure if CVS would be the best method (I'm not a SCM specialist), but I'd see this as an extremely useful feature who's time has come.
I still have more fans than freaks. WTF is wrong with you people?
No. But you can do this right now:
cvs commit suicide
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
I'll put my home directory on Sourceforge! Everyone can now help me maintain it!
Doh!
'cause CVS loses the history in these operations.
"Hold on a minute, I've got to check out this porn."
I don't have a sig...Do you??
What's next? Keeping system configuration in CVS?
Slow down, I can only patent so quickly...
Note to self:
1. Patent home dir in CVS
2. Patent system configs in CVS
3. Patent pr0n in CVS (note -kb)
JWall: GUI client for IPTables
Right, so on plan9, you can recover all your previous file versions, for example, letter_to_boss.txt :
... ... ..."
v1.0: "You stupid fuck, why don't you give me a raise some day?"
v1.1: "You tight-pocketed capitalist, isn't it high time you gave me a raise?"
v1.2: "Hey Boss, I really think I deserve a raise, I've been working on this project for so long."
v1.3: "Hello Boss, I respectfully request that you should consider giving me a raise, as I think have proven to be a reliable, hard-working employee. Please?"
v1.4-FINAL: "Dear Mr. Schmoe, I wish to apologize in advance for stopping work on our most important project for five minutes, but I would like to present an idea to you : you see, ever since I have started working at 6-pack computing, I've tried to be a model employee and
"A door is what a dog is perpetually on the wrong side of" - Ogden Nash
I have a script that does all of this for me:
http://bleu.west.spy.net/~dustin/soft/filemonitor
You point it at a dir and run it from cron nightly. It also gives you a handy nightly mail telling you what changed. Excellent for those late night changes to systems where you don't remember what you did...or if someone else made some late night changes that you'd like to undo.
-- The world is watching America, and America is watching TV.
I'm not sure why something that I wrote in 2001 and that appeared in print media in 2002 is news.
This is the second time I've been slashdotted for something over 1 year old this year. Previously it was the pkg-comp page, which I wrote circa 1998.
Kinda makes you wonder.
Anyway..
I suppose I should mention that these days I keep most of my home directory in subversion. I have not gotten around to writing a successor to this article yet, but it works even better than cvs, and that's probably the most common question people ask me about this article these days.
see shy jo
I agree that Perforce is awesome. But here's something you may not know -- Perforce is completely free for the kind of thing this article is talking about doing.
Specifically, Perforce is available for download here. Without a license, it only supports two users and two clientspecs... not enough to manage a project shared among developers, but wonderful for managing your code in home projects. More good news: Perforce is free-as-in-beer for use in developing open source projects.
(This isn't meant as a holy war... I know that many of you might think that source control package Foo is better than Perforce. You may be right. I'm just pointing out some Perforce licensing facts for those who like Perforce.)
I've been keeping my home directory in CVS since 1996. Prior to that, I kept it in RCS, since around 1985, and briefly in SCCS.
.* /tmp/glew/old-home-directory // actually, usually saved already .
:-(
I haven't yet decided to go to Subversion, in part because I have a patched version of CVS that allows me to check into multiple CVS repositories - i.e. I can check in when on my laptop on an airplane, disconnected from the net, and can later check in to my main repository when I get connected. (Yeah, yeah, BitKeeper is a way to do that.)
As Joey's article discusses, there are minor issues with CVS'ing your home directory: use of modules, etc. I divide it into stuff that is owned by the company that I am currently working for, and stuff that I own.
When I get an account on a new machine, one of the first things that I do is create a new branch (or, a new version on some existing branch) to hold the dot files and other files
that were pre-installed in my home directory. Having saved them, I then blithely overwrite them with my standard home directory, and maybe do a quick check to see if there are any special features worth propagating to my standard home directory.
Oh, yeah: a bit of footwork to checkout
onto your home directory:
cd ~
mv *
cvs -d MYSERVER co glew-home
mv glew-home/{*,.*}
rmdir glew-home
I often find myself pasting together
modules from different repositories.
Sometimes I *want* a "cvs update"
in the root, e.g. in ~, to traverse
repository boundaries - no problem.
But sometimes I don't - e.g. I frequently
work in ~/hack, and check out stuff into there.
To do this, I have fallen into the habit
of creating a CVSBARRIER directory that is
not checked in, that prevents cvs update
from traversing.
Also, I find it useful to have a place
to put overall comments for a repository.
Typically, this is ~/README or ~/CVS-status.
The overall comments - such as "the tag
named FOO is my home directory at the time
I moved to university BAR and merged in
changes from my laptop BAZZ that had diverged"
get suck in the CVS log, via
cvs ci -f CVS-status.
Oner thing: when yiou have as much history as this, you notice when programs change their interface. E.g. nmh doesn't run my ~/.mhrc from 1994
--- Andy "Krazy" Glew
(I'm too lazy to create a slashdot account)
This was featured in a Linux Journal article from September 2002:
http://linuxjournal.com/article.php?sid=5976
Same guy, too.
Where do you think Gentoo got this from?
Debian.