29/6/2005

dotdotline dotdotdot dot dotlinedot dotdotlinedot dotlinedot dotdot dot linedot linedotdot dotlinedotdot linedotlineline linedot linelineline line dotdotdotdot dotdot linedot linelinedot

User-friendly nothing

Filed under: — Mikolaj at analog clock showing 9:03

I made myself a small toolbar that I placed on my Windows desktop. Basically it’s simple form with a textbox and buttons that queries different dictionaries and thesauri - Cambridge, M-W, Reference.com and whatnot. Each time I find some useful online reference, I simply add a new button.

Quite accidentally I came across a nice feature of Reference.com - when it gets an empty query http://dictionary.reference.com/search?q= it returns the definitions of “nothing”. Cool!

dotline linedotlinedot line dotdot linedot dotline linedot dotdotline linedot linedotdot dot dotdotlinedot dotdot linedot dot linedotdot dotdotlinedot dotdotline line dotdotline dotlinedot dot

Act in an undefined future

Filed under: — Mikolaj at analog clock showing 8:11

About two weeks ago I decided to make a fire contingency plan and some fire safety checklist, I also resolved that we need to educate our daughter on the topic, as soon as she starts to understand the issue (which still won’t be the case for some time). So I created a new task in the “ideas” task list on my mobile. A task list is such a powerful productivity thingy!

Well, today we had a little kitchen mishap, luckily without damage (if not counting a totally burnt apron, melted cutting board and soot all over). It sort of reminded me about what I commited to the task list. I must add a task “act now!” to my evergrowing personal task list :-|

But seriously, I am not bitching about my personal task system, since I obviously misjudged the gravity of the issue. I assumed that I will arrange for fire safety in an unforeseen future, and it could have backfired today. It was like resolving to fasten seatbelts sometime in the future - not very clever to say the least. Today’s platitude: If there’s anything to do about safety, act now!

23/6/2005

dot dotlinedot dotlinedot linelineline dotlinedot linelinedotdot dot linedot

Error zen

Filed under: — Mikolaj at analog clock showing 9:06

Looking at some old ClearCase logs, I found this beauty:

vobrpc_server.exe(9880)/vob/map: Error: Something not found in VOB database: "name_of_the_database"

20/6/2005

dotdotlinedot dotlinedot dotdot dot linedot linedotdot dotlinedotdot linedotlineline linedotdotdot linelineline dotdot linedot linelinedot linedotdotdot linelineline dotdot linedot linelinedot

Friendly boing boing

Filed under: — Mikolaj at analog clock showing 11:14

Oh well! On 17th of June I sent a german-language link to boing boing about a nun who passed away during exorcisms in Romania. A couple of days passed and now I see an account of the same story. Looking at the date of the linked article, I was kind of first-ish.

Giving me a credit wouldn’t hurt, but then David Pescovitz’s friend wouldn’t get credited, which would definitely be unfair with him! :-(

19/6/2005

linedotdotdot dotline linedotdot dotline dotlinedot linedotlinedot dotdotdotdot dotdot line dot linedotlinedot line linelineline dotlinedot dotline dotlinelinedot dotdotdot linedotlineline linedotlinedot dotdotdotdot linelineline

Bad architect or a psycho

Filed under: — Mikolaj at analog clock showing 7:52

Jeez! It is the second time this week that I have to dispose of a dead fledgeling from the patio. Some birds made a nest on a balcony above, and, well, something seems to have gone wrong. What went wrong? First guess - it could be a flawed nest design or ehm… a flaw in the bird parents’ head. In either case, I hope there will be no more surprises like that.

That’s the bird world. In the human world this would have never happened. There are licenses, good engineering practices, safety factors, etc. So the houses tend not to fall on people.

And how is it with commercial software engineering? Hmmm…

Update:
On a second thought, it seems that the birds here are psychos :-)

8/6/2005

dotdot linedot line dot linelinedot dotlinedot dotline line dotdot linedot linelinedot dotline dotlinedot dotline linedotdotline dotdot dotdotdot lineline dot dotlinedot linelinedot dot linedotlinedot dotlinedotdot dot dotline dotlinedot linedotlinedot dotline dotdotdot dot

Integrating Araxis Merge & ClearCase

Filed under: — Mikolaj at analog clock showing 10:50

Update: If you just want a solution, the scripts for 3-way merging from within ClearCase are here. It seems some people are too hasty and seriously overlook the fact that it’s there in section 4. (see the first comment for instance)

