module loghelper.pyrepo_helper

Inheritance diagram of pyquickhelper.loghelper.pyrepo_helper

Short summary

module pyquickhelper.loghelper.pyrepo_helper

a repository class independent from the repository system (it will be guessed)

source on GitHub

Classes

class

truncated documentation

SourceRepository

Proposes the same functionality independent from the source chosen repository (GIT or SVN). On Windows, it might …

Methods

method

truncated documentation

__init__

get_last_commit_hash

Returns the last commit.

log

Gets the latest changes operated on a file in a folder or a subfolder.

ls

Extracts the content of a location.

nb_commits

Returns the number of commits.

SetGuessedType

Guesses the repository type given a location and changes a member of the class.

version

Gets the latest check in number for a specific path.

Documentation

a repository class independent from the repository system (it will be guessed)

source on GitHub

class pyquickhelper.loghelper.pyrepo_helper.SourceRepository(commandline=True)[source][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.

source on GitHub

Parameters

commandline – use command line or a specific module (like pysvn for example)

source on GitHub

SetGuessedType(location)[source][source]

Guesses the repository type given a location and changes a member of the class.

Parameters

location – location

Returns

module to use

source on GitHub

__init__(commandline=True)[source][source]
Parameters

commandline – use command line or a specific module (like pysvn for example)

source on GitHub

get_last_commit_hash(path=None)[source][source]

Returns the last commit.

Parameters

path – path

Returns

last commit

source on GitHub

log(path=None, file_detail=False)[source][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>

source on GitHub

ls(path)[source][source]

Extracts the content of a location.

Parameters

path – path

Returns

a list

source on GitHub

nb_commits(path=None)[source][source]

Returns the number of commits.

Parameters

path – path to look

Returns

number of commit

source on GitHub

version(path=None)[source][source]

Gets the latest check in number for a specific path.

Parameters

path – path to look

Returns

string or int (check in number)

source on GitHub