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

Re: Obtaining the list of added/removed files

From: Alexey Neyman <alex.neyman_at_auriga.ru>
Date: 2006-05-31 15:42:54 CEST

On Wednesday 31 May 2006 12:56, Alexey Neyman wrote:
> Unfortunately, I was somewhat quick to reply "everything's
> alright" :( This hack works for deleted files/directories, but fails
> for those added: they appear as "A +" in "svn status" output (that
> is, they are considered to be copied from /trunk to
> /vendor/snapshot1) and therefore are skipped from the "svn diff"
> output.
> Don't you think it's too much of a nuisance for such a merge:
> $ svn diff file:///svn/vendor/snapshot1 file:///svn/trunk > patch
> < edit patch, leaving only added files >
> $ svn co file:///svn/vendor/snapshot1 tmpdir
> $ cd tmpdir
> $ svn merge file:///svn/vendor/snapshot1 file:///svn/trunk >> patch

Well, I tried to solve it with a patch to Subversion, along with the
other problem I described. With this patch, it is possible to specify
what 'svn diff' will print to its output.


$ svn diff --diff-format 'prop-change:none'
  (skip property changes from the output)

$ svn diff --diff-format 'prop-change:short'
  (just print the file name and property name, do not print actual

$ svn diff --diff-format 'file-added:short,file-changed:short,\
  (print just the names of files and directories added/changed/deleted
  or whose properties were changed)

Particularly, the problems I reported are solved by throwing
--diff-format='prop-changed:none,dir-deleted:short'. The
--no-diffs-deleted option is a shortcut for --diff-format
'file-deleted:short', but the option was retained for compatibility.

Of course, the patch is at the "proof of concept" stage. It lacks the
javadoc-style comments; the svn_opt_parse_diff_format function should
perhaps reside in libsvn_subr, and so on. I'll polish it later if
such a feature is welcome.

The patch is against the subversion 1.3.1 and passes 'make check'
tests ok. Feedback welcome.


First my nest mate surprises me with extra fat and spicy grubs for 
                        -- Pkunks, SC2

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Received on Wed May 31 15:49:00 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.