I will do anything

To get the information that I need to make this Source Server work.

So in the srcsrv.doc file that comes with the debugging package it says:

Anyone interested in using Source Server with CVS should send email to windbgfb@microsoft.com.

So I did.

Here’s the response I just got:

Good things come to those that wait – and you will not have to wait long. The next debugger release will have cvs source indexing scripts in it. You will probably need to tweak them since cvs installations seem to differ greatly and I was unable to come up with something that was truly general-purpose.

So watch our web site for the release. It will be out soon.

.pat styles

Well that’s interesting because in my sdk I have a CVS.pm and a cvsindex.cmd which is what you need to make this stuff work with CVS. So does Pat know that? Is there a better version on the way?

What I don’t understand right this second is two things:
1. How does the actual indexing of PDB files happen? According to my main source of information (becoming as dog-eared as a web page can get):

When you run SSINDEX.CMD, after it validates parameters it asks the version control system for the list of all source files (and their version numbers) in the target project and below. PDB files are then searched for recursively. For each PDB file found, the Perl code calls SRCTOOL.EXE to extract the list of source files. The code looks through the source files in the PDB file and sees if they match any of the files stored earlier from the version control search: if a match is found, the code saves that file info.

Does this mean that I should be calling SSINDEX.CMD and not CVSINDEX.CMD? Does this look through all folders in the named path? When I ran it yesterday I did several variations but to no apparent success.

and…I’ve forgotten the second thing. It will come to me.

My first patch, a true story

Well. I am jazzed up while I sit in BTB right now because I MADE A PATCH!

Yessir. The lab for today’s class asked us to try and modify our browsers so that opening a new tab makes it appear to the right of the current tab, instead of the way it currently opens the new tab at the far right end of all tabs.

We all jumped on to MXR and … it froze. So for a bit, I stared at the screen and wondered – “How hard is this going to be?”.

Well, not too bad actually. I searched for “New Tab” and found /browser/base/content/tabbrowser.xml which has a comment:

// We’re adding a new tab here.

Looks like I’m in the right place.

Turns out tabbrowser.xml is the best place to go because that’s where my changes will be made and it also happens to be where all the methods regarding tabs are located.

Now I’m staring at some javascript. Immediate guilt sets in for not being more competent in this language. When did we take javascript? Back in third term. It’s now buried beneath a tiny bit of perl, a pinch of php and attempts at ruby.

loadOneTab() is called when a new tab is added, loadOneTab() calls on addTab(). These are all in the same file. I’m focusing on addTab(). This is my target for adding some lines.

addTab() creates a tab object with the variable name t and then appendChild(t) to mTabContainer. Let’s look at mTabContainer…

What do you know – it has a method called moveTabTo(). Cool, that’s what I want to do. I want to moveTabTo() the index next to the one that’s calling the addTab().

See tabPatch to get the rest of the story I’ve got to go do a victory lap.

Source Indexing – setting up for CVS

Included with WinDBG’s debugging tools is an sdk that has some scripts to use for making a Source Server.

From what I have gathered so far, I needed to configure the srcsrv.ini file to point to my CVS repository – check, i pointed it to MYSERVER=:pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot

Then I ran ssindex.cmd –server=cvs –source=c:source –symbols=c:outputdir with the appropriate locations.

First error:
ssindex.cmd [ERROR ] : A source control system must be specified using either the
"-SYSTEM=" option or by defining SRCSRV_SYSTEM in your environment.

Okay, so I realized that I should have been calling cvsindex.cmd NOT ssindex.cmd. Re-do the call…

Second error:
ssindex.cmd [ERROR ] CVS: CVS_LABEL or CVS_DATE not defined. Can't continue.

Gotta love that “can’t continue”, how dramatic. I remembered reading about the Label and Date setting when looking at the documentation for cvsindex.cmd -?? and thanks to Dave for noticing that it says “OR” not “AND” – so I set the CVS_DATE to today’s date and go for third.

Third results:
--------------------------------------------------------------------------------
ssindex.cmd [STATUS] : Server ini file: C:Program FilesDebugging Tools for Windowssdksrcsrvsrcsrv.ini
ssindex.cmd [STATUS] : Source root : c:ffmozilla
ssindex.cmd [STATUS] : Symbols root : c:ffmozillaobjdirdistcrashreporter-symbols2007092823
ssindex.cmd [STATUS] : Control system : CVS
ssindex.cmd [STATUS] : CVS Root : :pserver:anonymous@cvs-mirror.mozilla.org:/cvsroot
ssindex.cmd [STATUS] : CVS program name: cvs.exe
ssindex.cmd [STATUS] : CVS Label :
ssindex.cmd [STATUS] : CVS Date : 10/09/07
ssindex.cmd [STATUS] : Old path root :
ssindex.cmd [STATUS] : New path root :
--------------------------------------------------------------------------------
ssindex.cmd [STATUS] : Running... this will take some time...

And it did take time…but after all was said and done – nothing seems to be indexed. Minor success anyway, I learned how to run the indexing command.

Back to the drawing board.

Thanks to everyone on #seneca who reassured me that I wouldn’t break the CVS repository by messing around with this.