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

Re: adding something to svn

From: Kevin Grover <kevin_at_kevingrover.net>
Date: Fri, 25 Jul 2008 11:13:27 -0700

On Fri, Jul 25, 2008 at 3:08 AM, N D <niranjan8712_at_gmail.com> wrote:

> yes i am using the svn copy WC URL syntax
> in my case wc is inside a dir called trunk
> and the url is a server https://xx.xx.xx.xxx/abc/xyz/
> so i want to commit contents from the local trunk dir to the url i mention
> in the URL part of the command
>
> you shared this: svn copy wc
> file:///r:/projects/repos/fxbt/tags/fxbt_1.1.0
> here is wc a keyword :)? stupid queston right :)
>

WC (in this context) means a reference to something in your working copy.

If you list 'explicit' examples (obscuring machine
address/passwords/filenames to protect privacy) AND the output generated it
will be _much_ easier to help you.

I can not spend anymore time trying to guess what you mean from paragraph
explanations and then writing answers to all possibilities.

>
> Assuming this folder structure c:/some_dir/trunk and i am one step above as
> u said this should work-
> c:/some_dir>svn copy file:// URL_to_commit_the_contents_to
> is there a need to append anyting after file://, like file://trunk?
>

This is almost an explicit example.

file:// is not a legal URL, and even if it were complete it would referent
something you your repository, not a working copy.

Other way, if you use the URL syntax (for that reference) it does not matter
where in your file system you are (e.g. your current directory) when you
issue it, because it EXPLICITLY references the repository. HOWEVER, if you
use any sort of WC reference, it matters: you MUST be in a WC (working copy)
and then the WC references files or directories there.

In your example, assuming c:\some_dir is the working copy, you could

cd c:
cd some_dir
svn copy trunk URL_to_commit_the_contents_to

However, since this is a WC reference any uncommitted changed currently in
trunk (this WC) will be committed to the copy.

