You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Patterson <da...@danpat.net> on 2005/02/14 11:06:50 UTC

svn import --replace??

I've recently had a user ask me if it would be possible to import
a local directory structure over the top of one that already exists
in a Subversion repository, making new revisions of files that alread
exist, and adding ones that don't.

I pointed them to svn_load_dirs.pl, but they weren't keen.  They
wanted to import files over the top without having to create a
working copy.  In this context, Subversion is being used as a versioned
file repository, with the application serving content directly
from the repository, and wanting to update it in the same way.

The user is using the javahl bindings, so only has the functions
exposted by that available.

I've taken a look at the libsvn_client/commit.c functions where
import is implemented.  It looks reasonably easy to add new files,
but it seems to be non-trivial to make modifications to existing
files (the client is expected to be able to calculate a delta?).

Am I correct in this, or would it be easier than to do updates
to existing files using import?

daniel

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import --replace??

Posted by John Peacock <jp...@rowman.com>.
Daniel Patterson wrote:
> I pointed them to svn_load_dirs.pl, but they weren't keen.  They
> wanted to import files over the top without having to create a
> working copy.  In this context, Subversion is being used as a versioned
> file repository, with the application serving content directly
> from the repository, and wanting to update it in the same way.

This is exactly how svk works and I can tell you it is pretty sweet!  It makes 
it so easy to quickly do a bunch of vendor imports (tagging as you go) for a 
project you'd like a little history on.  Then smerge to a local branch and 
you're golden.  It's one of many things that svk does that svn needs to learn to do.

I know, sorry, this doesn't do your javahl people any good now, but I can 
confirm that it is a viable mode of operation.

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4720 Boston Way
Lanham, MD 20706
301-459-3366 x.5010
fax 301-429-5747

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import --replace??

Posted by "C. Michael Pilato" <cm...@collab.net>.
"Dale Worley" <dw...@pingtel.com> writes:

> -----Original Message-----
> From: Daniel Patterson [mailto:danpat@danpat.net]
> 
> I've recently had a user ask me if it would be possible to import
> a local directory structure over the top of one that already exists
> in a Subversion repository, making new revisions of files that alread
> exist, and adding ones that don't.
> ---------------------------------------------------------------------
> 
> If they don't care about history, they could do "svn del http://..."
> followed by "svn import".

Hrm.  The "...making new revisions of files that already exist..." bit
makes me think they care about history.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn import --replace??

Posted by John Peacock <jp...@rowman.com>.
Dale Worley wrote:

> If they don't care about history, they could do "svn del http://..."
> followed by "svn import".

Isn't "history" the whole point of using a version control system in the 
first place (instead of just printing it out and storing it in a stack 
on your desk)???

John

-- 
John Peacock
Director of Information Research and Technology
Rowman & Littlefield Publishing Group
4501 Forbes Boulevard
Suite H
Lanham, MD  20706
301-459-3366 x.5010
fax 301-429-5748

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: svn import --replace??

Posted by Dale Worley <dw...@pingtel.com>.
-----Original Message-----
From: Daniel Patterson [mailto:danpat@danpat.net]

I've recently had a user ask me if it would be possible to import
a local directory structure over the top of one that already exists
in a Subversion repository, making new revisions of files that alread
exist, and adding ones that don't.
---------------------------------------------------------------------

If they don't care about history, they could do "svn del http://..."
followed by "svn import".

Dale


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org