내가 Windows에서 오전, 나는 오히려 :) 쉘, 파워 쉘 또는 픽셀보다, PERL에서 똑같은 일을하고 약간의 스크립트를 만들었습니다 실제로 것을
#*******************************************************************************
# Module: delete_empty_changelist.pl
# Purpose: A script to delete empty changelist
#
@list = `p4 changes -s submitted`;
foreach $chg (@list)
{
$chgnbr = (split /\s+/, $chg)[1];
print `p4 change -d -f $chgnbr`;
}
exit 0;
주 모든 경우에 매우 영리한 스크립트는 아닙니다. 제출 된 모든 변경 목록을 절대 삭제하려고하며, 파일이 연결되어 있으면 오류가 발생하므로 perforce가이를 수행 할 수 없습니다.
스크립트의 결과를 로그로 보내고 구문 분석하여 관련 행만 강조 표시해야한다고 가정합니다.
과 유사한 출력을 생성합니다 스크립트를 실행 :
Change 857 has 1 files associated with it and can't be deleted.
Change 856 has 1 fixes associated with it and can't be deleted.
Change 855 has 1 fixes associated with it and can't be deleted.
Change 854 deleted.
Change 853 has 1 fixes associated with it and can't be deleted.
Change 852 has 8 files associated with it and can't be deleted.
Change 851 has 1 files associated with it and can't be deleted.
Change 850 has 2 files associated with it and can't be deleted.
Change 849 has 2 files associated with it and can't be deleted.
Change 846 deleted.
Change 845 has 2 files associated with it and can't be deleted.
건배,
토마스
자신의 대답을 수락해야합니다 (질문에 답변으로 표시). :-) – PhiLho
내 Windows PC에서 제안 된 답변을 사용할 수 없어서 동일한 작업을 수행 할 작은 PERL 스크립트를 작성했습니다. :-) –