Sunday, 9 March 2008

Differences between LizardTf and Team Explorer

I posted a reference to LizardTF on a post to Dotmad.net, and Adi asked what the main differences between Microsofts Team Explorer and LizardTF were. I started to answer on that post but the comment started to get quite long, so I thought I'd answer it here, and link here from there. So here is the answer:

The main difference is that all functions are driven from the working copies (via windows explorer) rather than from a repository (server) view. I prefer this way of working as once checked out, you are working on the working copies, not the repository. I admit the distinction is a subtle one, but quite important if you want to work off-line, which is something I'd like to add to LizardTF - though I notice now that it is included in TFS2008 (see previous post)

LizardTF integrates into Windows Explorer, and shows TFS items current status with icon overlays, so as you browse your files you can immediately see what is checked in, checked out, changed, out of date, potentially conflicting or recently added. Extra detail columns show TFS version numbers, status and locks, an additional properties page shows a quick history and full status - all from the regular explorer. Extra context menus provide access to all the repository functions.


LizardTF shows both in windows explorer and in review screens all conflicts, out of dates, check-outs with local changes, and check-outs without changes(a distinction Team Explorer doesn't make).
The review screens only show changes about the files/folders selected, rather than all across the repository as in Team Explorer. Though if you select a root folder, you will see all changes, obviously.

When you select 'Check-in' in Team Explorer it lists everything that is checked out. Visual studio will check things out automatically, some won't have changed. This makes a quick sanity check review before committing a changeset rather time consuming. LizardTF clearly shows files that have changed seperately from ones just checked out.

Team Explorer only mentions conflicts after you attempted a check in. You then get the option to fix conflicts, but it does not prompt to re-attempt the check in once all are resolved. You will have lost all check in comments, notes and associations. LizardTF highlights conflicts at once, and doesn't close the check in screen unless you tell it to.

Team Explorer sometimes insists that there are no pending changes, even though you know there are. You have to use the command line to get out of this situation. (Or maybe re-start Visual Studio - but that can be a pain). LizardTF has never done this (yet) and can resolve this problem with Team Explorer encounters it.

The comparison tool has more view options, than the Microsoft one, offering side-by-side and inline, and differences only with optional context - good for quick reviews. It also allows you to reload either side from either any file system file, or any repository item. Once a repository item is loaded you can easily reload to any revision with out closing and re-opening. This makes searching for where changes occurred much simpler.



The merge tool is, in my opinion a lot clearer than Microsoft's tool, it also offers side-by-side-by-side view, side-by-side with output beneath, and side-by-side with output in a separate window for maximum on-screen visibility. All merges can be undone/redone, all conflicts resolved / reset and resolved again, all with distinctive mark-up and tool tip text to show the state of any line.

Lizard TF also offers what Tortoise calls blame, and Microsoft have called Annotate in their 2008 release of Team Explorer, this shows the originating changeset for every line in a file, which can be very useful when you find a line that seems insane, but also necessary.

LizardTF History screen shows changeset details in second pane, so you don't have to launch a seperate model form to see what is in a changeset, you can then immediately navigate to the history of any item included in changeset, navigate back again, or up a folder level. This makes history browsing very quick and fluid.

The integration into Visual Studio makes Team Explorer very annoying when it comes to model forms - you can't enter a WorkItem, or view histories once you've opened a check-in dialog, for example. LizardTF uses very few modal forms.

Team Explorer does have better progress bars, but I think they might have better access to progress events than are offered by the public API, because I've looked and can't find the message events! (I will keep looking...)

There are screen shots throughout this blog, but I need to get a decent up to date set.

That's all for now. In the future we will have baseless merging, rollbacks and more...

Already written for the next release: branching, shelving, unshelving, some performance optimisations (for big Gets and Explorer browsing) and merging changes into unrelated targets.

Sunday, 2 March 2008

They are copying me (pre-emptively)

I've just noticed that the VS2008 version of Team Explorer has a blame (annotate) option, and a folder diff tool that allows you to compare folders from repo/version or disk.

Just for the record, Microsoft copied Lizard, even if their code was written some time before mine. And I still like mine the most!

Bah!

To call or not to call, a ramble...

The TFS server, that is. LizardTF is a conceptual clone of TortoiseSVN, and while Microsoft undoubtedly learned much from SVN, there are some major technical and conceptual differences between TFS and SVN, the biggest being how much and where check out information is held. The SVN server was designed for the world of open source distributed development. The server holds no information about any clients or what they might be up to. Clients can get latest source, disconnect, work away using a local working base copy, and then res-sync to the server later. Not TFS. The TFS server knows about every client, getting source is not the same as checking it out, no metadata is held on the client (well, there is a cache, but conceptually this is true), to start any editing or any difference checking needs a server call.

I've been making Lizard less chatty with the server when Explorer browsing to speed things up a bit. Lizard *does* take local metadata similar to SVN clients, it can work out if and how a file has changed without contacting the server. I can (and do) avoid server calls in a lot of instances but there is a downside. Only the server can know if another client has changed a file and checked it in. I like that LizardTF shows out-of-date files without being specifically asked to, but it requires a call to the server every time a folder is browsed in explorer. To be honest both on my home setup (running TFS on a virtual PC on the one box) and at work (big TFS server in a rack somewhere) things seem pretty brisk, and it's not really a big worry, but I would like to use LizardTF with Codeplex projects and I haven't actually tried it yet. There are several reasons. 1) Although I mean to make Lizard multi-server, I haven't done so yet. 2) The Lizard source code lives in a TFS server on a virtual PC, this is also what I test against (probably not the best idea, but there you go), and 3) I don't won't to get too distracted. The project has already grown a lot with the diff and merge tools and I want to complete the functionality as-is first.

