It's all about the answers!

Ask a question

Is there a functionality similar to svn diff?


Dr. Hans-Joachim Pross (1.1k4258) | asked Apr 12 '11, 5:15 a.m.
JAZZ DEVELOPER
edited Oct 12 '17, 4:11 p.m. by David Lafreniere (4.5k7)

When using svn diff, I can compare multiple files at once and get a list of files with annotations.
Is there a way to produce that in RTC, preferably with a similar formatting ?

A typical result of svn diff look like:

$ svn diff -r 578:580

Index: src/java/src/prj/net/sf/aceunit/Fixture.java
===================================================================
--- src/java/src/prj/net/sf/aceunit/Fixture.java (revision 578)
+++ src/java/src/prj/net/sf/aceunit/Fixture.java (revision 580)
@@ -174,7 +174,7 @@
out.format("/ The loops of this fixture. /%n");
out.format("static const aceunit_loop_t loops[] = {%n");
for (final String method : testMethods) {
- out.format(" %s,%n", loopMethods.getArg(method)); // TODO
Care about last comma?
+ out.format(" %s,%n", loopMethods.getArg(method));
}
out.format("};%n");
out.format("#endif%n");

Index: src/doc/examples/sort/Makefile
===================================================================
--- src/doc/examples/sort/Makefile (revision 578)
+++ src/doc/examples/sort/Makefile (revision 580)
@@ -1,10 +1,30 @@
-ACE_UNIT_PATH=../../..
+# Path to AceUnit.
+# Scope: local.
+# Type: Single path.
+ACE_UNIT_PATH:=../../..
+
+# List of generated files.
+# As a side effect, runs the AceUnit generator.
+# Scope: local.
+# Type: List of pathnames.
GENERATED_FILES:=$(shell java -jar $(ACE_UNIT_PATH)/java/AceUnit.jar
--print suites,headers .)
+
+# List of source files.
+# Scope: local.
+# Type: List of scource files.
SOURCES:=AceUnitMain.c AceUnit.c AceUnitData.c FullPlainLogger.c
$(wildcard
.c) $(filter %.c, $(GENERATED_FILES))

-CFLAGS=-W -Wall -pedantic
-CPPFLAGS=-DACEUNIT_SUITES -I $(ACE_UNIT_PATH)/native
+## Flags for the C compiler.
+# Scope: External
+# Type: Flags passed to the C compiler.
+override CFLAGS+=-W -Wall -pedantic

+## Flags for the C preprocessor.
+# Scope: External.
+# Type: Flags passed to all programs that do C preprocessing.
+override CPPFLAGS+=-DACEUNIT_SUITES -I $(ACE_UNIT_PATH)/native
+
+# Sets the path where to find C source files.
vpath %.c . $(ACE_UNIT_PATH)/native $(ACE_UNIT_PATH)/native/loggers

all: AceUnitMain$ svn diff -r 578:580

Accepted answer


permanent link
Michael Valenta (3.6k3) | answered Apr 12 '11, 9:35 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Oct 12 '17, 4:11 p.m. by David Lafreniere (4.5k7)

The scm command line has an "scm diff" command that provides similar output. The semantics differ a bit from the "svn diff" because of the difference in nature between Jazz SCM and SVN. You can use "scm help diff" to see what options are available.

David Lafreniere selected this answer as the correct answer

Your answer


Register or to post your answer.