ccm_project_diff - show differences between two projects
ccm_project_diff [options] old_project new_project
old_project, new_project project specs, either in the form "proj_vers" or as four part objectname Options: -t | --terse terse diff listing (default) -d | --diff produce diff listing like "diff -ur" -p | --patch produce patch listing like "diff -urN" -h | --hide hide contents of added/deleted subtrees (for --terse) -r | --recursive recurse into sub projects Synergy options: -D PATH | --database PATH database path -H HOST | --host HOST engine host -U NAME | --user NAME user name -P STRING | --password STRING user's password --ui_database_dir PATH path to copy database information to
ccm_project_diff shows the differences between two projects in terms of the workarea paths of the projects' members. It does not need maintained workareas, though.
ccm_project_diff
--terse
ccm_project_diff traverses both projects and outputs the differences in the following form:
a toolkit-1.0:project:1 2002-11-26 23:26:36 released b toolkit-darcy:project:1 2002-12-17 01:46:21 working ! toolkit/editor/sources/main.c main.c-1:csrc:2 main.c-2:csrc:2 + toolkit/guilib/includes/fonts.h fonts.h-1:incl:1 ! toolkit/guilib/makefile makefile-1:makefile:3 makefile-2:makefile:3 + toolkit/guilib/sources/fonts.c fonts.c-1:csrc:1 ! toolkit/misc/readme readme-1:ascii:1 readme-2:ascii:1 ...
After the two header lines showing information about the projects, lines start with one of +, -, !, or ~ followed by the workarea pathname of the object in the project, followed by additional information (separated by tabs):
+
-
!
~
marks a path added in new_project; the correponding objectname is given as additional info
marks a path deleted from old_project; the correponding objectname is given as additional info
marks a path where the corresponding objects have different versions in old_project and new_project; the objectnames are given as additional info
marks a path where the corresponding objects are of different "lineage": either different instances (e.g. object was deleted and a new object created with the same name) or a different cvtype (e.g. a directory was replaced by a regular file); the objectnames are given as additional info
All objects in an added/deleted subtree are shown. This can be suppressed with option --hide which will only show the root of such a subtree.
--hide
--diff
With this option the output resembles that of diff -ur:
synergy a: toolkit-1.0:project:1 Tue Nov 26 23:26:36 2002 synergy b: toolkit-darcy:project:1 Tue Dec 17 01:46:21 2002 Only in b: toolkit/guilib/includes/fonts.h synergy b: fonts.h-1:incl:1 Wed Nov 17 04:23:11 1999 diff -u a/toolkit/guilib/makefile b/toolkit/guilib/makefile synergy a: makefile-1:makefile:3 Wed Nov 17 04:23:10 1999 synergy b: makefile-2:makefile:3 Wed Nov 17 04:23:11 1999 --- a/toolkit/guilib/makefile +++ b/toolkit/guilib/makefile @@ -2,7 +2,8 @@ INCLUDE_DIR = includes OBJ_FILES = $(SOURCE_DIR)/main.o \ - $(SOURCE_DIR)/controls.o + $(SOURCE_DIR)/controls.o \ + $(SOURCE_DIR)/fonts.o INCLUDES = -I$(INCLUDE_DIR) OPT_CFLAGS = -g ...
Files that are only present in one project are indicated by "Only in a: ..." or "Only in b: ..." lines. An object that changes cvtype from "dir" to non-"dir" or vice versa is indicated by a line of the form:
File a/foo is a regular file while file b/foo is a directory
Differences in directories (i.e. both objects are of cvtype "dir", but different versions) are not shown.
Additional Synergy information (objectname, modified_time) is given by lines starting with "synergy a:" or "synergy b:" immediately following any of the above "header" lines.
Note that --diff implies --hide (the top of a added/deleted subtree is still indicated by a "Only in ..." line).
--patch
With this option the output resembles that of diff -urN. This is the same as --diff output except that "absent" objects are treated as empty files and added/deleted subtrees are not hidden. This listing is suitable to "patch up" a checked out old_project to a copy of new_project with the command:
patch -p1 -E < project.patch
-r
--recursive
Traverse also subprojects.
-h
Hide added/deleted subtrees in --terse output format.
See "GetOptions" in VCS::CMSynergy::Helper.
Exit status is 0 if the projects are identical, 1 if some differences were found, 2 if some error occurred.
Roderich Schupp, argumentum GmbH <schupp@argumentum.de>
To install VCS::CMSynergy, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VCS::CMSynergy
CPAN shell
perl -MCPAN -e shell install VCS::CMSynergy
For more information on module installation, please visit the detailed CPAN module installation guide.