일부 경로 이름에는 공백이있는 시스템이 있습니다. 그것들은 핵심 코드의 일부이기 때문에 은으로 이름을 바꿀 수 없습니다. 명령 줄 명령을 호출하는 도구에서이를 처리하는 것은 큰 따옴표 세트를 추가하는 것일뿐입니다.xml 인터페이스 매개 변수 전달에서 공백 처리
그러나 Build Forge 어댑터에서 사용하는 XML 코드에서이 문제를 처리 할 방법을 찾지 못했습니다. 어댑터가 다음 명령을 실행해야 할 때 예를 들어
:
cleartool describe "foo bar"@@\main\1
코드는하고 싶은 다음
<match pattern="^(.*?)\@\@(.*?)$">
<run command="cc_describe" params="$1 $2"/>
<command name="cc_describe">
<execute>
pushd cleartool desc [email protected]@$2;
</execute>
</command>
$ 1 = "foo는 바"과 $ 2 가정 = " \ main \ 1 "
첫 번째 매개 변수에 공백이 포함되어 있기 때문에 두 번째 매개 변수는 물론 무시됩니다.
Preparsing Command Set: [pushd cleartool desc [email protected]@$2], using Params: 'foo bar main\1'.
Command Set Parsed To: [pushd cleartool desc "[email protected]@bar"]
내가 호출 명령에 따옴표를 추가하여이 고정 시도 :
<run command="cc_describe" params=""$1" $2"/>
따옴표 명령에 그것을 만들지 만, 변화하지 않는 :
Preparsing Command Set: [pushd cleartool desc [email protected]@$2], using Params: '"foo bar" \main\1'.
Command Set Parsed To: [pushd cleartool desc "[email protected]@bar"]
을 시도를 해결책 : @@을 호출 명령으로 이동하고 수신 명령에서 제거하고 추가 매개 변수를 추가하십시오 (1 공간을 처리 할 수 있도록) :
<run command="cc_describe" params="[email protected]@$2"/>
<command name="cc_describe">
<execute>
pushd cleartool desc $1$2$3;
</execute>
</command>
실행 결과 :
Preparsing Command Set: [pushd cleartool desc [email protected]@$2$3], using Params: 'foo bar \main\1'.
Command Set Parsed To: [pushd cleartool desc "[email protected]@\main\1"]
또, 잘 했어! +1 – VonC