module loghelper.pyrepo_helper
¶
Short summary¶
module pyquickhelper.loghelper.pyrepo_helper
a repository class independent from the repository system (it will be guessed)
Classes¶
class |
truncated documentation |
---|---|
Proposes the same functionality independent from the source chosen repository (GIT or SVN). On Windows, it might … |
Methods¶
method |
truncated documentation |
---|---|
Returns the last commit. |
|
Gets the latest changes operated on a file in a folder or a subfolder. |
|
Extracts the content of a location. |
|
Returns the number of commits. |
|
Guesses the repository type given a location and changes a member of the class. |
|
Gets the latest check in number for a specific path. |
Documentation¶
a repository class independent from the repository system (it will be guessed)
- class pyquickhelper.loghelper.pyrepo_helper.SourceRepository(commandline=True)[source]¶
Bases:
object
Proposes the same functionality independent from the source chosen repository (GIT or SVN).
On Windows, it might help to install either TortoiseSVN or the GitHub application.
- Parameters:
commandline – use command line or a specific module (like pysvn for example)
- SetGuessedType(location)[source]¶
Guesses the repository type given a location and changes a member of the class.
- Parameters:
location – location
- Returns:
module to use
- __init__(commandline=True)[source]¶
- Parameters:
commandline – use command line or a specific module (like pysvn for example)
- get_last_commit_hash(path=None)[source]¶
Returns the last commit.
- Parameters:
path – path
- Returns:
last commit
- log(path=None, file_detail=False)[source]¶
Gets 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
- Returns:
list of changes, each change is a list of tuples: (author, change number (int), date (datetime), comment, full hash, link)
The function uses 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>
- nb_commits(path=None)[source]¶
Returns the number of commits.
- Parameters:
path – path to look
- Returns:
number of commit