As a learning tool, I would recommend you make a copy of your repo (or
create a test repo) and TRY the commands on that copy. You can proved to
yourself how commands will work before using them on a real, live,
repository. In this way, you can also post actual error messages for real
help (and you don't have to worry about messing up your real repository).

>
>
> On 7/24/08, Eric Lee <eric_at_myprojects.srhost.info> wrote:
>>
>> Hi,
>>
>> It seems that you need to copy using svn copy WC URL syntax, right ?
>>
>> Say you are currently in working copy [wc].
>>
>> c:\projects\wc>
>>
>> Please go one level up, and type in the copy sub-command
>>
>> c:\projects\wc> cd ..
>> c:\projects\> svn copy wc file:///r:/projects/repos/fxbt/tags/fxbt_1.1.0
>>
>>
>> Eric,
>>
>> ----------------------------------------------------
>> Get subversion, phpBB 3
>> http://svnbook.red-bean.com
>> http://myprojects.srhost.info
>> eric[at]myprojects[dot]srhost[dot]info
>>
>> ----- Original Message -----
>> *From:* N D <niranjan8712_at_gmail.com>
>> *To:* Kevin Grover <kevin_at_kevingrover.net>
>> *Cc:* Eric Lee <eric_at_myprojects.srhost.info> ;
>> users_at_subversion.tigris.org
>> *Sent:* Friday, July 25, 2008 4:15 AM
>> *Subject:* Re: adding something to svn
>>
>>
>> Buddy, I have read most of the relevant parts of the manual. :)
>> Was stressed out, so perhaps could not frame the question!! appologies fr
>> that
>>
>> the current question is: m running svn copy file:///trunk<url_fr_new_branch>
>> whn i do so, i am gettting some error 'the src and the dest do not appear
>> from the same repository" even if as the WC is from the svn itself.
>> i have tried using the svn copy URL URL flavour of the command, but the
>> svn WC URL is not working.
>>
>>
>>
>> On Thu, Jul 24, 2008 at 7:17 PM, Kevin Grover <kevin_at_kevingrover.net>
>> wrote:
>>
>>>
>>> On Thu, Jul 24, 2008 at 9:56 AM, Eric Lee <eric_at_myprojects.srhost.info>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'am not sure how your folders are construct.
>>>> But here may be help.
>>>>
>>>>
>>>> If you need to add files to repository.
>>>> You have two chooses.
>>>>
>>>> 1.) import
>>>> c:\> cd wc
>>>> c:\wc> dir
>>>>
>>>> Directory of R:\temp\wc\phpbb
>>>>
>>>> 07/23/2008 05:07a <DIR> .
>>>> 07/23/2008 05:07a <DIR> ..
>>>> 07/23/2008 05:04a <DIR> svn
>>>>
>>>> c:\wc> svnadmin create [path-to-repos]
>>>> c:\wc> svn import -m "initial imports" svn svn://localhost/repos/svn
>>>>
>>>>
>>>> ---
>>>>
>>>> 2.) add files
>>>>
>>>> c:\wc> svnadmin create [path-to-repos]
>>>> c:\wc> svn mkdir svn://localhost/repos/svn
>>>> c:\wc> svn co svn://localhost/repos/svn svn
>>>> c:\wc> dir
>>>>
>>>> Directory of c:\wc>
>>>>
>>>> 07/23/2008 05:07a <DIR> .
>>>> 07/23/2008 05:07a <DIR> ..
>>>> 07/23/2008 05:04a <DIR> svn
>>>>
>>>> c:\wc> cd svn
>>>> c:\wc\svn> echo some-text > file1.txt
>>>> c:\wc\svn> svn add file1.txt
>>>>
>>>> c:\wc\svn> svn status
>>>> A file1.txt
>>>>
>>>> c:\wc\svn> svn commit -m "added a new files"
>>>>
>>>> Wish this help,
>>>>
>>>>
>>>> Eric,
>>>>
>>>>
>>>> ----------------------------------------------------
>>>> Get subversion, phpBB 3
>>>> http://svnbook.red-bean.com
>>>> http://myprojects.srhost.info
>>>> eric[at]myprojects[dot]srhost[dot]info
>>>>
>>>> ----- Original Message -----
>>>> *From:* N D <niranjan8712_at_gmail.com>
>>>> *To:* users_at_subversion.tigris.org
>>>> *Sent:* Friday, July 25, 2008 12:15 AM
>>>> *Subject:* adding something to svn
>>>>
>>>>
>>>> Hi all,
>>>>
>>>> I make a dir using svn mkdir.
>>>> I want to add the contents of the working copy to this newly created
>>>> directory.
>>>>
>>>> as far as i saw the svn manual, i saw "svn add files" i did not find
>>>> anything like this "svn add <source> <URL_at_svn_repo>"
>>>>
>>>> is right now, my working copy is pointing to vx_v_z_abc and i want to to
>>>> commit the contents of the working dir to the dir that i switched to using
>>>> the svn switch command. will svn commit serve the purpose? so in short
>>>> <local copy of vx_v_z_abc> to be commited to vx_v_z_abc in svn, will
>>>> this happen if i just say svn commit -m "messge" will the wroking copy land
>>>> in directory vx_v_z_abc???
>>>>
>>>> --
>>>> Regards,
>>>> Niranjan Deshpande
>>>>
>>>> "Shut yourself from the world and create the reality you want"
>>>>
>>>>
>>>
>>> You don't want to run 'svnadmin create' twice.
>>>
>>> Also, note to newbies: svn creates a directy called '.svn' in working
>>> copies (which if often hidden, but not always). This is different from, and
>>> should not be confused with the user created 'svn' (no leading dot) in the
>>> above example.
>>>
>>> Scripted examples would probably be more useful using file:// (so anyone
>>> could run them).
>>>
>>> I read the original post, but could not figure out what the real question
>>> was. At first glance, it seems the OP does not understand the difference
>>> between a WC and a REPO. Rather than think too hard about it, I just
>>> ignored the question.
>>>
>>> To the OP (Original Poster): First advice: read the manual (
>>> http://svnbook.org). Second advice: when asking for help, show exact
>>> commands, what reponse you recieved, and what you expected. (See:
>>> http://www.catb.org/~esr/faqs/smart-questions.html<http://www.catb.org/%7Eesr/faqs/smart-questions.html>
>>> )
>>>
>>>
>>>
>>>
>>
>>
>>
>> --
>> Regards,
>> Niranjan Deshpande
>>
>> "Shut yourself from the world and create the reality you want"
>>
>>
>
>
> --
> Regards,
> Niranjan Deshpande
>
> "Shut yourself from the world and create the reality you want"
>
Received on 2008-07-25 20:13:59 CEST

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.