Re: Why does "svn diff" forbid "-rCOMMITTED"?
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-09-20 01:15:45 CEST
cmpilato@collab.net wrote:
First, do we agree on the meaning of COMMITTED?
COMMITTED: the newest revision in which the item was changed before or at the BASE revision. (Therefore a working copy is required. In fact the WC admin data includes the COMMITTED revision number.) In particular, if the WC is not up to date then COMMITTED does not mean the most recently revision of the item in the repository.
PREV: strictly (COMMITTED - 1).
These definitions are not fully stated in the Book or in the built-in help, but are what is implemented.
Second, do you agree that if PREV is allowed then COMMITTED should also be allowed, or conversely if COMMITTED is forbidden then PREV should be forbidden?
COMMITTED and PREV, like BASE and the (implied) WORKING revision types all require access to a working copy. There is a check in subversion/libsvn_client/diff.c (do_diff) that throws an error if a local-type revision is requested on a URL. That checks for BASE and WORKING and probably needs to be extended to cover COMMITTED and PREV as well. I believe that would prevent the problem that you forsee. It would allow COMMITTED to be used with locally-specified paths, just as PREV is already allowed.
Actually, that check is pretty redundant because a sensible error message comes out anyway. PREV with a URL (not checked by do_diff):
~/src/subversion> svn diff -rPREV:HEAD http://svn.collab.net/repos/svn/trunk/HACKING
BASE with a URL (is checked and forbidden by do_diff):
~/src/subversion> svn diff -rBASE:HEAD http://svn.collab.net/repos/svn/trunk/HACKING
I am looking into the whole issue of revision-type keywords. This is just a part of it.
- Julian
---------------------------------------------------------------------
|
This is an archived mail posted to the Subversion Dev mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.