-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
common.py: Integrate centralized and reusable testing functionality
- Bugfix for incorrectly managing file-adds in diff. Updated test.
- Loading branch information
Showing
3 changed files
with
171 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
import os | ||
|
||
import svn.common | ||
import svn.local | ||
import svn.remote | ||
|
||
import svn.constants | ||
|
||
def get_client(url_or_path, *args, **kwargs): | ||
if url_or_path[0] == '/': | ||
return svn.local.LocalClient(url_or_path, *args, **kwargs) | ||
else: | ||
return svn.remote.RemoteClient(url_or_path, *args, **kwargs) | ||
|
||
def get_common_for_cwd(): | ||
path = os.getcwd() | ||
uri = 'file://{}'.format(path) | ||
|
||
cc = svn.common.CommonClient(uri, svn.constants.LT_URL) | ||
return cc |
Oops, something went wrong.