4

When I run the SVN command 'svn info path', the SVN command line client (v1.8.4) spits out (among other things) a 'Working Copy Root Path'.

How would I get this same information using pysvn? Seems like it should be available using the either pysvn.Client.info() or pysvn.Client.info2(), but it doesn't seem to me that it's there.

tabishm
  • 43
  • 5

1 Answers1

1

Unfortunately it seems like, even nine years later, there's still no way to directly get the wc-root via pysvn. The only way I've found to do it is with the svn command line client. Something like:

def get_working_copy_root(path="."):
    return subprocess.check_output(["svn", "info", "--show-item", "wc-root", path]).decode("utf-8").strip()
ACK_stoverflow
  • 3,148
  • 4
  • 24
  • 32
  • 1
    I don't recall the exact context on why I asked this question nine years ago, but to the best of my recollection I ended up doing something similar to work around this. Thanks for the answer! – tabishm Aug 31 '23 at 00:12