skilleter-thingy 0.0.78__tar.gz → 0.0.79__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of skilleter-thingy might be problematic. Click here for more details.
- {skilleter_thingy-0.0.78/skilleter_thingy.egg-info → skilleter_thingy-0.0.79}/PKG-INFO +23 -23
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/README.md +22 -22
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/pyproject.toml +2 -2
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/multigit.py +42 -9
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/git2.py +7 -2
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/xchmod.py +4 -5
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79/skilleter_thingy.egg-info}/PKG-INFO +23 -23
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy.egg-info/entry_points.txt +1 -1
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/LICENSE +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/setup.cfg +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/__init__.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/addpath.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/borger.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/box.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/console_colours.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/diskspacecheck.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/docker_purge.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/ffind.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/ggit.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/ggrep.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/git_br.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/git_ca.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/git_cleanup.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/git_co.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/git_common.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/git_hold.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/git_mr.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/git_parent.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/git_review.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/git_update.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/git_wt.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/gitcmp_helper.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/gitprompt.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/gl.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/gphotosync.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/linecount.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/moviemover.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/photodupe.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/phototidier.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/py_audit.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/readable.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/remdir.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/rmdupe.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/rpylint.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/splitpics.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/strreplace.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/sysmon.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/tfm.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/tfparse.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/__init__.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/colour.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/dc_curses.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/dc_defaults.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/dc_util.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/dircolors.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/docker.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/files.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/git.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/gitlab.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/path.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/popup.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/process.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/run.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/tfm_pane.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/tidy.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/venv_template.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/trimpath.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/venv_create.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/window_rename.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/yamlcheck.py +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy.egg-info/SOURCES.txt +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy.egg-info/dependency_links.txt +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy.egg-info/requires.txt +0 -0
- {skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: skilleter_thingy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.79
|
|
4
4
|
Summary: A collection of useful utilities, mainly aimed at making Git more friendly
|
|
5
5
|
Author-email: John Skilleter <john@skilleter.org.uk>
|
|
6
6
|
Project-URL: Home, https://skilleter.org.uk
|
|
@@ -37,11 +37,11 @@ This README just contains a summary of the functionality of each command.
|
|
|
37
37
|
|
|
38
38
|
## ggit
|
|
39
39
|
|
|
40
|
-
Run a git command in all
|
|
40
|
+
Run a git command in all working trees under the current directory (note that this is not related to multigit (see below)).
|
|
41
41
|
|
|
42
42
|
## ggrep
|
|
43
43
|
|
|
44
|
-
Run 'git grep' in all repos under the current directory
|
|
44
|
+
Run 'git grep' in all repos under the current directory (note that this is not related to multigit (see below)).
|
|
45
45
|
|
|
46
46
|
## gitprompt
|
|
47
47
|
|
|
@@ -53,15 +53,11 @@ Improved version of 'git commit --amend'. Updates files that are already in the
|
|
|
53
53
|
|
|
54
54
|
## git cleanup
|
|
55
55
|
|
|
56
|
-
List or delete branches that have already been merged and delete tracking branches that are no longer on
|
|
56
|
+
List or delete branches that have already been merged and delete tracking branches that are no longer on the remote.
|
|
57
57
|
|
|
58
58
|
## git co
|
|
59
59
|
|
|
60
|
-
Equivalent to 'git checkout' but with intelligent branch matching
|
|
61
|
-
|
|
62
|
-
## git mr
|
|
63
|
-
|
|
64
|
-
Push a feature branch to GitLab and create a merge request
|
|
60
|
+
Equivalent to 'git checkout' but with intelligent branch matching, so specifying a partial branch name will work if it uniquely matches an existing branch
|
|
65
61
|
|
|
66
62
|
## git parent
|
|
67
63
|
|
|
@@ -83,21 +79,21 @@ Console-based git change review tool.
|
|
|
83
79
|
|
|
84
80
|
Manage a collection of related git repoitories.
|
|
85
81
|
|
|
86
|
-
|
|
82
|
+
## GitLab Commands
|
|
87
83
|
|
|
88
|
-
|
|
84
|
+
### git mr
|
|
89
85
|
|
|
90
|
-
|
|
86
|
+
Push a feature branch to GitLab and create a merge request
|
|
91
87
|
|
|
92
|
-
|
|
88
|
+
### gl
|
|
93
89
|
|
|
94
|
-
|
|
90
|
+
Command line for GitLab
|
|
95
91
|
|
|
96
|
-
|
|
92
|
+
# General Commands
|
|
97
93
|
|
|
98
|
-
|
|
94
|
+
## addpath
|
|
99
95
|
|
|
100
|
-
|
|
96
|
+
Update a $PATH-type variable by adding or removing entries.
|
|
101
97
|
|
|
102
98
|
## docker-purge
|
|
103
99
|
|
|
@@ -143,7 +139,7 @@ Simple search and replace utility for those times when trying to escape characte
|
|
|
143
139
|
|
|
144
140
|
## tfm
|
|
145
141
|
|
|
146
|
-
Console-based file-manager, similar to Midnight Commander but better.
|
|
142
|
+
Console-based file-manager, similar to Midnight Commander but aiming to be better.
|
|
147
143
|
|
|
148
144
|
## tfparse
|
|
149
145
|
|
|
@@ -161,9 +157,7 @@ Create a script to create/update a virtual environment and run a python script i
|
|
|
161
157
|
|
|
162
158
|
## xchmod
|
|
163
159
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
Currently implements a *very* restricted set of functionality.
|
|
160
|
+
Command to run chmod only on files that need it (only modifies files that don't have the required permissions already).
|
|
167
161
|
|
|
168
162
|
## yamlcheck
|
|
169
163
|
|
|
@@ -177,9 +171,15 @@ These will be moved to the skilleter-extras package in due course.
|
|
|
177
171
|
|
|
178
172
|
Wrapper for the borg backup utility to make it easier to use with a fixed set of options.
|
|
179
173
|
|
|
180
|
-
##
|
|
174
|
+
## consolecolours
|
|
181
175
|
|
|
182
|
-
|
|
176
|
+
Display all available colours in the console.
|
|
177
|
+
|
|
178
|
+
## diskspacecheck
|
|
179
|
+
|
|
180
|
+
Check how much free space is available on all filesystems, ignoring read-only filesystems, /dev and tmpfs.
|
|
181
|
+
|
|
182
|
+
Issue a warning if any are above 90% used.
|
|
183
183
|
|
|
184
184
|
## gphotosync
|
|
185
185
|
|
|
@@ -16,11 +16,11 @@ This README just contains a summary of the functionality of each command.
|
|
|
16
16
|
|
|
17
17
|
## ggit
|
|
18
18
|
|
|
19
|
-
Run a git command in all
|
|
19
|
+
Run a git command in all working trees under the current directory (note that this is not related to multigit (see below)).
|
|
20
20
|
|
|
21
21
|
## ggrep
|
|
22
22
|
|
|
23
|
-
Run 'git grep' in all repos under the current directory
|
|
23
|
+
Run 'git grep' in all repos under the current directory (note that this is not related to multigit (see below)).
|
|
24
24
|
|
|
25
25
|
## gitprompt
|
|
26
26
|
|
|
@@ -32,15 +32,11 @@ Improved version of 'git commit --amend'. Updates files that are already in the
|
|
|
32
32
|
|
|
33
33
|
## git cleanup
|
|
34
34
|
|
|
35
|
-
List or delete branches that have already been merged and delete tracking branches that are no longer on
|
|
35
|
+
List or delete branches that have already been merged and delete tracking branches that are no longer on the remote.
|
|
36
36
|
|
|
37
37
|
## git co
|
|
38
38
|
|
|
39
|
-
Equivalent to 'git checkout' but with intelligent branch matching
|
|
40
|
-
|
|
41
|
-
## git mr
|
|
42
|
-
|
|
43
|
-
Push a feature branch to GitLab and create a merge request
|
|
39
|
+
Equivalent to 'git checkout' but with intelligent branch matching, so specifying a partial branch name will work if it uniquely matches an existing branch
|
|
44
40
|
|
|
45
41
|
## git parent
|
|
46
42
|
|
|
@@ -62,21 +58,21 @@ Console-based git change review tool.
|
|
|
62
58
|
|
|
63
59
|
Manage a collection of related git repoitories.
|
|
64
60
|
|
|
65
|
-
|
|
61
|
+
## GitLab Commands
|
|
66
62
|
|
|
67
|
-
|
|
63
|
+
### git mr
|
|
68
64
|
|
|
69
|
-
|
|
65
|
+
Push a feature branch to GitLab and create a merge request
|
|
70
66
|
|
|
71
|
-
|
|
67
|
+
### gl
|
|
72
68
|
|
|
73
|
-
|
|
69
|
+
Command line for GitLab
|
|
74
70
|
|
|
75
|
-
|
|
71
|
+
# General Commands
|
|
76
72
|
|
|
77
|
-
|
|
73
|
+
## addpath
|
|
78
74
|
|
|
79
|
-
|
|
75
|
+
Update a $PATH-type variable by adding or removing entries.
|
|
80
76
|
|
|
81
77
|
## docker-purge
|
|
82
78
|
|
|
@@ -122,7 +118,7 @@ Simple search and replace utility for those times when trying to escape characte
|
|
|
122
118
|
|
|
123
119
|
## tfm
|
|
124
120
|
|
|
125
|
-
Console-based file-manager, similar to Midnight Commander but better.
|
|
121
|
+
Console-based file-manager, similar to Midnight Commander but aiming to be better.
|
|
126
122
|
|
|
127
123
|
## tfparse
|
|
128
124
|
|
|
@@ -140,9 +136,7 @@ Create a script to create/update a virtual environment and run a python script i
|
|
|
140
136
|
|
|
141
137
|
## xchmod
|
|
142
138
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
Currently implements a *very* restricted set of functionality.
|
|
139
|
+
Command to run chmod only on files that need it (only modifies files that don't have the required permissions already).
|
|
146
140
|
|
|
147
141
|
## yamlcheck
|
|
148
142
|
|
|
@@ -156,9 +150,15 @@ These will be moved to the skilleter-extras package in due course.
|
|
|
156
150
|
|
|
157
151
|
Wrapper for the borg backup utility to make it easier to use with a fixed set of options.
|
|
158
152
|
|
|
159
|
-
##
|
|
153
|
+
## consolecolours
|
|
160
154
|
|
|
161
|
-
|
|
155
|
+
Display all available colours in the console.
|
|
156
|
+
|
|
157
|
+
## diskspacecheck
|
|
158
|
+
|
|
159
|
+
Check how much free space is available on all filesystems, ignoring read-only filesystems, /dev and tmpfs.
|
|
160
|
+
|
|
161
|
+
Issue a warning if any are above 90% used.
|
|
162
162
|
|
|
163
163
|
## gphotosync
|
|
164
164
|
|
|
@@ -7,7 +7,7 @@ name = "skilleter_thingy"
|
|
|
7
7
|
|
|
8
8
|
# Version must be incremented to install updated Thingy
|
|
9
9
|
|
|
10
|
-
version = "0.0.
|
|
10
|
+
version = "0.0.79"
|
|
11
11
|
|
|
12
12
|
authors = [
|
|
13
13
|
{name="John Skilleter", email="john@skilleter.org.uk"},
|
|
@@ -43,7 +43,7 @@ Home = "https://skilleter.org.uk"
|
|
|
43
43
|
[project.scripts]
|
|
44
44
|
addpath = "skilleter_thingy:addpath.addpath"
|
|
45
45
|
borger = "skilleter_thingy:borger.borger"
|
|
46
|
-
|
|
46
|
+
consolecolours = "skilleter_thingy:console_colours.console_colours"
|
|
47
47
|
diskspacecheck = "skilleter_thingy:diskspacecheck.diskspacecheck"
|
|
48
48
|
docker-purge = "skilleter_thingy:docker_purge.docker_purge"
|
|
49
49
|
ffind = "skilleter_thingy:ffind.ffind"
|
|
@@ -7,8 +7,7 @@ import sys
|
|
|
7
7
|
import argparse
|
|
8
8
|
import fnmatch
|
|
9
9
|
import configparser
|
|
10
|
-
|
|
11
|
-
# TODO: Switch to tomlkit
|
|
10
|
+
import shlex
|
|
12
11
|
from collections import defaultdict
|
|
13
12
|
|
|
14
13
|
import thingy.git2 as git
|
|
@@ -27,18 +26,19 @@ import thingy.colour as colour
|
|
|
27
26
|
|
|
28
27
|
# TODO: [ ] If the config file isn't in the current directory then search up the directory tree for it but run in the current directory
|
|
29
28
|
# TODO: [ ] -j option to run in parallel?
|
|
30
|
-
# TODO: [
|
|
29
|
+
# TODO: [/] init function
|
|
31
30
|
# TODO: [/] Use the configuration file
|
|
32
31
|
# TODO: [/] Don't use a fixed list of default branch names
|
|
33
32
|
# TODO: [/] / Output name of each git repo as it is processed as command sits there seeming to do nothing otherwise.
|
|
34
33
|
# TODO: [ ] ? Pull/fetch - only output after running command and only if something updated
|
|
35
|
-
# TODO: [
|
|
34
|
+
# TODO: [/] Don't save the configuration on exit if it hasn't changed
|
|
36
35
|
# TODO: [ ] Consistent colours in output
|
|
37
36
|
# TODO: [ ] Is it going to be a problem if the same repo is checked out twice or more in the same workspace
|
|
38
37
|
# TODO: [ ] Better error-handling - e.g. continue/abort option after failure in one repo
|
|
39
38
|
# TODO: [ ] Dry-run option
|
|
40
39
|
# TODO: [ ] Verbose option
|
|
41
40
|
# TODO: [ ] When specifying list of repos, if repo name doesn't contain '/' prefix it with '*'?
|
|
41
|
+
# TODO: [ ] Switch to tomlkit
|
|
42
42
|
|
|
43
43
|
################################################################################
|
|
44
44
|
|
|
@@ -390,21 +390,42 @@ def mg_dir(args, config, console):
|
|
|
390
390
|
|
|
391
391
|
location = []
|
|
392
392
|
search_dir = args.dir[0]
|
|
393
|
-
|
|
394
|
-
breakpoint()
|
|
393
|
+
|
|
395
394
|
for repo in find_git_repos(args.directory, args.repos):
|
|
396
395
|
if fnmatch.fnmatch(config[repo]['name'], search_dir):
|
|
397
396
|
location.append(repo)
|
|
398
|
-
|
|
397
|
+
|
|
399
398
|
if len(location) == 0:
|
|
400
399
|
error(f'No matches with {dir}')
|
|
401
400
|
elif len(location) > 1:
|
|
402
401
|
error(f'Multiple matches with {dir}')
|
|
403
|
-
|
|
402
|
+
|
|
404
403
|
colour.write(location[0])
|
|
405
404
|
|
|
406
405
|
################################################################################
|
|
407
406
|
|
|
407
|
+
def mg_run(args, config, console):
|
|
408
|
+
"""Run a command in each of the working trees, optionally continuing if
|
|
409
|
+
there's an error"""
|
|
410
|
+
|
|
411
|
+
cmd = shlex.split(args.cmd[0])
|
|
412
|
+
|
|
413
|
+
for repo in find_git_repos(args.directory, args.repos):
|
|
414
|
+
if not args.quiet:
|
|
415
|
+
show_progress(console.columns, repo)
|
|
416
|
+
|
|
417
|
+
output, status = git.git_run_status(cmd, path=repo)
|
|
418
|
+
|
|
419
|
+
if output:
|
|
420
|
+
colour.write(f'[BOLD:{repo}]')
|
|
421
|
+
colour.write()
|
|
422
|
+
colour.write(output, indent=4)
|
|
423
|
+
|
|
424
|
+
if status and not args.cont:
|
|
425
|
+
sys.exit(status)
|
|
426
|
+
|
|
427
|
+
################################################################################
|
|
428
|
+
|
|
408
429
|
def main():
|
|
409
430
|
"""Main function"""
|
|
410
431
|
|
|
@@ -419,6 +440,7 @@ def main():
|
|
|
419
440
|
'update': mg_update,
|
|
420
441
|
'clean': mg_clean,
|
|
421
442
|
'dir': mg_dir,
|
|
443
|
+
'run': mg_run,
|
|
422
444
|
}
|
|
423
445
|
|
|
424
446
|
# Parse args in the form COMMAND OPTIONS SUBCOMMAND SUBCOMMAND_OPTIONS PARAMETERS
|
|
@@ -469,6 +491,10 @@ def main():
|
|
|
469
491
|
parser_dir = subparsers.add_parser('dir', help='Return the location of a working tree, given the repo name')
|
|
470
492
|
parser_dir.add_argument('dir', nargs=1, action='store', help='The name of the working tree')
|
|
471
493
|
|
|
494
|
+
parser_run = subparsers.add_parser('run', help='Run any git command in each of the working trees')
|
|
495
|
+
parser_run.add_argument('--cont', '-c', action='store_true', help='Continue if the command returns an error in any of the working trees')
|
|
496
|
+
parser_run.add_argument('cmd', nargs=1, action='store', help='The command to run (should be quoted)')
|
|
497
|
+
|
|
472
498
|
# Parse the command line
|
|
473
499
|
|
|
474
500
|
args = parser.parse_args()
|
|
@@ -510,14 +536,21 @@ def multigit():
|
|
|
510
536
|
|
|
511
537
|
try:
|
|
512
538
|
main()
|
|
539
|
+
|
|
540
|
+
# Catch keyboard aborts
|
|
541
|
+
|
|
513
542
|
except KeyboardInterrupt:
|
|
514
543
|
sys.exit(1)
|
|
515
544
|
|
|
545
|
+
# Quietly fail if output was being piped and the pipe broke
|
|
546
|
+
|
|
516
547
|
except BrokenPipeError:
|
|
517
548
|
sys.exit(2)
|
|
518
549
|
|
|
550
|
+
# Catch-all failure for Git errors
|
|
551
|
+
|
|
519
552
|
except git.GitError as exc:
|
|
520
|
-
|
|
553
|
+
sys.stderr.write(exc)
|
|
521
554
|
sys.exit(3)
|
|
522
555
|
|
|
523
556
|
################################################################################
|
|
@@ -38,6 +38,11 @@ import thingy.gitlab as gitlab
|
|
|
38
38
|
|
|
39
39
|
(LOCAL, GLOBAL, SYSTEM) = list(range(3))
|
|
40
40
|
|
|
41
|
+
# Options always passed to Git (disable autocorrect to stop it running the wrong command
|
|
42
|
+
# if an invalid command name has been specified).
|
|
43
|
+
|
|
44
|
+
STANDARD_GIT_OPTIONS = ['-c', 'help.autoCorrect=never']
|
|
45
|
+
|
|
41
46
|
################################################################################
|
|
42
47
|
|
|
43
48
|
class GitError(run.RunError):
|
|
@@ -54,7 +59,7 @@ def git(cmd, stdout=None, stderr=None, path=None):
|
|
|
54
59
|
to get the exception.
|
|
55
60
|
Optionally redirect stdout and stderr as specified. """
|
|
56
61
|
|
|
57
|
-
git_cmd = ['git']
|
|
62
|
+
git_cmd = ['git'] + STANDARD_GIT_OPTIONS
|
|
58
63
|
|
|
59
64
|
if path:
|
|
60
65
|
git_cmd += ['-C', path]
|
|
@@ -75,7 +80,7 @@ def git_run_status(cmd, stdout=None, stderr=None, path=None):
|
|
|
75
80
|
|
|
76
81
|
logging.debug('Running git %s', ' '.join(cmd))
|
|
77
82
|
|
|
78
|
-
git_cmd = ['git']
|
|
83
|
+
git_cmd = ['git'] + STANDARD_GIT_OPTIONS
|
|
79
84
|
|
|
80
85
|
if path:
|
|
81
86
|
git_cmd += ['-C', path]
|
|
@@ -10,11 +10,10 @@
|
|
|
10
10
|
of 'a+rw' and applies them to all files and directories in the specified
|
|
11
11
|
path and must be run with -R/--recursive.
|
|
12
12
|
|
|
13
|
-
TODO:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
Options for files/directories only
|
|
13
|
+
TODO: [ ] Support all file modes as per chmod
|
|
14
|
+
TODO: [ ] Support all command line options of chmod
|
|
15
|
+
TODO: [ ] Implement non-recursive mode
|
|
16
|
+
TODO: [ ] Options for files/directories only
|
|
18
17
|
|
|
19
18
|
Copyright (C) 2017 John Skilleter
|
|
20
19
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: skilleter_thingy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.79
|
|
4
4
|
Summary: A collection of useful utilities, mainly aimed at making Git more friendly
|
|
5
5
|
Author-email: John Skilleter <john@skilleter.org.uk>
|
|
6
6
|
Project-URL: Home, https://skilleter.org.uk
|
|
@@ -37,11 +37,11 @@ This README just contains a summary of the functionality of each command.
|
|
|
37
37
|
|
|
38
38
|
## ggit
|
|
39
39
|
|
|
40
|
-
Run a git command in all
|
|
40
|
+
Run a git command in all working trees under the current directory (note that this is not related to multigit (see below)).
|
|
41
41
|
|
|
42
42
|
## ggrep
|
|
43
43
|
|
|
44
|
-
Run 'git grep' in all repos under the current directory
|
|
44
|
+
Run 'git grep' in all repos under the current directory (note that this is not related to multigit (see below)).
|
|
45
45
|
|
|
46
46
|
## gitprompt
|
|
47
47
|
|
|
@@ -53,15 +53,11 @@ Improved version of 'git commit --amend'. Updates files that are already in the
|
|
|
53
53
|
|
|
54
54
|
## git cleanup
|
|
55
55
|
|
|
56
|
-
List or delete branches that have already been merged and delete tracking branches that are no longer on
|
|
56
|
+
List or delete branches that have already been merged and delete tracking branches that are no longer on the remote.
|
|
57
57
|
|
|
58
58
|
## git co
|
|
59
59
|
|
|
60
|
-
Equivalent to 'git checkout' but with intelligent branch matching
|
|
61
|
-
|
|
62
|
-
## git mr
|
|
63
|
-
|
|
64
|
-
Push a feature branch to GitLab and create a merge request
|
|
60
|
+
Equivalent to 'git checkout' but with intelligent branch matching, so specifying a partial branch name will work if it uniquely matches an existing branch
|
|
65
61
|
|
|
66
62
|
## git parent
|
|
67
63
|
|
|
@@ -83,21 +79,21 @@ Console-based git change review tool.
|
|
|
83
79
|
|
|
84
80
|
Manage a collection of related git repoitories.
|
|
85
81
|
|
|
86
|
-
|
|
82
|
+
## GitLab Commands
|
|
87
83
|
|
|
88
|
-
|
|
84
|
+
### git mr
|
|
89
85
|
|
|
90
|
-
|
|
86
|
+
Push a feature branch to GitLab and create a merge request
|
|
91
87
|
|
|
92
|
-
|
|
88
|
+
### gl
|
|
93
89
|
|
|
94
|
-
|
|
90
|
+
Command line for GitLab
|
|
95
91
|
|
|
96
|
-
|
|
92
|
+
# General Commands
|
|
97
93
|
|
|
98
|
-
|
|
94
|
+
## addpath
|
|
99
95
|
|
|
100
|
-
|
|
96
|
+
Update a $PATH-type variable by adding or removing entries.
|
|
101
97
|
|
|
102
98
|
## docker-purge
|
|
103
99
|
|
|
@@ -143,7 +139,7 @@ Simple search and replace utility for those times when trying to escape characte
|
|
|
143
139
|
|
|
144
140
|
## tfm
|
|
145
141
|
|
|
146
|
-
Console-based file-manager, similar to Midnight Commander but better.
|
|
142
|
+
Console-based file-manager, similar to Midnight Commander but aiming to be better.
|
|
147
143
|
|
|
148
144
|
## tfparse
|
|
149
145
|
|
|
@@ -161,9 +157,7 @@ Create a script to create/update a virtual environment and run a python script i
|
|
|
161
157
|
|
|
162
158
|
## xchmod
|
|
163
159
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
Currently implements a *very* restricted set of functionality.
|
|
160
|
+
Command to run chmod only on files that need it (only modifies files that don't have the required permissions already).
|
|
167
161
|
|
|
168
162
|
## yamlcheck
|
|
169
163
|
|
|
@@ -177,9 +171,15 @@ These will be moved to the skilleter-extras package in due course.
|
|
|
177
171
|
|
|
178
172
|
Wrapper for the borg backup utility to make it easier to use with a fixed set of options.
|
|
179
173
|
|
|
180
|
-
##
|
|
174
|
+
## consolecolours
|
|
181
175
|
|
|
182
|
-
|
|
176
|
+
Display all available colours in the console.
|
|
177
|
+
|
|
178
|
+
## diskspacecheck
|
|
179
|
+
|
|
180
|
+
Check how much free space is available on all filesystems, ignoring read-only filesystems, /dev and tmpfs.
|
|
181
|
+
|
|
182
|
+
Issue a warning if any are above 90% used.
|
|
183
183
|
|
|
184
184
|
## gphotosync
|
|
185
185
|
|
{skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy.egg-info/entry_points.txt
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[console_scripts]
|
|
2
2
|
addpath = skilleter_thingy:addpath.addpath
|
|
3
3
|
borger = skilleter_thingy:borger.borger
|
|
4
|
-
|
|
4
|
+
consolecolours = skilleter_thingy:console_colours.console_colours
|
|
5
5
|
diskspacecheck = skilleter_thingy:diskspacecheck.diskspacecheck
|
|
6
6
|
docker-purge = skilleter_thingy:docker_purge.docker_purge
|
|
7
7
|
ffind = skilleter_thingy:ffind.ffind
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy/thingy/venv_template.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{skilleter_thingy-0.0.78 → skilleter_thingy-0.0.79}/skilleter_thingy.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|