I guess when I make Lizard multi-server I'll allow users to choose connection level for each registered server. I would also like to provide a full 'off-line' mode with re-sync but I think that will be somewhere down the line.

I do think TFS version control is good and I hate source-safe with a passion, but I miss the elegant simplicity of SVN.

Tuesday, 26 February 2008

You wait all month for a release, then three come along at once

Oh poop.

Playing with the new release today I discovered the exe/dll version differ was keeping locks on any .net assemblies as it loaded the whole assembly, rather than just the name. Which is rather unacceptable so there is a new 0.2.2 release on Codeplex now. While I was there I also made it so you could drop and drag other dll/exes onto the form and it would show the version info for those.

Then I discovered that when I added the Work Items list to the History Browser I inadvertently detached the click, double click and right click events from the details list, so I've fixed that now too.

Hopefully that's it until merging, branching and renaming conflict resolution is complete.

Monday, 25 February 2008

You wait all month for a release, then two come along at once

I've just posted LizardTF.alpha.v.0.2.1

I've been using LizardTF at work where we have a big repository with lots going on, and I like to have a non-Visual Studio client - it's why I started this in the first place, and I noticed some annoying issues.

  1. Newly added repository items not yet in the local workspace weren't showing in the review/get list
  2. Conflict resolver crashed if a merge or conflict was on the last line
  3. Context menu 'Compare with...' wasn't using the exe/dll display when it should
  4. History browser didn't show associated Work Items for a change set.
  5. History button on property page was broken.

All these are fixed in 0.2.1.

I also noticed that the 'Use all mine' option in the resolver used all the local lines to resolve conflicts, but it left all the non-conflicting merges in place. I don't think this is right, but I can't fix it today.

Next up is resolving name changes and moves, and the auto-resolve options. Then, hopefully, independent merge in to a third file/location and changeset rollback.

Sunday, 24 February 2008

New Release LizardTF.alpha.v.0.2.0

Yep, that's right, I've finally published a release, here is some of what is in it:

Conflict resolution:

One spanking new merge/conflict resolution tool! Colours are a little toned down a bit since the prototype (below), but it took a while to get from prototype to production code, mainly due to the number of scenarios involved. I wanted the merge output window to show exactly what would be written out/saved, so where lines are removed these are shown only in the margins. The lines above and below the 'missing' section right-click to give 'redo above' or 'undo-merge below' options. Some lines can have both above and below options which can be for undo/redo merges or undo resolution.

Hopefully the system should be fairly intuitive to use and should be much better than the MS DiffMerge tool.

Options include:

Two diff views, diff view and merge/conflict view.
Diff view shows differences base:server (theirs) on the left and base:local (yours) on the right. Blank lines are used to keep the files in sync. In merge/conflict view all conflict areas are highlighted and all changes base:server that can/will be merged are shown merged into the right hand base:local view. Clicking between them and looking at the results is proably the best way to get a feel for this.

Context lines
Quite often there are long sections of code with no changes/conflicts, you can choose not to see them by choosing how many context lines around changes/conflicts to show

Three Layouts
Arrange the two diff views and output windows all side-by-side (good for wide screen monitors), diffs together, output beneath (like the MS DiffMerge tool), or my favorite, diffs side-by-side and output in a different window (great for twin monitor set ups)

Also :

Help Text
Don't know what all the colours mean? Hover over any coloured section and help text will explain what the section is showing.

Also new in this release a new history browser:
History on the left, full details of check-in on the right. Clink file on right to see history of that, use back button to return, or up-level button for folder history. Right click one or two versions for diff options.

Fed up with the 'Binary Files Differ' response when diffing dlls? Not with LizardTF:
(test data a little suspect, but trying to diff dlls or exes will give this screen to compare version stamps, etc)

Text diffs are like this:
(note line differnces shown beneath)
or:
(inline diff, only three context lines).

Note the left and right folder/repo/version browse buttons. once a diff is in view you can reload either side from any file or repository item. If a repository item is loaded you can choose any historic version.

All version picker combo boxes have a 'browse' item, when selected this launches the history browser (shown above) to help you pick the right version.

Also from the explorer context menu:
Blame (anotate) shows originating changeset id/author for all lines in a source file.
Check out/lock, allows locking
Lizard Review, shows all conflicts, out-of-dates, pending changes and other checkouts for selected path
Get specific version - version combo for 'Get' option now works!

Create Workspace option asks if you want to get latest for new workspace and scans/builds Lizard meta data.

Soon I am going to have to write a manual.

Sunday, 17 February 2008

Nearly there(ish)

It's been a while but things have moved on. I keep meaning to post a new new release, then I spot some obvious issues or omissions, and put things off again.

I have now fixed the folder scanning to get the folder statuses right, which was bugging me
You can now set the lock level on (or after) check out.
There is a 'review' option which shows all conflicts, out of dates and pending changes by default.
All review options support viewing of explorer file properties from review screen
Context menu Diffs are all in place for review and history screens for working base, server latest and previous versions (all other versions can be browsed to/selected from diff window).
All version combo's support version browsing through bespoke history/detail screen.
LizardTF has it's own history display, which has integrated history panel. This also supports browsing.

The conflict resolver is nearly finished! supports resolving conflicts, undo-ing non-conflicted merges, redo-ing any merges that you have undone. Just undo-ing resolutions left to do! Hoorah!

This turned out to be rather fiddly with the undo/redo options, mainly when an operation removes all lines, and you have to mark above and below to show that something happened that can be undone, and some lines can have one operation done above, and a different one below.

To late tonight but a new release will be posted this week.