-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dne 10.6.2011 15:22, ug@svn2.opensuse.org napsal(a):
Author: ug Date: Fri Jun 10 15:22:36 2011 New Revision: 64315
Modified: branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes branches/SuSE-Code-11-SP2-Branch/autoinstallation/src/include/io.ycp
Modified: branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes?rev=64315&r1=64314&r2=64315&view=diff ============================================================================== --- branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes (original) +++ branches/SuSE-Code-11-SP2-Branch/autoinstallation/package/autoyast2.changes Fri Jun 10 15:22:36 2011 @@ -1,10 +1,4 @@ ------------------------------------------------------------------- -Fri Jun 10 15:06:40 CEST 2011 - ug@suse.de - -- merged the code for autoyast=device and autoyast=usb to reduce - redundancy and fix the "already mounted" bug for USB (bnc#565558) - --------------------------------------------------------------------
Just an idea, while you are refactoring... wouldn't it be better to move a particular schema-related code to functions instead of having it in one big function (287 lines long)? if ( Scheme == "http" || Scheme == "https" ) { return GetHTTP(...); } else if ( Scheme == "ftp" ) { return GetFTP(...); } else if (Scheme == "file") { return GetFile(...); } else if ... This was almost the first thing I had to do with the code in YaST Backup as it used looooong `if, else if` statements with even looooonger `while` loops. That made the code uneasy to understand and debug. I know that YCP is not an object-oriented language and that makes is harder but it can still be done with, for instance, pointers to variables. BTW, splitting into more functions makes it easier to test too. Bye Lukas - -- Lukas Ocilka, Appliances Department, SUSE LINUX s.r.o. MD: Jeff Hawn, Jennifer Guild, Alena Hendrichova -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iD8DBQFN9b43VSqMdRCqTiwRAgvlAKCEK42IoZ7YEkyg+8V6iFy4OsP/AgCdHIQp XWQisjCpvBmCsl0vj9igrxE= =Pw4a -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org