The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My work

  • My badges

  • Twitter Updates

  • My Flickr Stream

    20140508-Delphi-2007--Project-Options--Cannot-Edit-Application-Title-HelpFile-Icon-Theming

    20140430-Fiddler-Filter-Actions-Button-Run-Filterset-now

    20140424-Windows-7-free-disk-space

    More Photos
  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,342 other followers

Development tools should become more version control friendly, and version control tools more whitespace tolerant

Posted by jpluimers on 2013/11/28

There are a few more messages in the “Missed Schedule” backlog, and I really hope that WordPress is going to address this really annoying bug soon as I have to recheck my blog multiple times a day now.

Back on topic:

Development tools should become more version control friendly, and version control tools more whitespace tolerant

I’m taking Delphi and Bitbucket here as an example, but this holds for many more development tools and version control tools.

Ultimately, you want changes to be as simple as this one: only the relevant changed lines show up as an actual change.

But often changes include convoluted non-relevant information.

A few things development tools should not do:

  • Switch between white space conventions between versions.
    For instance this change. It is between Delphi versions, and about the only change in the .groupproj is between tab and spaces as whitespace characters in the XML export.
    In Bitbucket, you can use “side by side” difference to get a feel for the non-important whitespace changes.
  • Switch around attributes (for XML the order is not important, but most comparisons don’t get that).
    For instance this change. It is between Delphi versions, and changes the order of Targets and Projects attributes within the MSBuild element.
    (The change also shows a bit of whitespace; I cut away the irrelevant lines that had only whitespace changes using Beyond Compare)

A few things version control systems should do:

  • They should use different colorization when ony white space has changed.
    See again this change for which most of the lines the only change is from tabs to spaces.
  • They should allow to ignore end-of-line changes like this. When you view the side-by-side difference, there is no change at all.

The above ones are just simple things: there are far more, but fixing the above would make life much easier.

One of the comparison tools I like most is Beyond Compare. It assist me in getting these white space things sorted out before they end up in version control, for instance by these features:

But ultimately, the development tools and version control systems should make this easier for us so we can focus more on things that are important.

Afterthoughts

GitHub has a ?w=0 parameter for this.

Just to show how ignorant BitBucket is on this, the (very old) feature requests I just found:

–jeroen

2 Responses to “Development tools should become more version control friendly, and version control tools more whitespace tolerant”

  1. Joseph said

    >They should use different colorization when only white space has changed.

    Except for Python and (optionally) Haskell, which have significant whitespace! Maybe bitbucket’s historical connection with Python has something to do with these whitespace changes not being made???

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
Follow

Get every new post delivered to your Inbox.

Join 1,342 other followers

%d bloggers like this: