[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 10:56:25 CEST

On Wednesday 31 May 2006 12:04, Giovanni Bajo wrote:
> Alexey Neyman <alex.neyman@auriga.ru> wrote:
>
> > $ svnadmin create /tmp/svn
> > $ svn mkdir file:///tmp/svn/vendor
> > $ svn import file:///tmp/svn/vendor/current
> > Adding a
> > Adding b
> > Adding b/c
> > Adding b/d
> > Adding b/d/g
> > Adding b/d/h
> > Adding b/e
> > Adding b/e/i
> > Adding b/e/j
> > Adding b/e/k
> > Adding b/f
> > Adding b/f/l
> > Adding b/f/m
> > $ svn cp file:///tmp/svn/vendor/current \
> > file:///tmp/svn/vendor/snapshot1
> > $ svn cp file:///tmp/svn/vendor/current \
> > file:///tmp/svn/trunk
> > $ svn rm file:///tmp/svn/trunk/b/e
> > $ svn diff file:///tmp/svn/vendor/snapshot1 \
> > file:///tmp/svn/trunk
> >
> > The last 'diff' command shows no changes. However, there are some:
> > the copy on the trunk does not contain the files b/e/i, b/e/j,
> > b/e/k - they were removed as they were a part of the b/e
> > directory. It appears there is no way to obtain the list of such
> > changes.
>
>
> What if you checkout snapshot1, do a svn merge
> file:///tmp/svn/vendor/snapshot1 file:///tmp/svn/trunk, and then svn
> diff? :)

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

Regards,
Alexey.

-- 
Open your heart and become one with your happy self.
                        -- 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 10:57:22 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.