Thursday, August 12, 2010

Sitecore 6.2 WebDAV features

With 6.2, Sitecore allows you to access uploaded Media Resources as if they were on your local file system--drag and drop file upload, right click to edit, etc. Here's a useful walk through from Sitecore:

Wednesday, August 11, 2010

Sitecore Coming Attractions

Just attended a user group presentation on Sitecore 6.3 and Sitecore Azure.  6.3 is all about cleaning up the relationship between Content Management and Content Authoring servers.  The Staging Module goes away, and is replaced by an event queuing architecture that enables, among other things, multiple Content Management servers (e.g one in California, one in the UK), to stay in sync.

But things get really cool with Sitecore Azure, which allows one-click style deployment of Content Management and Content Delivery servers from the cloud, for rapid scale up.  This looks like a big deal for Microsoft, since it provides a pretty nifty front-end to Azure.

Update: Microsoft posted a case study on Sitecore Azure.

Thursday, August 5, 2010

How to avoid Merge clutter

Subversion marks unmodified files as modified - Stack Overflow explains why you get tons of extraneous files and folders as modified after doing a merge. Basic takeaways:
  1. Always merge to the root directory.
  2. Once merge info gets into a file or folder, the merge info gets updated with every merge.
  3. The only way to fix this is with a recursive delete of the merge info in children of the project root.
  4. Before doing this, you need to make sure that the list of merges in the project root is exhaustive, or you may end up applying a merge twice. This is unlikely however, as merge info is a recent addition to SVN, and the underlying code is designed to recognize if a merge has already been applied.

Sunday, July 25, 2010

Resolving SVN Tree Conflicts

The Red Bean SVN Book has a good explanation of how to fix Tree Conflicts in the chapter Dealing with Structural Conflicts.  Basically, this happens because one developer has made a change to a file or directory that another user has deleted or renamed.  The svn status command will indicate which file is at issue:
C:\testrepos>svn st
M       baz.cs
M       foo.cs
A  +  C bar.cs
      >   local edit, incoming delete upon update
The "C" in column 5 next to bar.cs indicates a tree conflict, namely that this file has been renamed by another user.
To resolve this, do an SVN UPDATE, which will bring in the renamed version, apply your changes to this version, use SVN REMOVE to delete bar.cs, and finally, let SVN know that the conflict is resolved with this command:
svn resolve --accept=working bar.cs
This lets Subversion know that the change we made to bar.cs, namely deleting it, should be propagated up to the repository. Finally, do a commit to mark the change complete.

UPDATE: We moved to GIT, so these are now a distant memory. Git can handle this scenario cleanly.

Saturday, July 24, 2010

Subversion FAQ

Digging into the Subversion FAQ. It has a lot of useful tips, such as this one:
I have a file in my project that every developer must change, but I don't want those local mods to ever be committed. How can I make 'svn commit' ignore the file?

The answer is: don't put that file under version control. Instead, put a template of the file under version control, something like 'file.tmpl'.

Then, after the initial 'svn checkout', have your users (or your build system) do a normal OS copy of the template to the proper filename, and have users customize the copy. The file is unversioned, so it will never be committed. And if you wish, you can add the file to its parent directory's svn:ignore property, so it doesn't show up as '?' in the 'svn status' command.

Tuesday, July 20, 2010

Just wondering...

Why doesn't windows provide a command line interface to uncompress *.zip files?  Something legal, or they just don't want us doing that in our bat scripts?

Wednesday, July 14, 2010

Excluding .svn Directories from the MSBUILD Copy task

This post shows how to exclude .svn directories from an MSBUILD task. The magic syntax to exclude them is this:
<ItemGroup>
     <LibraryFiles Include="$(LibrariesReleaseDir)\**\*.*" Exclude="$(LibrariesReleaseDir)\**\.svn\**" />
</ItemGroup>

Monday, July 12, 2010

Keeping Web.Config nice and tidy

I've been digging through .Net blogs to get some ideas about how to tidy up the web.config file.

OdeToCode recommends building an encapsulation layer between Web.Config and your code, so that the string values keys used to access Web.Config settings are replaced with property names of a Configuration class.   This also provides a place for casting not string values, and for replacing the source of the data at a later point in a way that will be transparent to the rest of the application.

Sunday, July 11, 2010

Tweaking the project file to customize MSBUILD

Compiling Apps With Custom Tasks For The Microsoft Build Engine explains the black art of tweaking your .csproj file.

Web Deployment projects ...

... are very cool.  They let you automate deployment to production or test environments either from Visual Studio or from the MSBUILD.exe command, with pre- and post- build customized tasks, and web.config overrides, all driven by the Configuration setting.  I've found a good blog post but not a lot of documentation, so I'm still figuring out how the tasks work.

Update: There's an open source project to write custom MSBUILD tasks.