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

Re: What is the latest revision without considering specific folder?

From: Ryan Schmidt <subversion-2009a_at_ryandesign.com>
Date: Sun, 15 Feb 2009 20:25:39 -0600

On Feb 15, 2009, at 04:20, Mojca Miklavec wrote:

> I need to figure out the latest revision of some SVN repository that
> has been done anywhere except in specific folder (or anywhere except
> by specific user/or the latest revision done by specific user).
> Let's say that I have repository "household":
> household/README.txt
> household/Makefile
> household/room1/...
> household/room2/...
> ...
> household/bathroom/...
> household/trash/...
> There are lots of changes in "trash" folder that I'm not interested in
> (they are mostly commited by a limited number of users) and there are
> rare, but important changes, usually done by a single user that can
> appear anywhere but in trash (it could be a change in Makefile or a
> change in any file inside any room).
> I'm currently using
> cd household && svn info | grep "Last Changed Rev:" | sed 's/^Last
> Changed Rev: \(.*\)$/\1/' && cd ..
> and whenever the version changes from last time, I need to start a
> time-consuming task on computer. Contents of "trash" have no
> influence, so I would like to ignore any changes done in trash (or
> ignore any changes done by a limited number of users that commit
> there).
> My short question is: what's an easy way to determine the last change
> done in any folder except in trash? I don't mind the form - it can be
> some svn command or some loop in bash/sh, a combination of both, or
> sometheing completely else.
> I'm probably able to write some ruby program that loops over all the
> files and calls svn info on every one of them and then compares
> results, but I'm sure that there's some more elegant solution. I'm a
> complete newbie in both svn and bash.

Use "svn log -v -q" on the directory or URL in question. "-v" shows
you files changed; "-q" doesn't print the log message. When you find
the revision whose changed paths do not include "trash", you'll have
your last changed revision.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-02-16 03:36:09 CET

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.