Re: [Qgis-developer] using indentation scripts
Hi jef and all, I guess it's better to have this discussion here than on a comment of line 351 of src/core/symbology-ng/qgsrendererv2.cpp at https://github.com/qgis/Quantum-GIS/pull/3/files#r26150 Probably it would help other people (Is everybody already always using the indentation scripts? If yes, I should get many answers, if not, please read one of today's commits: If you plan to contribute you should reindent with scripts/prepare-commit.sh (using 'our' astyle)). Jef, you wrote that the reason I could not use the indentation scripts should be fixed in SHA: 86bcdc4bac26a28c1a25 Thanks for the hint! Sorry, but I do not understand from the above what to do. Looking in qgis github for the above code, I arrived here https://github.com/qgis/Quantum-GIS/commits/master I found this, whose code name is similar to the above: https://github.com/qgis/Quantum-GIS/commit/86bcdc4bac26a28c1a25adf0ad088390c3bd16d3 Should I take the CMakeLists.txt from the above, replace mine and start again? Still I found another of your commits that contains much more changes related to astyle: https://github.com/qgis/Quantum-GIS/commit/dcc723c067a795b240247754817c3c21abdffc28 Tim: you said I should use git as this would be easier than sending a new patch file, but now I see that the 1_7_0 branch lacks the correct files to do the indentation. So should I ask a pull request to port the two above-mentioned commits into 1_7_0 ??! Or fork 1_7_0 into my branch, merge the above into my branch (no idea how to do this with git), re-indent the new code, undo the previous merge (so that it does not propagate to 1_7_0), commit this to my branch and request another pull?! I guess the whole point of branching to 1_7_0 just before migrating to git is to have a faster release (let people learn git on master). Currently, the 1_7_0 branch is not ready for indenting scripts with git, should that be mandatory? I do not mind trying, but I need some more guidance here. I tried to modify the prepare-commit.sh script to give it the list of files to re-indent but it failed. Any hint on how to do this? Thanks. Jef, you wrote: our version of astyle is built in scripts/ Yes, I saw this and wrote that it puzzles me. Let me put it differently: from where should I run the script ( my `pwd`) and with which option (I saw the PATH hack) to have it find the astyle.sh which is in the folder. Thanks a lot! Mayeul PS: Better to discuss this here for another reason: the hash code in the from/reply to messages sent by git scared my wife ;-) (well, now I redirect them in another folder for sake of her heart). MK - Mail Original - De: Mayeul Kauffmann mayeul.kauffm...@free.fr À: jef-n reply+p-26150-dcf470ddf5342821ac35239d6bd69865a2dbd...@reply.github.com Cc: qgis-developer qgis-developer@lists.osgeo.org Envoyé: Jeudi 5 Mai 2011 23h49:20 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: [Qgis-developer] using indentation scripts Hi Jef, Following your comments on indentation in my patch, I tried to use prepare-commit.sh for more than one hour in vain. When applied after git commit it says nothing has changed (in effect, after commit, my working copy is ahead). So I created a new branch locally to restart from scratch, reapplied my patch, tried the script, in vain again. The best I get is: Unable to determine upstream SVN information from working tree history The only help I could find is a few lines on the following page: http://www.qgis.org/wiki/Developers_Manual#Coding_Style There is a scripts/prepare-commit.sh that looks up the changed files and reindents them using astyle. This should be run before committing. As newer versions of astyle indent differently than the version used to do a complete reindentation of the source, the script uses an old astyle version, that we include in our repository. I had to guess by reading the source code of the script that I needed to install flip (and astyle?), and pass the path to the project as first parameter, but I could not find any documentation on this. Should the script be run form the root folder? Should I install astyle or not? (the comment above on the astyle versions puzzles me). Finally the following command took 10 minutes: cd /hometb/mk/sig/dev/release-1_7_0-4May/Quantum-GIS ./scrips/prepare-commit.sh . before telling me: Unable to determine upstream SVN information from working tree history I tried from several places with relative or absolute path, in vain. So I tried to follow this advice on the same wiki: There is a .indent.pro file in the QGIS src directory that contains the switches to be used when indenting code using the GNU indent program. If you don't use GNU indent, you should emulate these settings. So I installed GNU indent... but could not find the .indent.pro file in the QGIS src directory. What indent options should I use? If I cannot make scrips/prepare-commit.sh work, I do not mind formatting my code manually, but which
Re: [Qgis-developer] using indentation scripts
Hi Mayeul, On Fri, 06. May 2011 at 19:19:24 +0200, mayeul.kauffm...@free.fr wrote: I guess it's better to have this discussion here than on a comment of line 351 of src/core/symbology-ng/qgsrendererv2.cpp at https://github.com/qgis/Quantum-GIS/pull/3/files#r26150 This wasn't meant get a huge discussion anyway - I was just testing the comments on github. My point was that the indentation of if ( r ) r-setUsingSymbolLevels( element.attribute( symbollevels, 0 ).toInt() ); r-setUsingFirstRule( element.attribute( firstrule, 0 ).toInt() ); suggests that the second line, which you added, is also guarded by that if, but it's not. So braces are needed. Running scripts/prepare-commit.sh would have revealed that. That's why I also mentioned that in the comment. Otherwise indentation is not that important. Thanks for the hint! Sorry, but I do not understand from the above what to do. from where should I run the script ( my `pwd`) and with which option (I saw the PATH hack) to have it find the astyle.sh which is in the folder. Top level, no options. prepare-commit.sh will figure out which files were changed and runs astyle.sh only on those. But it's to late for that in your case anyway, as you've already committed. Not sure what the best practice is to update the pull request. Perhaps other more git experienced users can comment. Jürgen -- Jürgen E. Fischer norBIT GmbH Tel. +49-4931-918175-20 Dipl.-Inf. (FH) Rheinstraße 13Fax. +49-4931-918175-50 Software Engineer D-26506 Norden http://www.norbit.de -- norBIT Gesellschaft fuer Unternehmensberatung und Informationssysteme mbH Rheinstrasse 13, 26506 Norden GF: Jelto Buurman, HR: Amtsgericht Emden, HRB 5502 ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
Re: [Qgis-developer] using indentation scripts / update pull reques
Hi Jürgen, Thanks a lot for the detailed answer!! Sorry to have bothered you; I agree standardizing indentation can be useful [in fact, it does not make merging more difficult but easier: if indentation is standardized before each commit, nobody will never ever have to merge indentation]. But it's to late for that in your case anyway, as you've already committed. I would have forked the new 1_7_0 again, applied my patch here, taken into account your comment, run the indentation tool, committed, pushed, and made another pull request. Then I would have deleted my other fork (is this good practice?) I will now work on your comments. Regards, Mayeul ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] SRS database update 1.8.0-Trunk Rev ad494d4
I noticed the srs.db was updated in the latest build. I can see crssync running. However, I don't see any changes in the proj4 definitions for EPSG:3168 and EPSG:3375. They are missing the +gamma parameter. This parameter has already been included in gdal 1.8. C:\epsg_tr -proj4 3168 # Kertau (RSO) / RSO Malaya (m) 3168 +proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257905 +k=0.99984 +x_0=804670.24 +y_0=0 +gamma=323.130102361 +a=6377295.664 +b=6356094.667915204 +units=m +no_defs C:\epsg_tr -proj4 3375 # GDM2000 / Peninsula RSO 3375 +proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.025796466 +k=0.99984 +x_0=804671 +y_0=0 +gamma=323.130102361 +ellps=GRS80 +units=m +no_defs Was this a selective update of certain crs and if so, how do I get my projections to be updated as well? My config: OSGeo4W Windows 7 64-bit Thanks and regards *Hilmy* ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer
[Qgis-developer] Re: something went terribly wrong with reprojected rasters in the last 72 hours
Radim, Any chance you can apply this quick fix to a 1.7 build prior to final release? Math On May 2, 2011 6:56 PM, Radim Blazek radim.bla...@gmail.com wrote: The patch is simple, we have to wait for new repository --- src/core/qgsrasterprojector.cpp (revision 15861) +++ src/core/qgsrasterprojector.cpp (working copy) @@ -130,7 +130,7 @@ mSrcExtent = QgsRectangle( myPoint.x(), myPoint.y(), myPoint.x(), myPoint.y() ); for ( int i = 0; i mCPRows; i++ ) { - for ( int j = 1; j mCPCols - 1; j++ ) + for ( int j = 0; j mCPCols; j++ ) { myPoint = mCPMatrix[i][j]; mSrcExtent.combineExtentWith( myPoint.x(), myPoint.y() ); Radim On Mon, May 2, 2011 at 1:29 PM, Mathieu Pellerin nirvn.a...@gmail.com wrote: Greetings Radim Blazek, I'm forwarding you an email sent to the qgis-developer list hoping it can speed up a major raster rendering issue emerging days before the 1.7 release. Please find attached to this email a rendered map showing the issue. I believe it might have been caused by r15845 or r15846, both applied by you a few days ago. Others seem to draw the same conclusions (http://lists.osgeo.org/pipermail/qgis-developer/2011-May/014148.html). Hope it can be of help to you in resolving this issue. Thanks for all the hard work you and the other developers are putting into QGIS, it's an amazing piece of software. Math -- Forwarded message -- From: Mathieu Pellerin nirvn.a...@gmail.com Date: Mon, May 2, 2011 at 11:27 AM Subject: something went terribly wrong with reprojected rasters in the last 72 hours To: qgis-developer@lists.osgeo.org Greetings, QGIS' trac login is timing out on me so going through the mailing list until it allows me to file in a proper issue report. A change applied on QGIS within the last 72 hours resulted in messy rendering of reprojected rasters. From what I can see, starting at pixel's column 50%+1, QGIS just keeps repainting the same pixels again and again (see attached rendering). This should probably be fixed prior to releasing of 1.7 : ) Cheers. Math ___ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer