The Patch Seems Outdated! The File Line...And The Patchline Do Not Match

Update (1st September 2008):  This turned out to be a bug in TortoiseSVN that has now been fixed.  Thanks to Stefan Küng whom fixed this bug within 24 hours of me posting it in the TortoiseSVN Google Group (it will be available in the midnight build).  If you use TortoiseSVN a lot send Stefan some money or contribute to the project costs.

I am having a problem testing the application of several minor patches I have written for dasBlog.  I am using TortoiseSVN to create the patch, and apply the patch to a clean checkout of the dasBlog source tree.  When I try and apply any of the 3 patches, the project files (.csproj) show up red in the file patch list:

image

Fair enough I say.  But when I right click the csproj and say "Preview patched file", I get the error message:

The patch seems outdated!  The file line ... and the patchline ... do not match!

Image of TortoiseMerge Error - The patch seems outdated!  The file line ... and the patchline ... do not match!

The file line and patch line in the error message itself look the same to me.  Looking at them raw in Notepad2 also seems to suggest they are the same (bar the single space at the beginning of the patch line, which I think is normal and part of the diff file format as all the other changes have this space).

Patch Line in Notepad2

image

File Line in Notepad2

image

The offending line is the first line of the change in the patch file.  The rest of this change can be seen below.  It is just a change of the ProductVersion number.  If I delete this change out of the patch file, the patch can then be applied successfully (including the other csproj changes I did not delete).

So is this a bug, is there a difference I can't see, or am I doing something wrong?

image

  Posted: 04:40:04 Tue 26 Aug 2008  Tags: dasBlog | Page
   Permalink Comments [2]

dasBlog Patch - Exclude Single Post Category from Home Page

dasBlog lets you specify multiple categories for each post you publish.  It also lets you specify that your blog home page only shows posts within a specific category.  The feature is surfaced in the dasBlog Configuration page section, Appearance Settings:

image

I would like to be able to specify that dasBlog show all posts EXCEPT those in the category I specify.  Why you ask?  Well most of my posts will be public.  Only a few (what you might call pages, rather than posts) should not hit the home page (they will still be public).  Given that other dasBlog features (like the tag cloud) use the category information, I don't want to start seeing things like Public (1,000,000) in my tag cloud!  I would rather see Pages (3).

Adding Support for the "-" Operator in a Category Filter

This patch means that if put the "-" character in front of your category filter string, it will put all posts EXCEPT those in the specified category.   Important Note:  This only works for a single category.  The patch assumes all after the "-" is the Category name (as this is how the include filter works).

image

So, with the setting above, all all posts EXCEPT those in category "page" will make it on to the home page.

  Posted: 03:39:30 Tue 26 Aug 2008  Tags: dasBlog | Page
   Permalink Comments [0]

dasBlog Patch - Add Choice of Dash "-" for Post Title URL Spaces

I want dasBlog to do something it can't do.  Specifically, I want my blog posts to have URLs like this http://bentaylor.org/Software-Development-Tools-List.aspx.  Note the dashes between the words in the post title?  dasBlog does not do this.  dasBlog will only do spaces (using the + sign) or no spaces.

Why do I want dashes?  Well my reading on the subject of Search Engine Optimisation (SEO) would suggest that Google sees the dash as a space and therefore understands the individual words in your title.  Matt Cutts head of the Google Webspam Team backs this up in his post Dashes vs. Underscores

Why not stick with the "+" character, is that not as good?  I'm not sure.  All I know is that IIS7 does not like the plus sign and Google may not like the plus sign.  So I am going to patch it.  I have convinced myself that this is not blogging procrastination.  Once URLs are in the wild you can't change them (well you can, but it is a pain in the 301).

Changing the dasBlog Configuration Page so You can Select "-" for Post Title Spaces

I have made a patch for dasBlog that enhances the option for replacing spaces in a Post Title Permalink.

Pre-Patch Permalink Section:  Currently you configure dasBlog title Permalinks with the following section:

Pre-patch Permalink Config Section

Post-Patch Permalink Section:  The patch (I will shortly submit) changes the configuration section to look like this:

Post-patch Permalink Config Section

In the new configuration, you have a choice of character to replace the spaces with (in the dropdown).  The two (hard-coded*) choices provided are "-" and "+".  For backwards compatibility the default is still "+" and the underlying SiteConfig for the CheckBox remains the same.  However, you can now select a different string to replace the spaces with and this selection will be saved in a new SiteConfig property called titlePermalinkSpaceReplacement.

This blog is already running this patch and it is working well so far!

Update:  This patch should not impact any URLs you have in the wild, that contain the "+".  These will still work, even if you switch over to the "-".  However, if you do that, you should really set up 301 responses from your old URL to the new one.

* I have hard-coded the choices as I do not believe it is something that people would want to configure.  YANGNI.

  Posted: 04:18:48 Mon 25 Aug 2008  Tags: dasBlog | Page
   Permalink Comments [0]

About Me

My name is Ben Taylor.  I live in North London and am the Managing Director of Shape Factory which I founded in late 2005 (after 3 months surfing in Nosara, Costa Rica).  Shape Factory specialises in e-commerce consultancy and the design and build of e-commerce websites and systems using Microsoft .NET and Microsoft Commerce Server.  Most of our work is for Tier-1 Consultancies.

Prior to starting Shape Factory I was the CTO of Snow Valley.  My early years (circa 1995) were spent writing real-time foreign exchange dealing software (my first and favourite baby is still on sale as the Reuters Deal Tracker Server).  The Wayback Machine says that I built the first recorded Snow Valley homepage in 1998 (nice colours!).  My later years were spent building and then managing the build of Commerce Server based e-commerce solutions.  Overall I had 8+ enjoyable years with Snow Valley.

I also support PlayerPal (reflectoring will cause nausea) which I wrote for myself back in the day, so I could control iTunes/WMP from a browser (and learn this new .NET thingy).  I have done bits of Open Source and am currently a developer on dasBlog, the software this blog runs on.

Why am I blogging?  Because I need somewhere to keep track of things and Jon Udell convinced me that blogging will give me the best bang for my keystrokes.

And yes.  I know the Shape Factory site is terrible.

  Posted: 10:33:38 Sat 23 Aug 2008  Tags: BenTaylor | Page | PlayerPal | ShapeFactory
   Permalink Comments [0]