versioncontrol
Classes and functions to change names of corpus files.
GIT
Bases: VersionController
Implement basic git functionality.
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
|
__init__(gitrepo)
Initialise the GIT class.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
gitrepo |
git.Repo
|
client to control the git repo |
required |
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
77 78 79 80 81 82 83 84 85 |
|
add(path)
Add path to the repo.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
str
|
path that should be added to the git repo. |
required |
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
87 88 89 90 91 92 93 |
|
move(oldpath, newpath)
Move a file within the repo.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
oldpath |
src
|
path of the file that should be moved |
required |
newpath |
scr
|
new path of the file to be moved |
required |
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
95 96 97 98 99 100 101 102 |
|
remove(path)
Remove a file from the repo.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path |
src
|
path of the file that should be removed. |
required |
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
104 105 106 107 108 109 110 |
|
VersionControlError
Bases: Exception
Raise this exception when errors arise in this module.
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
29 30 |
|
VersionController
A very basic version control class.
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
|
__init__()
Initialise the VersionController class.
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
36 37 38 39 40 41 |
|
add(path)
Meta function.
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
43 44 45 |
|
move(oldpath, newpath)
Meta function.
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
47 48 49 |
|
remove(path)
Meta function.
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
51 52 53 |
|
user_email()
Try to get the users email.
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
66 67 68 69 70 71 |
|
user_name()
Try to get a username.
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
55 56 57 58 59 60 61 62 63 64 |
|
vcs(directory)
Make a version control client.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
directory |
str
|
the directory where the working copy is found. |
required |
Returns:
Type | Description |
---|---|
GIT
|
A GIT class instance. |
Raises:
Type | Description |
---|---|
VersionControlError
|
If the given directory is not a git repository |
Source code in /home/anders/projects/CorpusTools/corpustools/versioncontrol.py
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
|