[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Anyone know how to put a file directly into a repository over command line - simulate checkin

From: Ryan Schmidt <subversion-2007b_at_ryandesign.com>
Date: 2007-08-17 10:58:58 CEST

On Aug 17, 2007, at 02:13, Jay Crouch wrote:

> On 8/17/07 2:56 AM, "Ryan Schmidt" wrote:
>> On Aug 16, 2007, at 17:13, Jay Crouch wrote:
>>> Iím writing a web based file system using subversion as the
>>> backend. Have been using svn import command line statements to load
>>> files into the repositories, but import requires any import targets
>>> to be deleted first Ė which breaks revisioning and deltas (i.e. the
>>> whole point of svn).
>>> Anyone know of another method/script/tool to put a file directly
>>> into an svn repository (without deleting first) :: note I do mean
>>> repository, not working copy.
>>> As in Iíve been using:
>>> Svn import file.txt file:///mnt/data/repos/repoid/folder/file.txt
>> As you probably know, the supported method is: get a working copy,
>> modify it, and commit.
>> If you're looking for a way to put files into the repository
>> directly, possibly overwriting any previous version that was there,
>> you may be interested in the "svnput" example:
>> http://svn.collab.net/repos/svn/trunk/tools/examples/svnput.c
>> Be sure to read the warning in the comments at the beginning of the
>> file.
> Question: does this example actually simulate a checkout-checkin in
> that the
> file 'put' is kept in the revision history - and only a delta of
> the changes
> is stored --- or is actually just a simulation of delete-import in
> that the
> new file is not tied to the previous one in the revision history
> and stored
> in its entirety?

I haven't used it, and I'm not sufficiently versed in the Subversion
APIs to tell from the source code whether this is doing a delete-then-
add or whether it's updating the existing file. You could try it out
and see what the log looks like afterward.

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Aug 17 10:58:11 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.