[mythtv] [PATCH] mythvideo: videomanager.cpp & metadata.cpp

Colin Guthrie myth at colin.guthr.ie
Thu Dec 16 14:57:36 UTC 2004


Hi Gareth,

Gareth wrote:
> Patch to videomanager.cpp fixes a bunch of segfaults for various
> key-presses when no videos are available (happened a lot to me during
> initial set-up :).
> 
> Patch to metadata.cpp fixes titles (and other text fields) with
> double quotes in them getting an extra '\' saved to the db when
> (amongst other things) the parental level gets changed in the
> videomanager view.

Great! I'll say that there is a database patch that will hopefully get 
applied in the not too distant future that should do the same as your 
metadata.cpp patch (I think) as it uses (IIRC) the prepareValue method 
to format data for DB insertion.

> These are my first patches, so let me know if they're wrong format
> etc.
> 
> $ cvs -z3 -d :pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs diff
> mythvideo/videomanager.cpp > videomanager.cpp.diff

They are slightly wrong, so you'll probably be asked to resubmit them 
(I'm not a MythVideo dev myself, tho' use it lots!)

If you've got a CVS checkout, your 
:pserver:mythtv at cvs.mythtv.org:/var/lib/mythcvs bit in the command above 
is not needed (a CVS checkout contains a special folder CVS in each 
folder of the checkout. In that folder a file called Root contains this 
information for you!)

But the big problem is the format of the diff. Universal diffs are 
preferred as they contain context and are much more human readable.

Just pass the argument -u to cvs diff:

e.g. cvs -z3 diff -u mythvideo/videomanager.cpp >filename.diff

Also, you can combine both your diffs in one if you like e.g.

cd mythvideo; cvs -z3 diff -u >biggerpatch.diff

You can also create a .cvsrc file in your home directory with certain 
options in it. Mine contains the lines:
diff -u
update -d


Hope that helps

Col.


-- 

+------------------------+
|     Colin Guthrie      |
+------------------------+
|  myth at colin.guthr.ie   |
| http://colin.guthr.ie/ |
+------------------------+


More information about the mythtv-dev mailing list