[Anthill] VSS help needed

Brian Dellisanti bdd at urbancode.com
Mon Nov 21 15:55:17 CST 2005


Marcio,

I'm afraid I can't find any spot in the pagelet with a component that 
isn't being quoted. Do you have a command string generated by Anthill OS 
you can send me or can you point me to the spot in the pagelet that 
needs quoting?

Regards,
Brian

Marcio Marchini wrote:

> Hi Brian,
>
>     I had already applied a similar patch here (quote before the cd, 
> and end quote in all other pagelets) but I ran into another problem. 
> If the path to the UNC drive where VSS is had a space, it would also 
> fail.
>
>     Something like this: \\foo\bar\prj 2.0\
>
>     The equivalent test case is:
>
> 1) go to c:\temp
> 2) run this:   cmd /x/c cd "\Documents and Settings" && dir
> the contents of "\Documents and Settings" is *not* listed
> instead, you get c:\temp
>
>     You need the quotes around the whole thing and also individual 
> paths which could also have spaces:
>
>
> 1) go to c:\temp
> 2) run this:   cmd /x/c "cd "\Documents and Settings" && dir"
> the contents of "\Documents and Settings" *is* listed
>
>
>     Anyway, I got the VSS admin folks here to rename their dir to 
> avoid the space for now. This means I can no longer test your patch 
> for the space problem :-(
>
>     So... I am not sure it is ok to commit the fix. As I said, the 
> space exposed a problem with the patch. What is even more strange... 
> after they removed the space, I was able to run even without the patch.
>
>     Strange and confusing. I am sorry I no longer have my original 
> test case (dir with space) :-(  Can you by any chance try this scenario?
>
> marcio
>
>
> Brian Dellisanti wrote:
>
>> Marcio,
>>
>> I checked and I do believe it's a bug in Anthill OS. I put some 
>> updated pagelets you download at 
>> http://www.urbancode.com/download/anthill_os/vss.zip that contain the 
>> quotes as you describe. I believe this will also resolve the problem 
>> of SSDIR not getting picked up. You need to replace the contents of 
>> your conf/profiles/Win32/win_vss directory with the contents of the 
>> zip and restart your servlet container. Please let me know if that 
>> works for you and I'll resolve the issue and merge the fix.
>>
>> Regards,
>> Brian
>>
>> Marcio Marchini wrote:
>>
>>>
>>>     Ok, I think it is an Anthill bug.
>>>
>>>     Try this:
>>>
>>> 1) go to c:\temp
>>> 2) run this:   cmd /x/c cd C:\windows && dir
>>> the contents of c:\windows is *not* listed
>>> instead, you get c:\temp
>>>
>>>
>>>     Now try this:
>>>
>>> 1) go to c:\temp
>>> 2) cmd /x/c "cd C:\windows && dir"
>>> the contents of c:\windows *is* listed
>>>
>>>
>>>     Fair enough, http://www.ss64.com/nt/cmd.html says:
>>>
>>>
>>> If /C or /K is specified, then the remainder of the command line is
>>> processed as an immediate command in the new shell. Multiple commands
>>> separated by the command separator '&&' are accepted if surrounded 
>>> by quotes.
>>>
>>>
>>>
>>>     But if you look at the Anthill pagelet for VSS 
>>> (getCommandInit_pgl.java):
>>>
>>> }    // line 35
>>>     out.write("cmd /x/c cd /d \"");    // line 35
>>>     out.write(String.valueOf(localProjectDir));    // line 36
>>>     out.write("\"");    // line 36
>>>     out.write(String.valueOf(ssDirStr));    // line 36
>>>     out.write(" && \"");    // line 36
>>>     out.write(String.valueOf(ssExeStr));    // line 36
>>>     out.write("\" cp \"$/");    // line 36
>>>     out.write(String.valueOf(module));    // line 36
>>>     out.write("\"");    // line 36
>>>     out.write(String.valueOf(userNamePassStr));    // line 36
>>>     out.write(" &&");    // line 36
>>>     out.write("\n");    // line 36
>>> }
>>>
>>>
>>>
>>>
>>>     Note how there's no \"  before "cd /d...", and no corresponding 
>>> close double quotes at the very end.
>>>
>>>
>>>     Can an Anthill developer confirm this please?
>>>
>>>     Thanks,
>>>
>>> marcio
>>>
>>>
>>> Marcio Marchini wrote:
>>>
>>>>
>>>> Correction: if I run from the cmd-line, from c:\temp:
>>>>
>>>> cmd /x/c cd /d 
>>>> C:\java\anthill-1.8.0.264\work\ContinuousBuildExample && 
>>>> v:\win32\ss cp $/ContinuousBuildExample -Ybuilds && v:\win32\ss get 
>>>> * -Ybuilds -R -I-Y -O-
>>>>
>>>>
>>>> The checkout does happen, and into the current dir, c:\temp, and 
>>>> not into the "C:\java\anthill-1.8.0.264\work\ContinuousBuildExample"
>>>>
>>>>
>>>> Any suggestions? It looks like these commands are being executed in 
>>>> separate contexts and therefore the "cd /d 
>>>> C:\java\anthill-1.8.0.264\work\ContinuousBuildExample" does not 
>>>> apply later on.
>>>>
>>>> I suspect this may be the same problem that the Tomcat service is 
>>>> having. It is probably failing because ContinuousBuildExample  
>>>> probably does not exist as a subdir wherever "." is when the 
>>>> service is running.
>>>>
>>>>
>>>>     Suggestions? Thanks,
>>>>
>>>>
>>>> marcio
>>>>
>>>> Marcio Marchini wrote:
>>>>
>>>>>
>>>>>     Thanks for the tip. Now the error changed.
>>>>>
>>>>> 1)In the Tomcat log:
>>>>> -------------------
>>>>> The system cannot find the drive specified.
>>>>>
>>>>>
>>>>> 2)If I run from the command-line:
>>>>> -------------------------------
>>>>> C:\>cmd /x/c cd /d 
>>>>> C:\java\anthill-1.8.0.264\work\ContinuousBuildExample && v:\w
>>>>> in32\ss cp $/ContinuousBuildExample -Ybuilds && v:\win32\ss get * 
>>>>> -Ybuilds -R -I
>>>>> -Y -O-
>>>>> Current project is $/ContinuousBuildExample
>>>>>
>>>>> But nothing under 
>>>>> C:\java\anthill-1.8.0.264\work\ContinuousBuildExample (empty dir).
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>     So, 2 separate problems.
>>>>>
>>>>>
>>>>> In #1 I thought that perhaps v:\ was not mapped for the Tomcat 
>>>>> service (I run as a service). I changed the properties of the 
>>>>> service to run under my user, which has the v:\ drive mapped, but 
>>>>> I still get the problem above. Is it possible that mapped drives 
>>>>> are not mounted for processes launched as services even if using 
>>>>> my login? Maybe they are forked before the network drive is 
>>>>> mapped? I tried using the \\foo\bar notation but that one also 
>>>>> failed with the same error, so I am puzzled. (Note: the \\foo\bar 
>>>>> path has spaces, so I was suspecting that the space might be the 
>>>>> cause of the problem, so I tried mapping v:\ to it)
>>>>>
>>>>> In #2 the thing seems to work but no checkout happens. I suppose I 
>>>>> should have got some files? I never used VSS, so please bare with 
>>>>> me. My friend tells me he added the code to the VSS repository as 
>>>>> $/ContinuousBuildExample... is there a way for me to double check? 
>>>>> Just to make sure he did not make a mistake.
>>>>>
>>>>>     Thanks,
>>>>>
>>>>> marcio
>>>>>
>>>>>
>>>>> joel.wiens at thomson.com wrote:
>>>>>
>>>>>> Marcio,
>>>>>> I had the same problem.  I was able to resolve it by setting a SSDIR
>>>>>> environment variable on the server which points to the 
>>>>>> srcsafe.ini file.
>>>>>> Then when you are configuring the VSS Repository Adapter for your
>>>>>> Anthill project, leave the srcsafe.ini option blank.
>>>>>>
>>>>>> Joel
>>>>>>
>>>>>> -----Original Message-----
>>>>>> From: anthill-bounces at lists.urbancode.com
>>>>>> [mailto:anthill-bounces at lists.urbancode.com] On Behalf Of Marcio
>>>>>> Marchini
>>>>>> Sent: Friday, November 18, 2005 12:42 PM
>>>>>> To: anthill at lists.urbancode.com
>>>>>> Subject: [Anthill] VSS help needed
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>     AnthillOS is not able to do teh VSS checkout. I am not familiar
>>>>>> with VSS, but my friend is. On the other hand, he is not familiar 
>>>>>> with
>>>>>> AnthillOS and I am.
>>>>>>
>>>>>>     I checked teh Tomcat logs to see what the VSS Pagelet was
>>>>>> running, and tried it myself:
>>>>>>
>>>>>> C:\>cmd /x/c cd /d 
>>>>>> C:\java\anthill-1.8.0.264\work\ContinuousBuildExample
>>>>>> && set
>>>>>> SSDIR=v:\ && v:\win32\ss cp $/ContinuousBuildExample -Ybuilds &&
>>>>>> v:\win32\ss get
>>>>>>   * -Ybuilds -R -I-Y -O-
>>>>>> No VSS database (srcsafe.ini) found.  Use the SSDIR environment 
>>>>>> variable
>>>>>> or run netsetup.
>>>>>>
>>>>>>
>>>>>>     But the file does exist:
>>>>>>
>>>>>> C:\>dir v:\srcsafe.ini
>>>>>>   Volume in drive V is Data Files
>>>>>>   Volume Serial Number is 90F0-F942
>>>>>>
>>>>>>   Directory of v:\
>>>>>>
>>>>>> 16/11/2005  03:50 PM             1,225 srcsafe.ini
>>>>>>
>>>>>>
>>>>>>
>>>>>>     What's going on? Any tips?
>>>>>>
>>>>>>     Thanks,
>>>>>>
>>>>>> marcio
>>>>>>
>>>>>> _______________________________________________
>>>>>> Anthill mailing list
>>>>>> Anthill at lists.urbancode.com
>>>>>> http://lists.urbancode.com/mailman/listinfo/anthill
>>>>>> _______________________________________________
>>>>>> Anthill mailing list
>>>>>> Anthill at lists.urbancode.com
>>>>>> http://lists.urbancode.com/mailman/listinfo/anthill
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>> _______________________________________________
>>>> Anthill mailing list
>>>> Anthill at lists.urbancode.com
>>>> http://lists.urbancode.com/mailman/listinfo/anthill
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Anthill mailing list
>>> Anthill at lists.urbancode.com
>>> http://lists.urbancode.com/mailman/listinfo/anthill
>>>
>> _______________________________________________
>> Anthill mailing list
>> Anthill at lists.urbancode.com
>> http://lists.urbancode.com/mailman/listinfo/anthill
>
>
> _______________________________________________
> Anthill mailing list
> Anthill at lists.urbancode.com
> http://lists.urbancode.com/mailman/listinfo/anthill
>



More information about the Anthill mailing list