[Anthill] VSS help needed
Marcio Marchini
marcio at bedarra.com
Mon Nov 21 09:36:19 CST 2005
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
More information about the Anthill
mailing list