7.6. Version Control Status Commands

The commands of the version control status group allow you to inspect the history of a package. You can list the complete log messages provided by all developers who made changes to the package, view annotated listings of source files, and list the differences between any two versions of the package in detail.

Figure 7-9. GUI Package Management Version Control Status



Viewing the package log . Log displays the package log, which contains all symbolic version names of this package as well as the accumulated log messages from all former commit and release actions. A sample log file from the example project shipped with ComPact can be seen in Figure 7-10.

About difference listings . The default format used for the display of difference listings is the unified context diff format. This format can be easily fed into the popular patch program to perform manual merging of selected features. In this format, each change is preceded by a line beginning and ending with

@@
, which states the exact position of the change. Each change is surrounded by three lines of context, so that the patch may be correctly applied even if the relative position of the lines change in the source files. A special character in the first row of each change listing defines the meaning of the change line: a line with a
-
has been deleted, a line with a
+
has been added, and a line beginning with
!
has been changed. A sample difference listing from the example project shipped with ComPact can be seen in Figure 7-11.

Listing local modifications . Press Modifications to list all the modifications that have been made locally since the last checkout or update of the package.

Viewing differences between arbitrary versions . Show Diffs with two arguments is used to explicitly list the differences between two named versions of the package. You may type in the version name, or select one from the select lists placed at the bottom of the screen. Show Diffs with one argument lists the differences between the given version and your local workspace. To select the versions you want to compare from all available versions, use the selection lists at the bottom of the pane and hit Select.

Viewing annotated listings . Annotate produces a listing of all selected or all files that contains the date of change and the user who entered the line for every single line of a file. So you can easily track down who is responsible for a certain line of code which looks suspicious to you or which you don't understand. An excerpt from an annotated listing from the example project shipped with ComPact can be seen in Figure 7-12.

All difference and annotation listings apply to the files selected in the dir2 (6) and dir3 (7) frames above, or to all files of the package, if none are selected. Please consider that annotated listings can be quite long for big packages.

Figure 7-10. Sample Package Commit Log

RCS file: /usr/cvs/gnu/cvs-lib/PkgTags,v
Working file: PkgTags
head: 1.9
branch:
locks: strict
access list:
symbolic names:
    RELENG-POST-INTEGRA-CVS-1_10: 1.9
    devel_cvs-lib_d1_0_3: 1.9
    devel_cvs-lib_d1_0_2: 1.8
    RELENG-PRE-INTEGRA-CVS-1_10: 1.7
    release_cvs-lib_0_0_0: 1.7.2.1
    release_cvs-lib_0_0_start: 1.7
    release_cvs-lib_0_0_stable: 1.7.0.2
    devel_cvs-lib_d1_0_1: 1.7
    devel_cvs-lib_d1_0_0: 1.6
    devel_cvs-lib_d0_0_5: 1.5
    devel_cvs-lib_d0_0_4: 1.4
    devel_cvs-lib_d0_0_3: 1.3
    devel_cvs-lib_d0_0_2: 1.2
    devel_cvs-lib_d0_0_1: 1.1
keyword substitution: kv
total revisions: 10;    selected revisions: 10
description:
----------------------------
revision 1.9
date: 1999/07/09 14:44:01;  author: mdiers;  state: Exp;  lines: +1 -0
Fix ComPact package structure. Missed a file from dist.

added: cvs-lib/doc/.keep.me
added: cvs-lib/inc/win32/.cvsignore
----------------------------
revision 1.8
date: 1999/07/09 14:41:29;  author: mdiers;  state: Exp;  lines: +1 -0
Merge with CVS 1.10.

removed: cvs-lib/src/getdate.c
modified: cvs-lib/.cvsignore
modified: cvs-lib/ChangeLog
modified: cvs-lib/Makefile.in
----------------------------
revision 1.7
date: 1998/05/07 20:31:32;  author: wagner;  state: Exp;  lines: +1 -0
branches:  1.7.2;
some comments
----------------------------
revision 1.6
date: 1998/04/16 23:42:43;  author: wagner;  state: Exp;  lines: +1 -0
made it compiler under NT, too

----------------------------
revision 1.5
date: 1998/04/15 16:40:46;  author: mdiers;  state: Exp;  lines: +1 -0
Ignore derived subdirs.
----------------------------
revision 1.4
date: 1998/04/12 18:17:50;  author: mdiers;  state: Exp;  lines: +1 -0
Export wait.h, too.
----------------------------
revision 1.3
date: 1998/04/12 17:50:46;  author: mdiers;  state: Exp;  lines: +1 -0
Export regex.h as well.
----------------------------
revision 1.2
date: 1998/04/12 17:43:12;  author: mdiers;  state: Exp;  lines: +1 -0
Export getopt.h.
----------------------------
revision 1.1
date: 1998/04/12 17:34:36;  author: mdiers;  state: Exp;
Import of CVS 1.9.26 lib substructure into ComPact.
----------------------------
revision 1.7.2.1
date: 1999/03/08 16:43:32;  author: wagner;  state: Exp;  lines: +1 -0
first compact release: release_compact_cvs_1_9_26
=============================================================================
         


Figure 7-11. Sample Unified Context Diff