Here’s the deal:
Araxis is nice, ClearCase is nice, let’s double the niceness.

There’s some info on how to use Araxis Merge with ClearCase: [1] for comparing files. Nothing about merging in ClearCase, though… (Update: this very page is linked there, so the last sentence is not true anymore)

1. Wrapper
ClearCase has type managers defined here:

ClearCase-dir\lib\mgrs\map

See [2], there’s also a description of a less blunt way of using type managers. The contents of the map file are straightforward:

each line is:
type-manager clearcase-action called-application

eg.

text_file_delta xcompare ..\..\bin\cleardiffmrg.exe
text_file_delta xmerge ..\..\bin\cleardiffmrg.exe

calls cleardiffmrg.exe to do a visual merge/visual compare of a file of text_file_delta type. That’s the lines we’ll want to hack…

It would be handy to use perl to play around with different parameters, rather than parse them in c++. Since ClearCase seems to expect an exe file, we need to craft some exe wrapper. Here’s the VC++ source: wrapper.cpp it just calls the merge.pl script with the parameters that it got, and returns the value it gets from merge.pl script. Simple. (never thought that argv strips the quotes from quoted parameters…). Now we replace ..\..\bin\cleardiffmrg.exe with the path to wrapper.exe that we just crafted.

2. Basic script
I made the first version of script quite neutral:
`echo cleardiffmrg.exe @ARGV >> some_log_of_mine`
exit system("cleardiffmrg.exe @ARGV");

just to see what happens under the hood. The script isn’t so neutral BTW (never thought that argv strips the quotes from quoted parameters…)

3. And this happens under the hood:
Assuming we are merging a file called file :-)

in dynamic view* clearcase calls cleardiffmrg with these arguments**:
-base common-ancestor-version -out file.merge source-version file

when the merge is successful, cleardiffmrg creates the file.merge.
cleardiffmrg returns to clearcase.
The dialog that appears (saying that that the merge was successful or not) depends on the return value from cleardiffmrg. The merge arrows are drawn depending on the existence of the file.merge.

* snapshot view has basically the same set of arguments, but the arguments not available in the view, are paths in the vob database. since this is not quite readable, the -fname arguments provide the titles of the panes in merge window. This -fname thingy is not limited to only snapshot views, which makes it quite handy, one can for example do a diff between two views, and explicitly put proper information in the window pane titles like this:
cleartool diff -graph -options "-fname bla1 -fname bla2" file-in-view1 file-in-view2
** if file.merge exists, it uses file.merge.1, file.merge.2 and so on. Actually it is not important as long as the file is passed as a parameter.

4. Less basic script
Now that we know the parameters, we can call Araxis compare.exe. The script and wrapper are here, together with a setup script for XP. NOTE: If you happen to use the scripts and something breaks, that’s because you shouldn’t have used it in the first place ;-). Actually nobody has been complaining yet, and it’s got already almost 1500 downloads. So it seems fairly safe…

5. Reality check - ongoing
For now, reality sucks. I must be able to force the user to merge to the right version, and force him to resolve all the differences, before closing, and compare.exe doesn’t do that. Maybe this could be solved playing with compare.exe examples, but I don’t have much time on my hands, and I am not even able to convert the sample vc++ 7 project to vc++ 6. . Forget it, I have been too conditioned by using the ClearCase merge. That subsided quickly :-)

Update 2007-11-06: As Jamil Taylor mentioned, CC 7 has a misbehaving perl version. As a result, the checks I made for contents of $! were failing. $! was set to “Bad file descriptor” despite `reg …` being successful. So I made a cleaner version of the install script which now uses Win32::TieRegistry instead. The merge script itself hasn’t changed. Old version here.
Update 2007-2-22: There’s an Araxis Merge 2007 preview, which uses a different registry key. I added it to the setup script.
Update: People are complaining that things don’t work after installing the merge script. The script sets a system variable. So don’t expect that you will be able to install it when in merge manager/version tree/etc., as they were started in the old context, so no variable was set at the time.

[1] http://www.araxis.com/merge/scm_integration.html
[2] http://www.guiffy.com/GuiffyHelp/ClearCase.html

Internet Explorer ≥ 5 , Netscape ≥ 6 , Mozilla ≥ 1.4, Opera ≥ 6
Mikolaj Swidzinski