Visit Our UNIX and Linux User Community


Beginning svn


 
Thread Tools Search this Thread
Top Forums Programming Beginning svn
# 1  
Old 04-11-2013
Beginning svn

I had hard time to understand svn, and asked my admin who said I was over thinking and recommend remember the 5~6 commands to do as told. But I am so lost when the situation changed a little bit. For example, I am in my local box under my project folder:
Code:
/home/yifangt/svn/

where there are two projects dog and fox:
Code:
/home/yifangt/svn/dog
/home/yifangt/svn/fox

When I came to the dog project and checkout the project from repository (I believe it is somewhere I am not sure, as my admin told me do not need to think of it!)
Say project dog has two scripts
Code:
how_to_hunt_fox.c    how_to_like_cat.c

Code:
/home/yifangt/svn/dog $ svn co svn://svn/dog

I got extra subdirectory named dog again,
Code:
/home/yifangt/svn/dog/dog/

which is actually redundant of dog from the repository. What I expect is to just check out the two files only, but not the whole folder. What did I miss? What should I do?

Thank you!
# 2  
Old 04-19-2013
It is not possible to check-out just a file (of course you can update/re-base with just a single file while inside a working checked-out sandbox).

At the best you can check out a sub-directory from SVN repository of the project. For this:

Do
Code:
 svn info

and you would get many information printed on the console related to the branch repository.

Amongst them there is an URL of the branch repository you sandbox is created of.

Open IE/Mozill FF or any browser and paste and open the URL.

Here you'd be able to see the files/sub-directories of the project inside the SVN repository. Browse and reach to the directory, you want to check-out. Now look at the URL again and copy that (in simplest terms for you).

And issue the command:

Code:
 svn co <https://<theURLYouCopied>>

However just by browsing repository you'd start getting comfortable with SVN itself. This is my hope :-).

Cheer's and don't worry at all !!

:-)

Last edited by Praveen_218; 04-19-2013 at 09:42 AM..
This User Gave Thanks to Praveen_218 For This Post:
# 3  
Old 04-19-2013
svn walk thru

Thanks Praveen!

Still not clear yet, as my environment seems using svn protocol (not quite sure though), as my admin told me to use
Code:
svn co svn://path/something/

But I always got error messages, almost all the time so that I do not know how to start.
Let me start like this: I have two folders csm_at and yifangt under /home/yifangt/svn
I checked there are similar subfolders in each of them, like sources, perl_srcipt, programs etc. Now I want to add a perl script named foo.pl within the perl_script folder under yifangt, how do I start?
Thanks a lot in advance!
YF
# 4  
Old 04-20-2013
You can do:
Code:
$ svn add foo.pl

Then,

Code:
$ svn commit

This User Gave Thanks to Praveen_218 For This Post:
# 5  
Old 04-20-2013
project folder

Thanks Praveen!
Do I need to worry about the project folder perl_script for this file, I mean to include the path? That's one of the parts I feel confused with.
How about if I have the same file in another project e.g: sources but the code is different? Does svn handle that automatically? Thanks a lot!
# 6  
Old 04-21-2013
Quote:
Originally Posted by yifangt
Thanks Praveen!
Do I need to worry about the project folder perl_script for this file, I mean to include the path?
No, you don't need to worry of the path. Inside the sandbox a folder called .svn gets created and has all the information (including navigational information) the SVN needs to correctly check-in your file.

If you do
Code:
 svn commit

inside a given directory all files and it's sub-folders are tested for changes (if any) and those changed are decided to be checked-in and just before this you get an editor (if already set) opened for you, with already populated with information of the files getting checked-in, to enable you to write your final check-in comments.

Quote:
Originally Posted by yifangt
How about if I have the same file in another project e.g: sources but the code is different? Does svn handle that automatically? Thanks a lot!
You don't need to worry at all. It's just like the directory rule in which you can't have two file with same name but can have under different directories and hence path differs (the absolute path can't be same of two entity under the system).

Previous Thread | Next Thread
Test Your Knowledge in Computers #913
Difficulty: Medium
In bash, grep -v -e '^[[:space:]]*$' filename.txt will filter all the blank lines from filename.txt and display the results.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Making post down hook script for svn regarding sending emails after an file is committed in svn

Hi Folks , I am asking this question but i apologise please if this is not the correct forum , I have to develop a shell script that i want to place in at hooks/post-commit , that is basically i have to develop a post hook script and the main functionality of that script would be lets say if... (0 Replies)
Discussion started by: sunsun06060606
0 Replies

2. UNIX for Dummies Questions & Answers

Svn update

dear all after a wile that i was able to update my model with ''svn update'', now i can not update my model with that command:mad:. my model is COAWST please see the following error: $ svn update svn: OPTIONS of 'https://coawstmodel.sourcerepo.com/coawstmodel/COAWST': SSL handshake failed:... (1 Reply)
Discussion started by: komijani
1 Replies

3. Shell Programming and Scripting

Connect to SVN from UNIX

Hi, Can anyone please tell the command to connect to SVN from UNIX? Thanks (1 Reply)
Discussion started by: sampoorna
1 Replies

4. Solaris

How to integrate SVN client to SVN server repository.

Hi, I am new to SVN configuration on Solaris 10.I have installed SVN client version 1.7. bash-3.00# ./svn --version svn, version 1.7.4 (r1295709) compiled Mar 2 2012, 12:59:36 Here my requirement is how to integrate svn client to One of the SVN server repository. My repository... (0 Replies)
Discussion started by: muraliinfy04
0 Replies

5. Shell Programming and Scripting

svn check out

If I am transfering a folder from svn location to my unix server with below command, it is working – svn co svn+ssh://bcvxsvxxnp01.corp.ocwen.com/svn/repos/repos/REALResolution/CalcEngine/CalcEngine\ QA/1852011_CalcEngine_v5.1 But when I do below thing – ... (0 Replies)
Discussion started by: thearpit
0 Replies

6. UNIX for Dummies Questions & Answers

svn question

Hello, This one really stumps me. I checked out a repo to a subdirectory. I created a simple post-commit hook that updates the webserver. A. When I update with the command line everything is fine. B. When I use a GUI program to commit, I get this message in the log: Host key verification... (3 Replies)
Discussion started by: mike628
3 Replies

7. Ubuntu

svn keyrings

Hello, I have a svn account and can use it easly trought Web browser inserting username and passwd. But I get problems when I wanna do the same via shell, here the output that I get: svn --username myusername co https://address/repo/ . Password for '(null)' GNOME keyring: svn: OPTIONS... (0 Replies)
Discussion started by: Dedalus
0 Replies

8. AIX

AIX 6.1 SVN

Can anybody provide me with useful links how to install SVN on AIX 6.1? (10 Replies)
Discussion started by: wwwzviadi
10 Replies

9. Shell Programming and Scripting

SVN activity of certain user

Hi there, I'm looking for some help to get a little script done that shows me (or counts) only the added lines from an SVN repository of one specific user. Anybody has an idea? Thanks, Michael (0 Replies)
Discussion started by: MichaelGiese
0 Replies

10. UNIX for Advanced & Expert Users

Problem with Subversion SVN

Hi, I am trtying to install SVN server with Apache. I have already configured apache with SVN modulesh and the same can be seen in the modules directory. -rwxr-xr-x 1 root root 34740 Jul 3 13:43 mod_authz_svn.so -rwxr-xr-x 1 root root 385133 Jul 3 13:43 mod_dav_svn.so now the... (1 Reply)
Discussion started by: Siddheshk
1 Replies

Featured Tech Videos