The command line client has the following note for checking out files:
/* TODO Fixme: This only works for one repo checkout at a shot. In
CVS, when we checkout one project and give it a destination
directory, it dumps it in the directory. If you check out more
than one, it dumps each project into its own directory *inside*
the one that you specified with the -d flag. So, for example, we
have project A:
A/one_mississippi.txt
A/two_mississippi.txt
A/three_mississippi.txt
And project B:
B/cat
B/dog
B/pig
If I do 'cvs -d :pserver:fitz@subversion.tigris.org:/cvs co -d foo
A', I get the following:
foo/one_mississippi.txt
foo/two_mississippi.txt
foo/three_mississippi.txt
But if I do this 'cvs -d :pserver:fitz@subversion.tigris.org:/cvs
co -d foo A B', I get the following:
foo/A/one_mississippi.txt
foo/A/two_mississippi.txt
foo/A/three_mississippi.txt
foo/B/cat
foo/B/dog
foo/B/pig
Makes sense, right? Right. Note that we have no provision for this
right now and we need to support it. My vote is that we stop
iterating over opt_state->args here and just pass the args into
svn_client_checkout and let it decide what to do based on
(args->nelts == 1) or (args->nelts > 1). -Fitz
*/
Ok, cool. So lets take a shot at figuring out how we can do this.
(and make life simpler for the libsvn_client COM wrapper I've started
on)
How much sense does something like the following make?
(ignoring the part the no actual looping is there yet. The goal of the
below code is to get the same repository state for each checkout.)
diff -u -r1.23 checkout.c
--- checkout.c 2001/08/07 14:55:43 1.23
+++ checkout.c 2001/08/24 07:13:35
@@ -118,9 +118,17 @@
return
svn_error_create(SVN_ERR_CL_MUTUALLY_EXCLUSIVE_ARGS, 0, NULL,
pool,
"Cannot specify _both_ revision and time.");
+ /* When we support multiple checkout targets, they need to
have
+ the same revision number. It may be an optimization to only
+ do this when the number of targets is > 1.
+ You'd think we could use the RA get_latest_revnum(), but
+ that won't work if we're doing checkouts from more than
+ one repository (which we can't really figure out),
+ so use the current time as a work around. */
+ else if (revision == SVN_INVALID_REVNUM)
+ tm = apr_time_now();
/* If only TM is given, convert the time into a revision number.
*/
- else if (tm)
+ if (tm)
SVN_ERR (ra_lib->get_dated_revision (session, &revision, tm));
/* Tell RA to do a checkout of REVISION; if we pass an invalid
Bill
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:36 2006