INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Jobs

how to extract repository URL given a repository path..any commands?

how to extract repository URL given a repository path..any commands?

how to extract repository URL given a repository path..any commands?

(OP)
Hi All,

We have our svn repository setup here
D:\Data\Repositories\theproject
so the svn configuration files are here (conf, dav, db, hooks, locks etc.)

the url refering to this repository is
http://server/svn/theproject/

I have a post-commit hook that is working just like I want. The post-commit hook has revision and repository path(d:\data\repostiory\xx) available as variables that i can use.
I need to add logging into the post-commit hook.
To get that, I need the URL not the file system path to be able to feed it to svn log -v -r myrevnumber URL
to get the log I need.

Is there any svn command i can use, given file system path to repository, to output its URL?


thanks.

RE: how to extract repository URL given a repository path..any commands?

You could use grep and sed:

CODE --> DOS

svn info | grep "URL: " | sed "s/URL: //" 

grep and sed are not installed by default on windows, but they can freely be downloaded and installed.

If you want to set the result into an environment variable, use the "for" keyword with the /F switch. I know it sounds completely counter-intuitive (and it is), but it is explained here.

+++ Despite being wrong in every important aspect, that is a very good analogy +++
Hex (in Darwin's Watch)

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Resources

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close