1

Topic: splitting long lines in the PunBB source code

In the PunBB source there are code lines that wrap maybe 5 times on my display and that makes it very difficult to apply line-based patches to the source code since there will almost always be a conflict if I have made the slightest modification, even if the previous changes actually are compatible with the patch I'm trying to apply. It is also very difficult to spot exactly what the differences are when I run diff -u on the vanilla tree against my tree, to see what changes I have introduced. Furthermore it is quite difficult read lines of that length, for example SQL queries that are logically split up into several lines are always much easier to read, and it follows that it also is much easier to edit lines that are split up, since you more easily comprehend what's going on.

I'm sure that you have strong feelings for your current coding style, but combined with the fact that the patches and modifications to PunBB are line-based it makes the current situation very unsatisfying. Is there any chance that the coding style may be reconsidered for 1.3? If not, I think you should to consider some better way of distributing patches for PunBB, that does not as easily introduce conflicts when applied.

Re: splitting long lines in the PunBB source code

Out of curiosity, what alternatives are there to "line-based patches"?

Re: splitting long lines in the PunBB source code

Believe it or not, but I agree. I have never liked the long lines, particularly when it comes to database queries.

/me runs off to assign a ticket to himself.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

4

Re: splitting long lines in the PunBB source code

Oh, great. smile

Re: splitting long lines in the PunBB source code

I've found the fastest way for me to patch is to use beyond compare (best diff I've ever used).  I just download the release version, and the version I have online, right click on the distro, select it for compare, right click on my top level folder and do a binary compare between the 2 folders.  it finds the diff's and lets you visually see what gets changed where, and all you do is click and say, use this or use mine.  simple simple simple.

Re: splitting long lines in the PunBB source code

Rickard wrote:

/me runs off to assign a ticket to himself.

smile http://dev.punbb.org/ticket/61

Re: splitting long lines in the PunBB source code

MadHatter wrote:

I've found the fastest way for me to patch is to use beyond compare (best diff I've ever used).  I just download the release version, and the version I have online, right click on the distro, select it for compare, right click on my top level folder and do a binary compare between the 2 folders.  it finds the diff's and lets you visually see what gets changed where, and all you do is click and say, use this or use mine.  simple simple simple.

I just downloaded it. Wow, cool tool this "beyond compare" thingy! Wish I knew this before. It would have saved me alot of time. Oh, well, better late than never...LOL...

Thanks 4 the tip though!

Re: splitting long lines in the PunBB source code

yea it is handy.  I stumbled upon it one day when I needed to merge some code that wasn't under subversion (because I typically use tortoise svn's diff tool), so I googled, checked out about 10 different (crappy) diff tools and came across this one. definitely worth the 30 bucks they charge for it.