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

Re: [PATCH] svn diff --summarize changed to show left and right revision numbers

From: Branko ─îibej <brane_at_apache.org>
Date: Tue, 2 Jan 2018 14:03:17 +0100

On 02.01.2018 13:43, Nagy Peter wrote:
> Dear Julian,
>
> I summarized and enclosed the description of my problem. Could you please have a look at it?
[Please PLEASE do not attach text that belongs in the body of the mail,
as it's really hard to quote from there.]

> Let's suppose the following repo structure.
>
> svn ls --verbose https:<repo>/DB/trunk
> 1018 xxx Dec 24 15:51 ./
> 1015 xxx 35478 Dec 19 17:20 workflow.sql
> 345 xxx 79 Apr 03 2017 _RUN.bat
> 1014 xxx 3113 Dec 19 16:27 _RUN.sql
>
> svn ls --verbose https:<repo>/DB/tags/v_1.0
> 1016 xxx Dec 24 15:47 ./
> 1002 xxx 35302 Dec 13 15:59 workflow.sql
> 345 xxx 79 Apr 03 2017 _RUN.bat
> 1016 xxx 3113 Dec 24 15:47 _RUN.sql
>
>
> If i want to see if there are any changes between the trunk and the tag, i can use svn diff, and i get the following output:
> svn diff --summarize --ignore-properties https://<repo>/DB/trunk https://<repo>/DB/tags/v_1.0
> M https://<repo>/DB/trunk/workflow.sql
>
> However the output does not refer to the changed one of the compared files!

I'm having trouble understanding what you mean. The file that's
different on trunk and in the branch is listed in your diff summary
output. You asked "what's the difference between these two URLs" and you
got an answer.

> It only shows that the two are not the same, but nothing more. If I change the left and right side,
> the output also changes, as follows:
> svn diff --summarize --ignore-properties https://<repo>/DB/tags/v_1.0 https://<repo>/DB/trunk
> M https://<repo>/DB/tags/v_1.0/workflow.sql

Of course the output changes, because you asked a different question.

> What i want:
> svn diff --summarize --ignore-properties https://<repo>/DB/trunk https://<repo>/DB/tags/v_1.0
> M workflow.sql | 1015 | 1002 |
>
> So that one can see the workflow.sql has been most probably changed in the trunk, (because it has a higher revision number) so it is a normal development scenario.

This looks like you're using the wrong tool for the job. The answer to
"what changed on trunk" is given by "svn log", not "svn diff". Diff
compares two trees in the repository; log gives you the history.

> But if i would see a higher revision number at the tag, i would know, that somebody made changes on the tag (which is not recommended, but people do such things)
> so i have to merge the changes back into the trunk.

For that you could also use 'svn merge --dry-run' or 'svn mergeinfo'.

-- Brane

> -----Original Message-----
> From: Julian Foad [mailto:julianfoad_at_apache.org]
> Sent: Tuesday, January 02, 2018 12:56 PM
> To: Nagy Peter <peter.nagy_at_perit.hu>
> Cc: dev_at_subversion.apache.org
> Subject: Re: [PATCH] svn diff --summarize changed to show left and right revision numbers
>
> Nagy Peter wrote:
>> i sent the patch too early, it doesn't work in each cases. Unfortunatelly the revision numbers are not set correctly because in some cases the left and right revision numbers both contain the latest revision number of the repository instead of the revision numbers of the files beeing compared. Maybe it is a problem in the server, i do not know yet. So please ignore it for a while.
> OK.
>
> I did not quite understand what the problem is, and how you are trying to solve it. It might be helpful for everybody if you show an example to demonstrate the problem: what it looks like before, and what you want to show. Then maybe some people here will have good ideas to help you.
>
> Thank you for wanting to share your work.
>
> - Julian
Received on 2018-01-02 14:03:29 CET

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