newbie question
Vim Visual
vim.unix at googlemail.com
Sat Nov 4 10:00:37 CET 2006
Hi Adam,
thanks a lot! You're really helpful! That's exactly what I was looking for.
Before I start to play and move/delete my home (which really scares me
a lot) I have four final questions
1- Where do you have your repository? From your text I think you have
only one main repository and then make "working copies" from it. The
most logical thing would be to have the repository also in your
laptop, right? And from there check out working copies = clons of your
home to everywhere
2- If it's so, and you want a clon copy of your home on a PC in China,
then the PC in China must be able to connect to your laptop, and this
is something I don't know how to do
3- Therefore I guess the best solution would be to have the main
repository somewhere in the web but then the privacy issue arises. Can
you protect/encrypt the main repository somehow, so that not even
admin can have a look inside? Maybe a possibility would be mcrypt? But
this would requiere to encrypt/decrypt each time, before checking out,
which requieres a lot of time
4- This implies that you work with svn add, svn delete, svn move, svn
copy etc etc... Are you working with aliases for those commands (alias
cp = 'svn copy')?? so that you never forget telling svn what has been
changed? Why cannot svn figure out automagically what has been added/
removed etc? Is there a way to do that? Is it dangerous not to do it?
Can you just ignore svn complaining about it?
Sorry about that but I would like to understand what I am about to do
before I do it :)
But "as a reward" I promise to write a detailed web site with
everything I have learnt and a how-to for dummies (like me) to live in
svn!
Cheers,
Pau
>
> svnadmin create --fs-type fsfs /var/svn/repository
> svn import /home/adam
> <move or delete your home directory>
> svn checkout file:///var/svn/repository /home/adam
>
> And that's it. You need only one repository, and your home directory
> itself is the "working copy" for svn's purposes. When you make a change,
> you type:
>
> svn add /home/adam/newfile.txt
> svn checkin /home/adam -m "Created the file newfile.txt, which is new."
>
> Now the repository is in sync with your "working copy", i.e. your home
> directory, since there is a copy of "newfile.txt" in each place. If your
> home directory is lost or damaged somehow, you can check out a new
> "working copy" right into your home directory, and get back everything
> that was there before. Also, if you move to a different machine, you can
> check out a copy of your home directory to that machine too, and
> magically have all of your files and preferences available to you.
>
> The svn:externals feature is not required for a simple setup like this
> one, but I can give you an example of how it works. In my repository, I
> have three directories: trunk, tags, and branches. My home directory is
> a checkout of a directory in branches (called mac_laptop, for obvious
> reasons). Like so:
>
> svn checkout http://<adam's repository
> URL>/homedir/branches/mac_laptop /home/adam
>
> That directory, mac_laptop, has a svn:externals property set which pulls
> files from the /trunk folder of the repository. Specifically, it allows
> me to have a common .bash_profile between all of the different machines
> I work on:
>
> svn propedit svn:externals
> <in the editor window>
> .bash_profile http://<adam's repository
> URL>/homedir/trunk/.bash_profile
> <and save and quit the editor>
>
> That way, if I'm working on my home computer (linux_desk), I can have a
> separate branch for it, with linux-specific binaries and such, but which
> uses the same .bash_profile file.
>
> Don't worry if this svn:externals part doesn't make much sense right
> now; it took me about six months of daily usage until I started to see
> where it would be useful and how I wanted to implement it. Try working
> with the simple example I outlined earlier, and let us know how far that
> gets you! :-)
>
> - Adam Compton
>
>
More information about the vcs-home
mailing list