Microsoft MVP성태의 닷넷 이야기
Team Foundation Server: 37. TFS 2010의 소스 서버 수작업 구성 [링크 복사], [링크+제목 복사],
조회: 19239
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일
 
(연관된 글이 2개 있습니다.)
TFS 2010의 소스 서버 수작업 구성


예전 글에서, 소스 서버를 TFS 2008에 연동하는 방법과 효과를 설명해 드린 적이 있는데요.

TFS Team Build + Source Server = 소스 코드 디버깅
; https://www.sysnet.pe.kr/2/0/600

TFS Team Build + Symbol Server
; https://www.sysnet.pe.kr/2/0/599

Symbol Server 생성
; https://www.sysnet.pe.kr/2/0/323

TFS 2010에서 좋은 소식이 있다면 TFS 2008에 비해 자동화된 구성이 가능합니다.

Enabling Symbol and Source Server Support in TFS Build 2010 Beta 1
; http://blogs.msdn.com/b/jimlamb/archive/2009/06/15/enabling-symbol-and-source-server-support-in-tfs-build-2010-beta-1.aspx

그런데, 팀 빌드가 아닌 수작업 배치파일(.bat)에서 돌려야 할 필요가 있어서 그때의 TFS 2008 구성을 가지고 배치로 바꿔보았는데요.

ssindex.cmd 실행 부분에서 자꾸만 다음과 같은 오류가 발생합니다.

ssindex -SYSTEM=TFS -SYMBOLS="D:\...\bin" -SOURCE="D:\...\"
--------------------------------------------------------------------------------
ssindex.cmd [STATUS] : Server ini file: C:\Program Files (x86)\Debugging Tools for Windows (x86)\srcsrv\srcsrv.ini
ssindex.cmd [STATUS] : Source root    : D:\...
ssindex.cmd [STATUS] : Symbols root   : D:\...\bin
ssindex.cmd [STATUS] : Control system : TFS
ssindex.cmd [STATUS] : TFS program name: tf.exe
ssindex.cmd [STATUS] : TFS Label      : <N/A>
ssindex.cmd [STATUS] : Old path root  : <N/A>
ssindex.cmd [STATUS] : New path root  : <N/A>
--------------------------------------------------------------------------------

ssindex.cmd [STATUS] : Running... this will take some time...
ssindex.cmd [STATUS] : Server name not returned by tf.exe info for D:\...\.Skipping all files in the working folder.

예전에도 "Server name not returned by tf.exe" 오류를 겪은 적이 있었는데요.

소스 서버 구성, 그 외의 이야기
; https://www.sysnet.pe.kr/2/0/603

위의 경우에는 ActivePerl 설치 과정 중에 PATH가 잘못 잡혀서 발생했던 것에 반해, 이번에는 모든 경로가 정상적으로 잡혀있는데도 그와 같은 오류가 발생했습니다.

휴~~~ 한숨 먼저 짓고. 배워본 적도 없는 Perl 소스 코드를 이렇게 해서 또 뒤집어 보는 군요. ^^;

"C:\Program Files (x86)\Debugging Tools for Windows (x86)\srcsrv" 폴더에 있는 "tfs.pm"을 메모장으로 열어서 다음과 같은 코드를 찾아냈습니다.

$hProc = ExecTFSCmd($self, $SourceRoot, "workfold");

while (<$hProc>)
{

    chomp;
    if (m/Server\s+:\s+(.*)/i)
    {
        $PreferredServer = $1;
    }
}

close($hProc);

# Confirm the results.

if ( defined $PreferredServer )
{
    $Server = $PreferredServer;
}

if ( ! defined $Server )
{
    ::status_message("Server name not returned by $$self{'TFS_CMD'} info for $SourceRoot.".
                        "Skipping all files in the working folder.");
    return;
}

while 문 사이에다가 "print $_;" 코드를 넣어서 살펴보니, 정상적으로 "tf.exe workfold"가 실행되었다는 것과 그 콘솔 출력 내용이 올바르다는 것이 확인되었습니다. 그런데, 왜? $PreferredServer 변수에는 아무런 값이 안 들어오는 것인지...? ^^;

가만히 살펴보다가 음... "m/Server:\s+(.*)/i" 정규 표현식 잘못임을 알게되었습니다. 실제 tf.exe workfold의 출력문은 다음과 같은데,

D:\...>tf workfold
===============================================================================
Workspace : MYPC (TESTDOMAIN\MyUser)
Collection: http://mypc:8080/tfs/defaultcollection
 $/TestSolution: D:\...

아하~~~ TFS 2010부터 Collection이 지원되면서 예전 "Server :" 자리에 "Collection:"이 대체하고 있었기 때문에 정규표현식에서 못 걸러낸 것입니다. (애초부터, 그냥 웹 서비스를 호출했으면 좋았지 않았을까요?)

