It's all about the answers!

Ask a question

Is there a functionality similar to svn diff?

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

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/
--- src/java/src/prj/net/sf/aceunit/ (revision 578)
+++ src/java/src/prj/net/sf/aceunit/ (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));

Index: src/doc/examples/sort/Makefile
--- src/doc/examples/sort/Makefile (revision 578)
+++ src/doc/examples/sort/Makefile (revision 580)
@@ -1,10 +1,30 @@
+# Path to AceUnit.
+# Scope: local.
+# Type: Single 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
.c) $(filter %.c, $(GENERATED_FILES))

-CFLAGS=-W -Wall -pedantic
+## 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.
+# 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.7k3) | answered Apr 12 '11, 9:35 a.m.
edited Oct 12 '17, 4:11 p.m. by David Lafreniere (4.8k7)

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.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.