검색

이 콘텐츠는 선택한 언어로 제공되지 않습니다.

1.3.5. Viewing Changes

download PDF

Viewing the Status

To determine the current status of a working copy, change to the directory with the working copy and run the following command:
cvs status
This displays detailed information about each file that is under revision control, including its current status (such as Up-to-date, Locally Added, Locally Removed, or Locally Modified) and revision. However, if you are only interested in what has changed in your working copy, you can simplify the output by typing the following at a shell prompt:
cvs status 2>/dev/null | grep Status: | grep -v Up-to-date

Example 1.20. Viewing the status of a working copy

Imagine that the directory with your working copy of a CVS repository has the following contents:
project]$ ls
AUTHORS  ChangeLog  CVS  doc  INSTALL  LICENSE  Makefile  README  src
With the exception of ChangeLog, which is scheduled for addition to the CVS repository, all files and directories within this directory are already under revision control. The TODO file, which is also under revision control, has been scheduled for removal and is no longer present in the working copy. Finally, Makefile contains local changes. To display the status of such a working copy, type:
project]$ cvs status 2>/dev/null | grep Status: | grep -v Up-to-date
File: ChangeLog         Status: Locally Added
File: Makefile          Status: Locally Modified
File: no file TODO              Status: Locally Removed

Viewing Differences

To view differences between a working copy and the checked out content, change to the directory with the working copy and run the following command:
cvs diff [file]
This displays changes to all files in the working copy. If you are only interested in changes to a particular file, supply the file name on the command line.

Example 1.21. Viewing changes to a working copy

Imagine that the directory with your working copy of a CVS repository has the following contents:
project]$ ls
AUTHORS  ChangeLog  CVS  doc  INSTALL  LICENSE  Makefile  README  src
All files in this directory are under revision control and Makefile contains local changes. To view these changes, type:
project]$ cvs diff
cvs diff: Diffing .
cvs diff: ChangeLog is a new entry, no comparison available
Index: Makefile
===================================================================
RCS file: /home/john/cvs/project/Makefile,v
retrieving revision 1.1.1.1
diff -r1.1.1.1 Makefile
156c156
<       -rm -f $(MAN1)
---
>       -rm -f $(MAN1) $(MAN7)
cvs diff: TODO was removed, no comparison available
cvs diff: Diffing doc
...
Red Hat logoGithubRedditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 문서 정보

Red Hat을 사용하는 고객은 신뢰할 수 있는 콘텐츠가 포함된 제품과 서비스를 통해 혁신하고 목표를 달성할 수 있습니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

© 2024 Red Hat, Inc.