cvs에서 자동으로 코딩 스타일 수정하려고 합니다.

cho's의 이미지

ssh를 이용하여 cvs에 로그인 하여 사용하고 있습니다.
현재 작업환경이 여럿이 하다 보니 각기 제각각의 코딩스타일입니다. 처음엔 코딩규칙을 정해놓고 시작했는데 시간이 지나면서 안지켜지더군요. 이젠 잔소리 하기도 귀찮고 , 손에 익은 습관이 있어서 무의식중에 그렇게 되는것 같습니다.( ^^).
그래서 자동으로 indent가 되도록 indent명령어를 이용해서 cvs commit시 작동하도록 만들었는데 작동이 안되네요. 정리되면 팁으로 올리려고 하는데 잘못된곳도 잡고 정리도 할수 있도록 도와주십시오.
현재 indent 옵션은 다음과 같습니다.
1).indent.pro(profile: indent규칙을 나타내는 옵션, manpage에 예제가 나와있습니다.)

-nbc -cdb -sc -bap -br -ce -br

2)indent_commit(실제 indentation을 하는 실행스크립트)
cp /home/cvsroot/CVSROOT/.indent.pro .
FILES=`echo $* | sed -e 's/[^ ]*//' \
        -e 's/ [^ ]*[^hc] / /g' \
        -e 's/ [^ ]*[^hc]$//' \
        -e 's/ [^ ]*[^.]. / /g'` \
        -e 's/ [^ ]*[^.].$//' 
VERSION_CONTROL=none
export VERSION_CONTROL
for i in $FILES; do
  echo "Indenting $i;"
  $CVSROOT/CVSROOT/indent $i
done
exit 0

3)commitinfo(commit시에 실행될 파일정의)
여기서 test1은 프로젝트 이름이고 그 다음은 commit시에 실행될 스크립트

test1	/home/cvsroot/CVSROOT/indent_commit

4)cvswrapper(cvs에게 indent' 가 binairy임을 알립니다.)

indent -k 'b'

5)checkoutlist(이부분을 잘 모르겠네요)

indent_commit Failed to checkout commit_prep
.indent.pro Failed to checkout .indent.pro
indent Failed to checkout indent

이렇게 해서 구성을 했거든요. 그냥 indent명령으로는 .indent.pro가 적용되서 잘되는데 cvs에서는 안되네요.
조언 부탁드립니다.

pynoos의 이미지

앗.. 저도 올리려고 그랬는데... ^^

checkoutlist 에 대한 것은 제가 cvs log report 라는 tip에 설명하였으니 참고하시구요.

http://bbs.kldp.org/viewtopic.php?t=24058

.indent.pro 를 읽게 하는 것은 HOME=$CVSROOT/CVSROOT 를 export 해주시면 됩니다.

.indent.pro 의 위치를 항상 $HOME/.indent.pro 로 읽기 때문이지요

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.