module loghelper.repositories.pysvn_helper
¶
Short summary¶
module pyquickhelper.loghelper.repositories.pysvn_helper
Gather all pysvn functionalities here. There might be some differences
between SVN version, pysvn client version, TortoiseSVN version and Python.
If such a case happens, most of the function will call svn
using the command line.
Classes¶
class |
truncated documentation |
---|---|
mimic a svn file |
Functions¶
function |
truncated documentation |
---|---|
private function, tries to find a file |
|
raises an exception |
|
returns the number of commit |
|
get the latest changes operated on a file in a folder or a subfolder |
|
get the latest check in number for a specific path |
|
says if it a repository SVN |
|
run |
Methods¶
method |
truncated documentation |
---|---|
constructor |
|
usual |
Documentation¶
Gather all pysvn functionalities here. There might be some differences
between SVN version, pysvn client version, TortoiseSVN version and Python.
If such a case happens, most of the function will call svn
using the command line.
- pyquickhelper.loghelper.repositories.pysvn_helper.IsRepo(location, commandline=True)[source]¶
says if it a repository SVN
- Parameters:
location – (str) location
commandline – (bool) use commandline or not
- Returns:
bool
- class pyquickhelper.loghelper.repositories.pysvn_helper.RepoFile(**args)[source]¶
Bases:
object
mimic a svn file
constructor
- Parameters:
args – list of members to add
- pyquickhelper.loghelper.repositories.pysvn_helper.__get_version_from_version_txt(path)[source]¶
private function, tries to find a file
version.txt
which should contains the version number (if svn is not present)- Parameters:
path – folder to look, it will look to the the path of this file, some parents directories and finally this path
- Returns:
the version number
Warning
If
version.txt
was not found, it throws an exception.
- pyquickhelper.loghelper.repositories.pysvn_helper.get_master_location(path=None, commandline=True)[source]¶
raises an exception
- pyquickhelper.loghelper.repositories.pysvn_helper.get_nb_commits(path=None, commandline=True)[source]¶
returns the number of commit
- Parameters:
path – path to look
commandline – if True, use the command line to get the version number, otherwise it uses pysvn
- Returns:
integer
- pyquickhelper.loghelper.repositories.pysvn_helper.get_repo_log(path=None, file_detail=False, commandline=True)[source]¶
get the latest changes operated on a file in a folder or a subfolder
- Parameters:
path – path to look
file_detail – if True, add impacted files
commandline – if True, use the command line to get the version number, otherwise it uses pysvn
- Returns:
list of changes, each change is a list of 4-uple: - author - change number (int) - date (datetime) - comment
The function use a command line if an error occurred. It uses the xml format:
<logentry revision="161"> <author>xavier dupre</author> <date>2013-03-23T15:02:50.311828Z</date> <msg>pyquickhelper: first version</msg> </logentry>
When a path includes a symbol
@
, another one must added to the path to avoid the following error to happen:svn: E205000: Syntax error parsing peg revision 'something@somewhere.fr-'
- pyquickhelper.loghelper.repositories.pysvn_helper.get_repo_version(path=None, commandline=True, log=False)[source]¶
get the latest check in number for a specific path
- Parameters:
path – path to look
commandline – if True, use the command line to get the version number, otherwise it uses pysvn
log – if True, returns the output instead of a boolean
- Returns:
integer (check in number)
When a path includes a symbol
@
, another one must added to the path to avoid the following error to happen:svn: E205000: Syntax error parsing peg revision 'something@somewhere.fr-'
- pyquickhelper.loghelper.repositories.pysvn_helper.repo_ls(full, commandline=True)[source]¶
run
ls
on a path- Parameters:
full – full path
commandline – use command line instead of pysvn
- Returns:
output of client.ls
When a path includes a symbol
@
, another one must added to the path to avoid the following error to happen:svn: E205000: Syntax error parsing peg revision 'something@somewhere.fr-'