[mythtv-users] 0.21 - general Subversion tips
Holger
myth at finch.de
Sat Jan 19 11:04:43 UTC 2008
Hey everybody,
I'm not a MythTV-expert (just yet), but I know Subversion pretty well,
so maybe I can add something useful :-)
If you use Subversion "more than once in a while" (and I mean Subversion
itself, not limited to mythtv), some "basic" knowledge about it can be
quite helpful :-)
Btw: You can find excellent online documentation for Subversion at
http://svnbook.red-bean.com/
And "excellent" means: An actual book with 370 pages as a PDF or an
online version for direct references...
This is highly recommended and actually quite easy to read.
It starts by explaining what version control is and which problems it
tries to solve. For people who've never heard of Subversion before...
The later pages go into a bit more detail of course ;-)
If you use Subversion only to download some sources from a server, you
don't need most of that, but the following commands are recommended and
can save you some time:
svn checkout
(http://svnbook.red-bean.com/en/1.4/svn.ref.svn.c.checkout.html)
svn export (http://svnbook.red-bean.com/en/1.4/svn.ref.svn.c.export.html)
svn update (http://svnbook.red-bean.com/en/1.4/svn.ref.svn.c.update.html)
and maybe
svn log (http://svnbook.red-bean.com/en/1.4/svn.ref.svn.c.log.html)
Most of the others like "commit", "merge", "diff" etc. are only for
developers...
Now on to more specific stuff:
Mike Perkins wrote:
> Whenever I have pulled source from svn I always immediately tar it up, before I
> do anything else.
Two things about SVN:
1) It keeps copies (!) of everything you "pull from the server".
2) You can specify revisions when you check out sources
Both things have already been mentioned.
The consequences are:
1) Your tar files are twice the size they need to be. Hmm, maybe not
quite since some of that might be compressed nicely (might be worth a
test), but still... the (extracted) "content" takes up twice the space
it would need
If you don't want to use "Subversion features" (like update) on a
directory, "svn export" is a very good command. It basically makes a
copy and removes all the Subversion specific stuff from it to give you
"a clean directory tree from the repository". OR it doesn't create the
subversion specific stuff in the first place.
Using "svn update" is really highly recommended to save some server load
and network traffic, but if you don't use it anyway, you can use
svn export http://svn.mythtv.org/svn/trunk/mythplugins/mythvideo/
instead of
svn co http://svn.mythtv.org/svn/trunk/mythplugins/mythvideo/
to get "clean directories" (half the size).
you can also use
svn export mythtvplugins mythtvplugins_copy
to make "local copies" that don't include the subversion stuff...
Take a look at http://svnbook.red-bean.com/en/1.4/svn.ref.svn.c.export.html
2) You can specify revisions when you check out sources...
... and also when you update
svn update -r 12345
==>
In your case, I see two ways of "doing things better":
a) Have some directory for checkouts and use "clean copies" otherwise
(for builds on local machine and the three others)
First:
- svn co ...
- svn export
- tar + copy, make as before
After that:
- svn up
- svn export
- tar + copy, make as always
b) Specify a revision in update
Depending on your network setup, this may be more convenient
Keep a checkout of mythtv on each machine.
Do "svn up" on the first machine. It tells you the current revision
number. If you forget it, you can find out by typing "svn info".
Do "svn up -r [that number]" on the other machines.
The network traffic should normally be minimal because it downloads only
the changes since last time. (even only those *parts of a file* that
have changed)
Oh, I guess this sounds much more complicated than it is...
Hope it helps a little anyway :-)
Cheers,
Holger
Mike Perkins wrote:
> Chris Weiland wrote:
>
>> I don't really see a point in making a temp copy of the source. If you mess
>> up the source, you can run "svn revert", which will restore any changes that
>> you've made to the source tree (except for additional files that were
>> created), or just delete it and check it out again. I believe that
>> reverting does not even communicate with the svn server because svn keeps a
>> local clean copy on your machine for just this reason.
>>
>>
> Whenever I have pulled source from svn I always immediately tar it up, before I
> do anything else.
>
> This makes sure that I have the exact same source on the four machines I run
> Myth on. It also means I have a reference if one of the machines self-destructs,
> and it saves me from clogging up the internet tubes more than once.
>
> Mike Perkins
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>
>
More information about the mythtv-users
mailing list