You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Vadym Chepkov <ch...@yahoo.com> on 2009/11/29 21:33:44 UTC

Add a file directly to repository

Hi,

Is there a way to add file directly to a repository without having to checkout directory first ?

If I try to import just one file I get error "path already exist".

Thank you,
Vadym

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2425290

Please start new threads on the <us...@subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <us...@subversion.apache.org>.

Re: Add a file directly to repository

Posted by Thomas Harold <th...@nybeta.com>.
On 11/30/2009 9:08 AM, Vadym Chepkov wrote:
>>
>> You can try to checkout empty directory, then add the relevant file and
>> commit.
>>
>
> I know I can, I asked if  there is a shortcut to avoid it.
> I am a  system administrator and I use subversion to manage scripts I wrote for maintenance. It would be very convenient on my part to just issue something like this:
> svn add /usr/local/sbin/spamd.watch http://svn/repo/sbin/
>

You may want to look into FSVS instead, which is a useful front-end for 
that sort of thing.  (http://fsvs.tigris.org - not associated with the 
Subversion project)

I use FSVS on all of the servers that I manage and it lets us keep track 
of all changes made to the server.  Storing the results in an SVN 
repository on the back end.  Once you've configured everything (not too 
terribly hard), keeping track of a change becomes as simple as:

fsvs ci -m "adjusted spamd watch" /usr/local/sbin

Which would pickup any files that changed in /usr/local/sbin.

If I need to track something down, I have read-only access (not a 
requirement, just my preference) to the SVN repository on my laptop. 
Where I can checkout, diff, view the history using TortoiseSVN.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2425504

Please start new threads on the <us...@subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <us...@subversion.apache.org>.

Re: Add a file directly to repository

Posted by Vadym Chepkov <ch...@yahoo.com>.
--- On Sun, 12/6/09, Talden <ta...@gmail.com> wrote:

> > ...There is a Subverison client tool that is often not
> built and
> > distributed along with the other client binaries.
> >
> > svnmucc (SVN Multiple Url Command Client).
> >

Thank you, this is exactly what I was asking for. Now I need to convince Fedora package maintainer to include it in the RPM :)

Vadym

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2428065

Please start new threads on the <us...@subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <us...@subversion.apache.org>.

Re: Add a file directly to repository

Posted by Talden <ta...@gmail.com>.
On Mon, Dec 7, 2009 at 4:06 PM, Talden <ta...@gmail.com> wrote:
> On Tue, Dec 1, 2009 at 3:08 AM, Vadym Chepkov <ch...@yahoo.com> wrote:
>>>
>>> You can try to checkout empty directory, then add the relevant file and
>>> commit.
>>>
>>
>> I know I can, I asked if  there is a shortcut to avoid it.
>> I am a  system administrator and I use subversion to manage scripts I wrote for maintenance. It would be very convenient on my part to just issue something like this:
>> svn add /usr/local/sbin/spamd.watch http://svn/repo/sbin/
>
> Coming to the discussion a little delayed but...
>
> ...There is a Subverison client tool that is often not built and
> distributed along with the other client binaries.
>
> svnmucc (SVN Multiple Url Command Client).
>
> This tool lets you put a file on the server directly and is compiled
> and distributed as part of (at least) SlikSVN.
>
> $ svnmucc put /usr/local/sbin/spamd.watch
> http://svn/repo/sbin/spamd.watch -m "doing stuff"
>
> That will add it if it's missing and modify it if it already exists.
>
> You can do some quite complex tree restructures that just don't work
> with a checkout.

I should add... You'll need to find the binary (or build it from
Subversion source) for your platform

--
Talden

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2427699

Please start new threads on the <us...@subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <us...@subversion.apache.org>.

Re: Add a file directly to repository

Posted by Talden <ta...@gmail.com>.
On Tue, Dec 1, 2009 at 3:08 AM, Vadym Chepkov <ch...@yahoo.com> wrote:
>>
>> You can try to checkout empty directory, then add the relevant file and
>> commit.
>>
>
> I know I can, I asked if  there is a shortcut to avoid it.
> I am a  system administrator and I use subversion to manage scripts I wrote for maintenance. It would be very convenient on my part to just issue something like this:
> svn add /usr/local/sbin/spamd.watch http://svn/repo/sbin/

Coming to the discussion a little delayed but...

...There is a Subverison client tool that is often not built and
distributed along with the other client binaries.

svnmucc (SVN Multiple Url Command Client).

This tool lets you put a file on the server directly and is compiled
and distributed as part of (at least) SlikSVN.

$ svnmucc put /usr/local/sbin/spamd.watch
http://svn/repo/sbin/spamd.watch -m "doing stuff"

That will add it if it's missing and modify it if it already exists.

You can do some quite complex tree restructures that just don't work
with a checkout.

--
Talden

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2427698

Please start new threads on the <us...@subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <us...@subversion.apache.org>.

Re: Add a file directly to repository

Posted by Vadym Chepkov <ch...@yahoo.com>.
> 
> You can try to checkout empty directory, then add the relevant file and
> commit.
> 

I know I can, I asked if  there is a shortcut to avoid it.
I am a  system administrator and I use subversion to manage scripts I wrote for maintenance. It would be very convenient on my part to just issue something like this:
svn add /usr/local/sbin/spamd.watch http://svn/repo/sbin/
 
Thanks,
Vadym

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2425495

Please start new threads on the <us...@subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <us...@subversion.apache.org>.

Re: Add a file directly to repository

Posted by Andrey Repin <an...@freemail.ru>.
Greetings, Vadym Chepkov!

> Is there a way to add file directly to a repository without having to checkout directory first ?

> If I try to import just one file I get error "path already exist".

You can try to checkout empty directory, then add the relevant file and
commit.


--
WBR,
 Andrey Repin (anrdaemon@freemail.ru) 30.11.2009, <3:55>

Sorry for my terrible english...

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2425315

Please start new threads on the <us...@subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <us...@subversion.apache.org>.

Re: Add a file directly to repository

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 29, 2009, at 15:33, Vadym Chepkov wrote:

> Is there a way to add file directly to a repository without having to checkout directory first ?
> 
> If I try to import just one file I get error "path already exist".

You shouldn't get the message "path already exists" unless the path already exists. In other words, it sounds like you're using the wrong path in your import command if you're trying to add a new file to the repository.

If you're trying to replace an existing file in the repository, you'll either have to check out a working copy (which could be sparse), replace the file, then commit, or use "svnmucc put". svnmucc is included with the Subversion source distribution but not installed by default.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2425342

Please start new threads on the <us...@subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <us...@subversion.apache.org>.