MCPcopy Create free account
hub / github.com/ActiveState/code / repos

Function repos

recipes/Python/497011_Count_commits/recipe-497011.py:4–16  ·  view source on GitHub ↗

Get the svn repository url

(work_path)

Source from the content-addressed store, hash-verified

2import pysvn, re
3
4def repos(work_path):
5 "Get the svn repository url"
6 info = pysvn.Client().info(work_path)
7
8 if info.repos:
9 return info.repos
10
11 # special case - checked out the trunk
12 if info.url.endswith("/trunk"):
13 return re.sub(r"/trunk$", "", info.url)
14
15 # default to the current dir's url
16 return info.url
17
18def authors(repos):
19 "Get the authors who have commited to the repository, one name per commit"

Callers 1

recipe-497011.pyFile · 0.85

Calls 3

endswithMethod · 0.80
infoMethod · 0.45
subMethod · 0.45

Tested by

no test coverage detected