aspose file tools*
The moose likes Linux / UNIX and the fly likes windows connecting to subversion server on linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "windows connecting to subversion server on linux" Watch "windows connecting to subversion server on linux" New topic
Author

windows connecting to subversion server on linux

K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2584
    
    9

Hi there, I set up subversion on my CentOS linux server at the path "/svn/test". I start the subversion on the linux server using "svnserve -d" as a daemon. Now when I try to connect to it using my windows computer by "svn://<ip address>/..." it didn't connect. Then I also set up WebDAV so that I can use "http://<ip address>/..." again this failed. Do I also need samba to get subversion to work?

Also if I use the http protocol, what goes in the "..." section. Suppose I have a project/directory call "test" I want to checkout to the subversion server. Do I do "http://<ip address>/test"? Would this possibly conflict with the /var/www/html directories?

Any ideas? Thanks in advance.


K. Tsang JavaRanch SCJP5 SCJD/OCM-JD OCPJP7 OCPWCD5 OCPBCD5
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

For running with the svnserver, check that the port is open in the firewall.

For using within HTTP, within the httpd.conf file you should have specified something like this:



In which case the URL is http://hostname/repos

You can find out more information by reading the Subversion docs - they have clear guidelines for setting up the server within Apache.


JBoss In Action
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16228
    
  21

Although the matter is open to debate, probably a more appropriate location according to the latest LFS would be "/srv/svn/test". But I should talk. I'm still stuck on /usr/local/svn. Which is definitely not recommended anymore.

I've found Apache to be better as a Subversion server than simply running a standalone server. Besides, you can browse source in a web browser.

You don't want to Samba-share the repository. It's a security risk and unless I'm mistaken, any attempt to update from a network share could result in file-locking problems (or problems due to lack of file-locking!). Windows locks files by name. Linux locks by inode.


Customer surveys are for companies who didn't pay proper attention to begin with.
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2584
    
    9

Thanks Peter and Tim, I will try it out and let you guys know if I connect.
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2584
    
    9

OK after I play with some more, I'm able to connect to the server. But when I try to put (import) files to it, it prompt "no repository found in <location>". I'm currently using svn://

This is what I did on the linux server:


On windows I have a folder "test" with file "test.java". I use TortoiseSVN. When I import and point the "url of repository" to "svn://hostname/test" => I get "no repository found" error.

However when I open the repo-browser and point it to "svn://hostname/test" I DID NOT get connection error and get empty screen. So how do I rid of this error? I know that once imported, I should do a checkout to get a versioned copy of the files.

Thanks in advance.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5842
    
    7

Try:

svnserve -d --root /svn/test

or maybe it is:

svnserve -d --root /svn
K. Tsang
Bartender

Joined: Sep 13, 2007
Posts: 2584
    
    9

Thanks Pete, I got it to work. Given my path is /svn/test; if I set the -root then I typed svn://<hostname>/test, otherwise I type svn://<hostname>/svn/test.

Now say I have several projects, each have its own repo. Then I would need to "svnadmin create /svn/projx" where x are 1,2,3... Now each repo has its own config file in the config directory. Is it possible to use a single config file?

I don't really want to have one big repo and create many project sub-directories.

OK while I'm at it, for http access, I have set up my httpd.conf with that <Location /svn/test> tags so that I should able to connect like "http://<hostname>/svn/test". Now when I tried to connect using the SVN repo-browser, it refuses because the /svn/test directory owner/group isn't apache content. On linux when I do "ls -Z" I get "root root root: object_r:default_t" now for directories under /var/www/html I have "root root root: object_r:httpd_sys_content_t".

So how can I change that ...default_t to ...httpd_sys_content_t? BTW changing the owner to apache alone doesn't help. OK figured this out chcon command.

Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: windows connecting to subversion server on linux