Index: cvs-lib/ChangeLog
===================================================================
RCS file: /usr/cvs/gnu/cvs-lib/ChangeLog,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ChangeLog   1998/04/12 17:34:34 1.1
+++ ChangeLog   1999/07/09 14:41:29 1.2
@@ -1,3 +1,7 @@
+Tue Mar 24 16:08:00 1998  Ian Lance Taylor  <ian@cygnus.com>
+
+   * Makefile.in (CFLAGS): Set to @CFLAGS@, not -g.
+
 1998-02-20  Jim Kingdon  <kingdon@harvey.cyclic.com>
 
    * regex.c: Partial merge with version from emacs 20.2.  Brings
Index: cvs-lib/Makefile.in
===================================================================
RCS file: /usr/cvs/gnu/cvs-lib/Makefile.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile.in 1998/04/12 17:34:35 1.1
+++ Makefile.in 1999/07/09 14:41:29 1.2
@@ -77,7 +77,7 @@
 RANLIB = @RANLIB@
 
 CC       = @CC@
-CFLAGS = -g
+CFLAGS = @CFLAGS@
 CPPFLAGS=
 
 YACC = @YACC@
Index: cvs-lib/PkgDesc
===================================================================
RCS file: /usr/cvs/gnu/cvs-lib/PkgDesc,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- PkgDesc 1998/04/16 23:42:42 1.5
+++ PkgDesc 1998/05/07 20:31:31 1.6
@@ -27,6 +27,7 @@
 main:
   library("cvs-lib")
 
+; stuff for Windows 32 platform
 target ".*-win32-.*":
   add_include("..\..\inc\win32", exported)
 
@@ -47,6 +48,7 @@
 
   c_source("src\win32\getdate")
 
+; use yacc on all other platforms
 other targets:
   yacc_c_source("getdate")
 
         


Figure 7-12. Sample Annotated Source Listing

1.1          (mdiers   12-Apr-98): import("cvs-config", "dx.x.x")
1.1          (mdiers   12-Apr-98): import("cvs-error", "dx.x.x")
1.1          (mdiers   12-Apr-98): 
1.1          (mdiers   12-Apr-98): add_define("-DHAVE_CONFIG_H")
1.1          (mdiers   12-Apr-98): 
1.5          (wagner   16-Apr-98): c_header("fnmatch", exported)
1.1          (mdiers   12-Apr-98): c_header("getline", exported)
1.2          (mdiers   12-Apr-98): c_header("getopt", exported)
1.1          (mdiers   12-Apr-98): c_header("md5", exported)
1.3          (mdiers   12-Apr-98): c_header("regex", exported)
1.1          (mdiers   12-Apr-98): c_header("savecwd", exported)
1.1          (mdiers   12-Apr-98): c_header("system", exported)
1.4          (mdiers   12-Apr-98): c_header("wait", exported)
1.4          (mdiers   12-Apr-98): 
1.1          (mdiers   12-Apr-98): c_source("argmatch")
1.1          (mdiers   12-Apr-98): c_source("getline")
1.1          (mdiers   12-Apr-98): c_source("getopt")
1.1          (mdiers   12-Apr-98): c_source("getopt1")
1.1          (mdiers   12-Apr-98): c_source("md5")
1.1          (mdiers   12-Apr-98): c_source("regex")
1.1          (mdiers   12-Apr-98): c_source("savecwd")
1.1          (mdiers   12-Apr-98): c_source("sighandle")
1.1          (mdiers   12-Apr-98): c_source("stripslash")
1.1          (mdiers   12-Apr-98): c_source("xgetwd")
1.1          (mdiers   12-Apr-98): c_source("yesno")
1.1          (mdiers   12-Apr-98): 
1.5          (wagner   16-Apr-98): main:
1.5          (wagner   16-Apr-98):   library("cvs-lib")
1.5          (wagner   16-Apr-98): 
1.6          (wagner   07-May-98): ; stuff for Windows 32 platform
1.1          (mdiers   12-Apr-98): target ".*-win32-.*":
1.5          (wagner   16-Apr-98):   add_include("../../inc/win32", exported)
1.5          (wagner   16-Apr-98): 
1.5          (wagner   16-Apr-98):   c_header("inc/win32/ndir", exported)
1.5          (wagner   16-Apr-98):   c_header("inc/win32/pwd", exported)
1.5          (wagner   16-Apr-98): 
1.5          (wagner   16-Apr-98):   c_source("fncase")
1.5          (wagner   16-Apr-98):   c_source("fnmatch")
1.5          (wagner   16-Apr-98):   c_source("valloc")
1.5          (wagner   16-Apr-98):   c_source("vasprintf")
1.5          (wagner   16-Apr-98): 
1.5          (wagner   16-Apr-98):   c_source("src/win32/ndir")
1.5          (wagner   16-Apr-98):   c_source("src/win32/pwd")
1.5          (wagner   16-Apr-98):   c_source("src/win32/sockerror")
1.5          (wagner   16-Apr-98):   c_source("src/win32/stripslash")
1.5          (wagner   16-Apr-98):   c_source("src/win32/waitpid")
1.5          (wagner   16-Apr-98):   c_source("src/win32/win32")
1.5          (wagner   16-Apr-98): 
1.5          (wagner   16-Apr-98):   c_source("src/win32/getdate")
1.1          (mdiers   12-Apr-98): 
1.6          (wagner   07-May-98): ; use yacc on all other platforms
1.1          (mdiers   12-Apr-98): other targets:
1.1          (mdiers   12-Apr-98):   yacc_c_source("getdate")
1.1          (mdiers   12-Apr-98): 
1.5          (wagner   16-Apr-98):