[mythtv-users] 0.21 - general Subversion tips

Holger myth at finch.de
Sun Jan 20 00:37:56 UTC 2008

Hi everybody,

so let's distill my hints and the feedback a little :-)

Mike Perkins wrote:
> Holger, if you haven't already, it might be a good idea to add a version of your 
> notes to the wiki.
> Mike Perkins
I'll be happy to do that, BUT I guess I should know a little more about 
MythTV before I do that...
ATM, I have NOT built it from SVN... but I might try that soon, 
recording groups look like something I'd like to have :-)
I'm a software developer BUT I'm a Linux newbie... so there's lots of 
stuff to find out before I give "official advice" (like in a wiki)

Michael T. Dean wrote:
>>> somebody wrote:
>>> Whenever I have pulled source from svn I always immediately tar it up, before I 
>>> do anything else.
> ...
> There are actually many more reasons this is a great way of working with 
> MythTV source.  It's especially nice if you're actually hacking the 
> source.  I often have multiple working copies of the source in use for 
> the different patches I'm working on.
Yes, of course... if you're actually working with and making changes to 
the code, that's a completely different story...
In that case, I assume you're familiar with Subversion and don't need my 
"general tips" :-)

>> 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".
> But, keeping a copy of a full-fledged SVN working copy to allow you to 
> svn up later is very important.  You should /not/ svn co every time you 
> update myth (as you have suggested, but I'm trying to specifically ask 
> that people don't do full checkouts of myth all the time).
Well, I specifically "highly recommended" using "svn update", right? :-)

>> Using "svn update" is really highly recommended to save some server load 
>> and network traffic, 

However, just from a (very) quick look at the documentation 
(http://www.mythtv.org/modules.php?name=MythInstall) and the wiki, I 
don't see "svn up" mentioned anywhere so I assume many people currently 
do full checkouts every time...

ok... so let's <delete> (i.e. not quote) the thing about unversioned 
checkouts... this was never intended as "general advice" anyway...

>> you can also use
>> svn export mythtvplugins mythtvplugins_copy
>> to make "local copies" that don't include the subversion stuff... (half the size)
>> 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
> But, please, do the export from the working copy--not from the 
> repository (as Holger's example showed).
>> - tar + copy, make as before
>> After that: (for the next update)
>> - svn up
>> - svn export
>> - tar + copy, make as always
So I guess we can consider this the "recommended approach"?
>> b) Specify a revision in update, keep copies of full checkout on different machines
> Though this approach does require 4 svn up's (i.e. downloading the 
> changes 4 times)...  It also requires 4 times the server resources.
I still consider this an option since few people will have more than 2-3 
machines... (or is that a wrong assumption?) and updates are a lot 
cheaper than full checkouts... Unless the repository is already 
CPU-limited (is it?!), this shouldn't be a problem.

>> Oh, I guess this sounds much more complicated than it is...
>> Hope it helps a little anyway  :-)   
> It's good advice (and good to help people better understand SVN), but I 
> wouldn't go so far as recommending against making tar file "backups" of 
> a clean checkout of the source.
well, I would :-)
(unless somebody told me that the server was running at its limits and 
we all desparately needed to avoid any checkouts :-))

Why? Because that's the whole point of version control systems: you 
don't need local backups.

For developers, I recommend against more than one versioned (!) copy of 
the same branch (!).
Do you keep more than one working copy around?
In the case we're discussing here (non-developers), it might not matter 
much, though.

However, I'd still recommend "a compilation copy" rather than a "backup 
of the checkout", i.e.

First build:
svn co
svn export or just "cp" to a temp directory
build and install from there, then delete temp

Subsequent builds:
svn up
svn export or just "cp" to a temp directory
build and install from there, then delete temp

This should be good for "safe and stable builds", right? (as safe and 
stable as the current HEAD allows anyway  ...)
You do a full checkout only once and always know where your latest 
sources are...
"cp" is probably easier to use than "svn export" as long as we don't 
have sparse directories in Subversion (i.e. a couple of months... until 
1.5 is released...)

Sounds good to everybody?

More information about the mythtv-users mailing list