그래서, 결국 tfs.pm에 들어있는 Perl 코드를 다음과 같이 변경해 주면 TFS 2010에서도 정상적으로 소스 코드 인덱싱이 됩니다.

[TFS 2008 용 tfs.pm 파일 내용]
while (<$hProc>)
{
    chomp;
    if (m/Server\s+:\s+(.*)/i)
    {
        $PreferredServer = $1;
    }
}

==>

[TFS 2010 용 tfs.pm 파일 내용]
while (<$hProc>)
{
    chomp;
    if (m/Collection:\s+(.*)/i)
    {
        $PreferredServer = $1;
    }
}




[이 토픽에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]

[연관 글]






[최초 등록일: ]
[최종 수정일: 6/18/2021]

Creative Commons License
이 저작물은 크리에이티브 커먼즈 코리아 저작자표시-비영리-변경금지 2.0 대한민국 라이센스에 따라 이용하실 수 있습니다.
by SeongTae Jeong, mailto:techsharer at outlook.com

비밀번호

댓글 작성자
 




... 31  32  33  34  [35]  36  37  38  39  40  41  42  43  44  45  ...
NoWriterDateCnt.TitleFile(s)
12781정성태8/14/20219364오류 유형: 755. 파이썬 - konlpy 사용 시 JVM과 jpype1 관련 오류
12780정성태8/13/20217721.NET Framework: 1088. C# - 버스 노선 및 위치 정보 조회 API 사용을 위한 기초 라이브러리 [2]
12779정성태8/13/20219634개발 환경 구성: 596. 공공 데이터 포털에서 버스 노선 및 위치 정보 조회 API 사용법
12778정성태8/12/20216761오류 유형: 755. PyCharm - "Manage Repositories"의 목록이 나오지 않는 문제
12777정성태8/12/20218346오류 유형: 754. Visual Studio - Input or output cannot be redirected because the specified file is invalid.
12776정성태8/12/20217613오류 유형: 753. gunicorn과 uwsgi 함께 사용 시 ERR_CONNECTION_REFUSED
12775정성태8/12/202119557스크립트: 22. 파이썬 - 윈도우 환경에서 개발한 Django 앱을 WSL 환경의 gunicorn을 이용해 실행
12774정성태8/11/20219323.NET Framework: 1087. C# - Collection 개체의 다중 스레드 접근 시 "Operations that change non-concurrent collections must have exclusive access" 예외 발생
12773정성태8/11/20218543개발 환경 구성: 595. PyCharm - WSL과 연동해 Django App을 윈도우에서 리눅스 대상으로 개발
12772정성태8/11/20219990스크립트: 21. 파이썬 - 윈도우 환경에서 개발한 Django 앱을 WSL 환경의 uwsgi를 이용해 실행 [1]
12771정성태8/11/20218389Windows: 196. "Microsoft Windows Subsystem for Linux Background Host" / "Vmmem"을 종료하는 방법
12770정성태8/11/20219279.NET Framework: 1086. C# - Windows Forms 응용 프로그램의 자식 컨트롤 부하파일 다운로드1
12769정성태8/11/20216984오류 유형: 752. Python - ImportError: No module named pip._internal.cli.main 두 번째 이야기
12768정성태8/10/20218155.NET Framework: 1085. .NET 6에 포함된 신규 BCL API [1]파일 다운로드1
12767정성태8/10/20219254오류 유형: 752. Python - ImportError: No module named pip._internal.cli.main
12766정성태8/9/20217646Java: 32. closing inbound before receiving peer's close_notify
12765정성태8/9/20217004Java: 31. Cannot load JDBC driver class 'org.mysql.jdbc.Driver'
12764정성태8/9/202145460Java: 30. XML document from ServletContext resource [/WEB-INF/applicationContext.xml] is invalid
12763정성태8/9/20218519Java: 29. java.lang.NullPointerException - com.mysql.jdbc.ConnectionImpl.getServerCharset
12762정성태8/8/202112137Java: 28. IntelliJ - Unable to open debugger port 오류
12761정성태8/8/20219210Java: 27. IntelliJ - java: package javax.inject does not exist [2]
12760정성태8/8/20216517개발 환경 구성: 594. 전용 "Command Prompt for ..." 단축 아이콘 만들기
12759정성태8/8/20219768Java: 26. IntelliJ + Spring Framework + 새로운 Controller 추가 [2]파일 다운로드1
12758정성태8/7/20219107오류 유형: 751. Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)
12757정성태8/7/20219798Java: 25. IntelliJ + Spring Framework 프로젝트 생성
12756정성태8/6/20218526.NET Framework: 1084. C# - .NET Core Web API 단위 테스트 방법 [1]파일 다운로드1
... 31  32  33  34  [35]  36  37  38  39  40  41  42  43  44  45  ...