OpenQuizz
Une application de gestion des contenus pédagogiques
|
Data Structures | |
class | Actor |
class | BlockingLockFile |
class | CallableRemoteProgress |
class | IndexFileSHA1Writer |
class | Iterable |
class | IterableList |
class | LockFile |
class | NullHandler |
class | RemoteProgress |
class | Stats |
Functions | |
def | unbare_repo (func) |
def | cwd (new_dir) |
def | rmtree (path) |
def | rmfile (path) |
def | stream_copy (source, destination, chunk_size=512 *1024) |
def | join_path (a, *p) |
def | to_native_path_windows (path) |
def | to_native_path_linux (path) |
def | join_path_native (a, *p) |
def | assure_directory_exists (path, is_file=False) |
def | py_where (program, path=None) |
def | cygpath (path) |
See: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx and: https://www.cygwin.com/cygwin-ug-net/using.html#unc-paths. More... | |
def | decygpath (path) |
def | is_cygwin_git (git_executable) |
def | get_user_id () |
def | finalize_process (proc, **kwargs) |
def | expand_path (p, expand_vars=True) |
Variables | |
log | |
HIDE_WINDOWS_KNOWN_ERRORS | |
HIDE_WINDOWS_FREEZE_ERRORS | |
to_native_path | |
def git.util.assure_directory_exists | ( | path, | |
is_file = False |
|||
) |
Assure that the directory pointed to by path exists. :param is_file: If True, path is assumed to be a file and handled correctly. Otherwise it must be a directory :return: True if the directory was created, False if it already existed
def git.util.cwd | ( | new_dir | ) |
def git.util.cygpath | ( | path | ) |
See: https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx and: https://www.cygwin.com/cygwin-ug-net/using.html#unc-paths.
Use :meth:`git.cmd.Git.polish_url()` instead, that works on any environment.
def git.util.decygpath | ( | path | ) |
def git.util.expand_path | ( | p, | |
expand_vars = True |
|||
) |
def git.util.finalize_process | ( | proc, | |
** | kwargs | ||
) |
Wait for the process (clone, fetch, pull or push) and handle its errors accordingly
def git.util.get_user_id | ( | ) |
:return: string identifying the currently active system user as name@node
def git.util.is_cygwin_git | ( | git_executable | ) |
def git.util.join_path | ( | a, | |
* | p | ||
) |
Join path tokens together similar to osp.join, but always use '/' instead of possibly '\' on windows.
def git.util.join_path_native | ( | a, | |
* | p | ||
) |
As join path, but makes sure an OS native path is returned. This is only needed to play it safe on my dear windows and to assure nice paths that only use '\'
def git.util.py_where | ( | program, | |
path = None |
|||
) |
def git.util.rmfile | ( | path | ) |
Ensure file deleted also on *Windows* where read-only files need special treatment.
def git.util.rmtree | ( | path | ) |
Remove the given recursively. :note: we use shutil rmtree but adjust its behaviour to see whether files that couldn't be deleted are read-only. Windows will not remove them in that case
def git.util.stream_copy | ( | source, | |
destination, | |||
chunk_size = 512 * 1024 |
|||
) |
Copy all data from the source stream into the destination stream in chunks of size chunk_size :return: amount of bytes written
def to_native_path_linux | ( | path | ) |
def git.util.to_native_path_windows | ( | path | ) |
def git.util.unbare_repo | ( | func | ) |
Methods with this decorator raise InvalidGitRepositoryError if they encounter a bare repository
HIDE_WINDOWS_FREEZE_ERRORS |
HIDE_WINDOWS_KNOWN_ERRORS |
log |
to_native_path |