On Mon, 20 Feb 2006, Kamesh Jayachandran wrote:
> svn -r rev find repos_url/path [expression]
>
> When -r argument is not given HEAD is assumed.
I would like a find command that works across all revisions. For
example, I want to be able to get answers to questions like "Did the
repository ever contain a file with a name that patches <regexp>, and if
so, in which revisions and paths was it created/copied/deleted/renamed?"
I'd suggest adding some sort of revision number calculus to the find
expression itself. For example, "-revision N" to match revision N,
"-revision N:M" to match any revision in the range N to M (inclusive),
"-revision +N" to match any revision greater then N, and "-revision -N"
to match any revision less than N.
If you also add some primaries like "-created", "-copied", "-modified",
"-deleted" to check whether those actions took place to the file in the
revision under condideration, and "-printrevpath" to print the revision
number and path, then my quetion above could be framed as
svn find "${URL}" -regex "${REGEX}" \( -created -o -copied -o
-deleted \) -printrevpath
A similar question, restricted to revisions from 200 to 300, could be
framed either as
svn find "${URL}" -revision 200:300 -regex "${REGEX}"
\( -created -o -copied -o -deleted \) -printrevpath
or
svn find "${URL}" \( -revision +199 -revision -301 \) -regex
"${REGEX}" \( -created -o -copied -o -deleted \) -printrevpath
Conceptually, the find would have an outer loop that traverses all
revisions, and an inner loop that recurses over all paths within the
revision under consideration, and evaluates the expression for each
{revision,path} pair. If analysis of the command line args can be
used to prove that some of the work can be skipped, then of course the
implementation should be free to skip the unnecessary work.
--apb (Alan Barrett)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Feb 20 10:33:51 2006