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.
/etc
Have a checkin comment for why a configuration change got made. Be able to roll back a failed experiment reliably. Find out when a change happened.
Has anyone tried this with BitKeeper?
SCREW THE ADS! http://adblock.mozdev.org/ Proud user of teh Fox of Fire - Registered Linux User #289618
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?
... quick, patent it!
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.
I wonder why CVS, and not something more advanced, like Arch or Subversion? Especially since he outright complains about common limitations in CVS, like moving files and dealing with directories at all. If he's hoping, as he says, "for a better replacement some day", why not see what the present has to offer?
I mean, that's not to say that alternative systems are perfect, either. I'm going through the process of learning arch now. There's a learning curve, but not nearly as big as it's made out to be. Still, using something else (almost anything else) would probably help on things like the merging issues, especially since he mentions that sometimes it's a pain keeping things in sync between three of his machines.
I like ragging the editors as well, but come on, the blurb said 'innovative' and that is all. There's nothing about "new" mentioned anywhere in there, you pulled that out of your ass just so you could complain. Now quitcherbitchin and just read the kewlness that is home directies in cvs. ;)
Quidquid latine dictum sit, altum viditur
Plan9 has the mantra : "file creation is forever"
/sys/src/libc/port/*.c
Automated incremental backups are a way of life.
With Venti one can even back up two windows/linux machines and *not* use up disk space for commonly used blocks, so backing up 100 machines wont use up the usual 1Gb each for the duplicate libs/windows directories.
The yesterday command give you the power to browse back through your life
Find what has changed in the C library since March 1:
yesterday -d -0301
When did you say this guy did the innovation again?
There are places where the networks are not touching,and there are places where they are-Boeing's Lori Gunter
That's a smart way of doing things. I've found version control to be worthwhile on even single user projects. Having the same kind of backup/restore and history tracking on every one of your files just makes sense. I'm suprised no-one has done this sooner.
In a slightly more abstract sense, it provides a 'working set' of documents on your computer. Comments on your version history adds meta-data to files that is time-based. Most systems at the moment add meta-data that is for the current file. Imagine, you check in some files with a comment like 'Project: holiday snaps 03'. Then later on, you use one of those files in a presentation 'Project: report for Bill 03'. With standardised formatting of such tags, the file keeps with it the idea that it has been used with multiple projects at different times. That's a powerful method of grouping.
Ever been in the situation where a file belongs with multiple projects? With your standard directory structures, you might put it in one directory and shortcut/alias/whatever it in the other (or maybe make a second copy). It's pretty ugly right? What if you could say, this file belongs to both of these projects, and you could even provide the old version that was used in another project. OK, so all of that would require some more automation - we can dream can't we?
That has a lot of possibilities.
Refuse to make a statement in your sig!
I currently store parts of my .thunderbird and .phoenix directories in CVS and do the commit/update to sync work and home. In general it works pretty well, though not all my settings translate well between OS X (work) and Red Hat (home). For this reason in particular, extensions are not in my CVS and this makes keeping stuff custumized a bit of a pain still.
"When ideology and theology couple, their offspring are not always bad but they are always blind." -- Bill Moyers
"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
My recommendation: use the Unison file synchronizer to keep multiple copies of your home directory in sync.
It's not quite the same thing as CVS, but that's probably a good thing. Most importantly, it won't give you versioning. On the other hand, it is symmetric (meaning, none of the copies are distinguished) and it is much less hassle to use. Also, you can define custom merge methods to automate merging of things like mailboxes. Unison is great for keeping a home directory (or portions of it) in sync between different desktops, and between desktops and laptops.
Note that for live backups, rsync is probably still the best choice because you want something unidirectional.
I shudder to think what happens when he tries to rename his files and directories.
:(
Definitely the biggest problem with CVS.
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.
This isn't insightful. He specifically states in the article that he has a .hide directory that _doesn't_ get "sown like seeds across a number of systems" just for this very reason.
Bah.
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
There's nothing about "new" mentioned anywhere in there, you pulled that out of your ass just so you could complain.
Merriam-Webster defines news as "a report of recent events". If Slashdot is "News for Nerds" then an article from over a year ago ain't news.
I live ze unknown. I love ze unknown. I am ze unknown.
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)
Isn't this what rsync is for? CVS seems to be the wrong tool for this job.
This was featured in a Linux Journal article from September 2002:
http://linuxjournal.com/article.php?sid=5976
Same guy, too.
Smitty825: AvantLegion: --
Now hold on. Just because his sig is "Doh!" doesn't automatically mean he's anti-Bush.
It might just mean that he's pro-Homer Simpson.
-- MarkusQ
Perhaps it's stuff that matters?
Look out!
rcsvi is a simple wrapper for vi that puts edited files under revision control. It does not support any vi flags. It only takes one file argument and an optional revision number for reverting to previous versions. A few examples:
Voila. You now have your passwd file under revision control. More examples:To make a complete backup of your system configuration:Now you may ask "ok i want to edit multiple files and/or do some other trickery". Don't. It's a simple tool, that i'm using for years now with great satisfaction.Check it out here