[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

svn diff weirdness

From: Michael Reinelt <reinelt_at_eunet.at>
Date: 2006-04-24 17:07:59 CEST

Hi there,

first, I got in touch with subversion a few days ago, and I really
really like this stuff! This is going to make my life a lot easier!
Thank you guys (and gals?) for this great tool!

I'm facing the following problem: I want to compare a file in trunk and
in a specific branch. I cannot use a normal 'diff' comamnd because of
keyword substitution. But I found that 'svn diff' handles this fine...

so I tried the following:

Step 1: find out the last changed revisions:

$ svn info trunk/lib/MRK/al.pm
[...]
Last Changed Rev: 54
[...]

$ svn info branches/Fill/lib/MRK/al.pm
[...]
Last Changed Rev: 17
[...]

$ svn diff --old=trunk/lib/MRK/al.pm@54 --new=branches/Fill/lib/MRK/al.pm@17

svn: 'file:///svnroot/MRK/branches/Fill/lib/MRK/al.pm' was not found in
the repository at revision 17

thats true: the file al.pm was added to the branch at revision 20 (in
fact it was copied from trunk with this revision)

Is there another simple possibility to find out whether files in trunk
and in a branch differ? And, even more important for me, *which* files
differ?

I found a workaround by looking at the output of 'svn log
--stop-on-copy', to find out the revision I can compare with trunk.

When I found which files differ, I wanted to merge them. This works with
a command like

svn merge branches/Fill/lib/MRK/al.pm@17 trunk/lib/MRK/al.pm@54
branches/Fill/lib/MRK/al.pm

I thought that the syntax of "diff" and "merge" is the same. Well, looks
like it isn't. "merge" does not use the "--old/--new" option... This is
annoying because I always to a "svn diff" before a "svn merge" to check
what will be merged.

Background: I'm using svn to manage what we call "customization" for a
larger software. This customization consists of perl files, perl libs,
batch files, and lots of other files, organized in a small tree
structure. This customization is uses for different customers; so there
are differences in some files. But some files are (and should be) equal
for every customer. Some customers have additional files which are
unique for this customer.

I put the "common" files into trunk, and created a branch for every
customer by initially copying trunk.

When I modify a customization, I do this in the corresponding branch. If
a "common" file gets modified, it should be ported back to trunk, and in
a second step ported to all other branches. That's why I wanted to
create some sort of automatism to compare branches and trunk.

maybe there's a much more clever solution?

TIA, Michael

-- 
Michael Reinelt <reinelt@eunet.at>
http://home.pages.at/reinelt
GPG-Key 0xDF13BA50
ICQ #288386781
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Apr 24 17:10:49 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.