Garrett Rooney wrote:
> + if ((peg_revision->kind == svn_opt_revision_base
> + || peg_revision->kind == svn_opt_revision_committed
> + || peg_revision->kind == svn_opt_revision_previous)
> + && targets->nelts == 1)
I feel the logic for validating and handling a peg ought to be common among
many commands, and factored out. If you could have a bit of a look for such
commonality, that would be great.
Note also that "@PREV" is not a valid peg specifier: "local/path@PREV" would
imply looking up "local_path" in a revision which does not exist in the local
file system (and "URL@PREV" is obviously invalid). Similarly, we can decree
that "@COMMITTED" is not valid (even though it identifies a tree in which the
item was at the same location as it is now). Only "@BASE" and (implied)
"@WORKING" are valid pegs on a local path. I've been meaning to write up a
specification for peg revisions that states this. This might simplify your
conditional expression.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed May 17 21:52:24 2006