developer tip

Subversion 상태 기호 "~"는 무엇을 의미합니까?

optionbox 2020. 8. 4. 07:30
반응형

Subversion 상태 기호 "~"는 무엇을 의미합니까?


내가 할 때 물결 기호가 나타납니다 svn status.

다음은 XCode에서 프로젝트를 편집 한 후의 결과입니다.

svn status
M      build/Currency_Converter.build/Currency_Converter.pbxindex/imports.pbxbtree
M      build/Currency_Converter.build/Currency_Converter.pbxindex/pbxindex.header
M      build/Currency_Converter.build/Currency_Converter.pbxindex/symbols0.pbxsymbols
~      build/Currency_Converter.build/Currency_Converter.pbxindex/strings.pbxstrings
M      main.m
//more changed files

그게 무슨 뜻인지 알아? 구글이나 svn 치트 시트에서 찾을 수 없습니다.

흥미롭게도 main.m 만 편집했지만 수정 된 파일이 많이 있습니다. 왜 그런지 모르겠다. SVN 및 XCode 작업에 대한 팁이 있습니까? 소스 파일 만 버전 관리하에 두어야합니까?

편집 : -버전 관리가 이미 완료된 파일이 다른 유형의 파일로 대체되어 발생합니다. 이 경우 strings.pbxstrings는 파일이었으며 이제는 디렉토리가되었습니다. 이야기의 교훈은 빌드 폴더를 버전 관리에 넣지 않습니다.


SVN 도서는 말합니다 :

항목은 한 종류의 객체 (파일, 디렉토리, 링크)로 버전 화되었지만 다른 종류의 객체로 대체되었습니다.

아마도 원래 단일 파일이었을 수도 있지만 디렉토리로 바꾸거나 그 줄을 따라 뭔가?


내가 한 일은 다음과 같습니다.

폴더가 테스트 인 경우

  1. mv 테스트 테스트 1
  2. svn 제거 테스트
  3. mv 테스트 1 테스트

에서

svn help status

'~'버전이 다른 항목이 다른 항목에 의해 방해 됨

파일 권한이 변경되고 svn이 그것에 대한 실행 액세스 권한이없는 곳에서만 이것을 보았습니다.

도움이 되었기를 바랍니다.


이 문제를 해결하는 가장 쉬운 방법은 백업 한 다음이 상태의 폴더 나 파일을 삭제 한 다음 "svn up"을 수행하는 것입니다. 반드시 파일로 연결된 폴더 일 필요는 없습니다. .svn 폴더가 없거나 손상되었을 수 있습니다. .


svn delete --keep-local x
svn commit -m "del x"
svn add x
svn commit -m "blah"

폴더에서 .svn 폴더를 제거하거나 (예 : 디렉토리를 제거한 후 동일한 디렉토리를 다시 생성 할 때) 디렉토리를 기호 링크로 바꾸거나 동일한 이름의 파일을 교체 할 때 이런 일이 발생할 수 있습니다. .

a- 폴더라는 폴더라고 가정하면 상위 폴더에서 다음 명령을 실행하여이 문제를 해결할 수 있습니다.

$ find a-folder -type d -name '.svn' -print0 | xargs -0 rm -Rf
$ svn up --force .
svn: Directory 'logs/.svn' containing working copy admin area is missing
$ svn up --force .
E    a-folder
...
Updated to revision n.

그런 다음 svn을 추가 / 제거하고 변경 사항을 다시 커밋하는 것이 중요합니다.


비슷한 문제가 있었지만 SVN은 잠금에 대해 불평했습니다. 우리가 한 일은 다음과 같습니다.

  • 파일 백업
  • rm -r (linux)로 문제의 디렉토리를 제거했습니다.
  • 란의 SVN 정리 디렉토리에
  • 란은 --force를 svn을 디렉토리에

I just want to share that this is an issue frequently encountered when installing extensions within Joomla. The extensions are installed through the CMS and are owned by apache with no group write. Generally the next step is to add the files to the SVN but if you don't sudo or change the file perms, then SVN fails when it can't write the .svn directory. Here's the easy solution.

mv foo foo-bak
svn up foo
svn revert foo

# just for good measure. Foo should not show up in the two following commands.
ls | grep foo
svn st | grep foo

mv foo-bak foo
svn add foo

It may be also matter of symbolic links under Windows. When you commit symbolic link into SVN and then check it out under Windows, links are changed to regular files and this is also reported as ~.


I often had this while upgrading modules under (eg.) Joomla!, Wordpress or Drupal. Sometimes the .svn directory get removed by the upgrading process.

# rename updated directory
mv foo foo.new

# restore the old directory
svn up foo

# merge / update the old directory with new items
# notice that the above command will preserve the obsolete files
# so you should do a diff -r in order to remove them
cp -r foo.new/* foo

# Add files commit, etc
svn add foo/*
svn delete foo/xx
svn commit -m "updated module"

~ versioned item obstructed by some item of a different kind
    Second column: Modifications of a file's or directory's properties

참고URL : https://stackoverflow.com/questions/853405/what-does-the-subversion-status-symbol-mean

반응형