How to get svn remote repository URL?

Svn

Svn Problem Overview


I have an svn working copy on my local system. I want to get the remote repository URL. Is there some command for doing this?

Svn Solutions


Solution 1 - Svn

Try:

svn info .

This should give some information about the current working copy, including the remote URL.

From the manual, an example output is:

$ svn info foo.c  
Path: foo.c  
Name: foo.c  
URL: http://svn.red-bean.com/repos/test/foo.c  
Repository Root: http://svn.red-bean.com/repos/test  
Repository UUID: 5e7d134a-54fb-0310-bd04-b611643e5c25  
Revision: 4417  
Node Kind: file  
Schedule: normal  
Last Changed Author: sally  
Last Changed Rev: 20  
Last Changed Date: 2003-01-13 16:43:13 -0600 (Mon, 13 Jan 2003)  
Text Last Updated: 2003-01-16 21:18:16 -0600 (Thu, 16 Jan 2003)  
Properties Last Updated: 2003-01-13 21:50:19 -0600 (Mon, 13 Jan 2003)  
Checksum: d6aeb60b0662ccceb6bce4bac344cb66  

Solution 2 - Svn

Try this:

svn info | grep URL | sed  's/URL: //g'

Solution 3 - Svn

As of Subversion 1.9 you can now request a specific item from svn info.

svn info --show-item=url

This will output only the remote url. To get rid of the newline at the end, add this extra option:

svn info --show-item=url --no-newline

Solution 4 - Svn

svn info | grep 'URL' | awk '{print $NF}'

where awk $NF prints only the last column in a record

Solution 5 - Svn

svn info | grep ^URL: | sed  's/URL: //g'

Solution 6 - Svn

If you have installed Tortoise SVN . Just Right click inside your SVN repo and look for "repo browser". Hope it helps

Solution 7 - Svn

Adding to other answers. When you want to get the repository URL of your working copy, you can run the following PowerShell snippet:

([xml](svn info --xml)).info.entry.URL

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionmlzboyView Question on Stackoverflow
Solution 1 - SvnGrhmView Answer on Stackoverflow
Solution 2 - SvnPakerView Answer on Stackoverflow
Solution 3 - SvnSam BuchmillerView Answer on Stackoverflow
Solution 4 - SvnJonathan LView Answer on Stackoverflow
Solution 5 - SvnLincolnView Answer on Stackoverflow
Solution 6 - SvnMasoodView Answer on Stackoverflow
Solution 7 - SvnbahrepView Answer on Stackoverflow