skilleter-thingy 0.2.15__tar.gz → 0.3.1__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.2.15 → skilleter_thingy-0.3.1}/PKG-INFO +75 -72
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/README.md +74 -71
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/pyproject.toml +1 -9
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/gitcmp_helper.py +2 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/multigit.py +6 -4
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/py_audit.py +5 -4
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/git.py +1 -1
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy.egg-info/PKG-INFO +75 -72
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy.egg-info/SOURCES.txt +0 -6
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy.egg-info/entry_points.txt +0 -8
- skilleter_thingy-0.2.15/skilleter_thingy/docker_purge.py +0 -111
- skilleter_thingy-0.2.15/skilleter_thingy/git_mr.py +0 -103
- skilleter_thingy-0.2.15/skilleter_thingy/gl.py +0 -174
- skilleter_thingy-0.2.15/skilleter_thingy/rmdupe.py +0 -553
- skilleter_thingy-0.2.15/skilleter_thingy/thingy/docker.py +0 -97
- skilleter_thingy-0.2.15/skilleter_thingy/x.py +0 -3
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/LICENSE +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/setup.cfg +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/__init__.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/addpath.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/console_colours.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/ffind.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/ggit.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/ggrep.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/git_br.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/git_ca.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/git_cleanup.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/git_co.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/git_common.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/git_hold.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/git_parent.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/git_retag.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/git_review.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/git_update.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/git_wt.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/gitprompt.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/linecount.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/readable.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/remdir.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/rpylint.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/strreplace.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/tfm.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/tfparse.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/__init__.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/colour.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/dc_curses.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/dc_defaults.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/dc_util.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/dircolors.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/files.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/gitlab.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/path.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/popup.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/run.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/tfm_pane.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/tidy.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/thingy/venv_template.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/trimpath.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/venv_create.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/xchmod.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy/yamlcheck.py +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy.egg-info/dependency_links.txt +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy.egg-info/requires.txt +0 -0
- {skilleter_thingy-0.2.15 → skilleter_thingy-0.3.1}/skilleter_thingy.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: skilleter_thingy
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
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
|
|
@@ -52,7 +52,7 @@ For ease of use it is recommended that you create an alias for multigit called `
|
|
|
52
52
|
|
|
53
53
|
alias mg="multigit $@"
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
### Initialisation
|
|
56
56
|
|
|
57
57
|
To use multigit, start by creating working trees for the repositories that you want to use in a directory tree - the working trees can be at different levels or even nested, for example:
|
|
58
58
|
|
|
@@ -70,7 +70,7 @@ To use multigit, start by creating working trees for the repositories that you w
|
|
|
70
70
|
|
|
71
71
|
Start by running ensuring that the default branch (e.g. `main`) is checked out in each of the working trees and, in the top-level directory, run `multigit init` to create the configuration file which, by default is called `multigit.toml` - this is just a text file that sets the configuration for each working tree in terms of name, origin, default branch, tags and location.
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
### Multigit Command Line
|
|
74
74
|
|
|
75
75
|
The multigit command line format is:
|
|
76
76
|
|
|
@@ -100,7 +100,7 @@ These options are AND-ed together, so specifying `--modified --branched --tag WO
|
|
|
100
100
|
|
|
101
101
|
Multigit tags are stored in the configuration file, not within the working tree and each working tree can have multiple tags.
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
### Multigit Commands
|
|
104
104
|
|
|
105
105
|
Multigit supports a small list of subcommands, each of which are prefixed with a `+` to distinguish them from Git commands:
|
|
106
106
|
|
|
@@ -184,6 +184,21 @@ This is most useful where branches contain ticket numbers so, for instance given
|
|
|
184
184
|
|
|
185
185
|
Note that the concept of the default branch `DEFAULT` mentioned above *only* applies when using the `multigit` command, although some of the commands will treat branches called `master` or `main` as special cases (see the individual command documentation).
|
|
186
186
|
|
|
187
|
+
## git br
|
|
188
|
+
|
|
189
|
+
List or delete branches that have been merged
|
|
190
|
+
|
|
191
|
+
usage: git-br [-h] [--all] [--delete] [--path PATH] [branches ...]
|
|
192
|
+
|
|
193
|
+
positional arguments:
|
|
194
|
+
branches Filter the list of branches according to one or more patterns
|
|
195
|
+
|
|
196
|
+
options:
|
|
197
|
+
-h, --help show this help message and exit
|
|
198
|
+
--all, -a List all branches, including remotes
|
|
199
|
+
--delete, -d Delete the specified branch(es), even if it is the current one (list of branches to delete must be supplied as parameters)
|
|
200
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
201
|
+
|
|
187
202
|
## git ca
|
|
188
203
|
|
|
189
204
|
Improved version of 'git commit --amend'. Updates files that are already in the commit and, optionally, adds and commits additional files.
|
|
@@ -242,6 +257,37 @@ Equivalent to `git checkout` but with enhanced branch matching as described abov
|
|
|
242
257
|
--exact, -e Do not use branch name matching - check out the branch as specified (if it exists)
|
|
243
258
|
--debug Enable debug output
|
|
244
259
|
|
|
260
|
+
## git common
|
|
261
|
+
|
|
262
|
+
Find the most recent common ancestor for two commits
|
|
263
|
+
|
|
264
|
+
usage: git-common [-h] [--short] [--long] [--path PATH] [commit1] [commit2]
|
|
265
|
+
|
|
266
|
+
positional arguments:
|
|
267
|
+
commit1 First commit (default=HEAD)
|
|
268
|
+
commit2 Second commit (default=master)
|
|
269
|
+
|
|
270
|
+
options:
|
|
271
|
+
-h, --help show this help message and exit
|
|
272
|
+
--short, -s Just output the ancestor commit ID
|
|
273
|
+
--long, -l Output the log entry for the commit
|
|
274
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
275
|
+
|
|
276
|
+
## git hold
|
|
277
|
+
|
|
278
|
+
Archive, list or recover one or more Git branches
|
|
279
|
+
|
|
280
|
+
usage: git-hold [-h] [--list] [--restore] [--path PATH] [branches ...]
|
|
281
|
+
|
|
282
|
+
positional arguments:
|
|
283
|
+
branches Branches
|
|
284
|
+
|
|
285
|
+
options:
|
|
286
|
+
-h, --help show this help message and exit
|
|
287
|
+
--list, -l List archived branches
|
|
288
|
+
--restore, -r Restore archived branches
|
|
289
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
290
|
+
|
|
245
291
|
## git parent
|
|
246
292
|
|
|
247
293
|
Attempt to determine the parent branch for the specified branch (defaulting to the current one).
|
|
@@ -258,6 +304,21 @@ Attempt to determine the parent branch for the specified branch (defaulting to t
|
|
|
258
304
|
--all, -a Include feature branches as possible parents
|
|
259
305
|
--verbose, -v Report verbose results (includes number of commits between branch and parent)
|
|
260
306
|
|
|
307
|
+
## git retag
|
|
308
|
+
|
|
309
|
+
Apply or update a tag, optionally updating it on the remote as well. If the specified tag exists, it is deleted
|
|
310
|
+
and re-applied, otherwise it is recreated.
|
|
311
|
+
|
|
312
|
+
usage: git-retag [-h] [--push] [--path PATH] tag
|
|
313
|
+
|
|
314
|
+
positional arguments:
|
|
315
|
+
tag The tag
|
|
316
|
+
|
|
317
|
+
options:
|
|
318
|
+
-h, --help show this help message and exit
|
|
319
|
+
--push, -p Push the tag to the remote
|
|
320
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
321
|
+
|
|
261
322
|
## git update
|
|
262
323
|
|
|
263
324
|
Update the rworking tree from the remote, rebase local branch(es) against their parents and optionally run git cleanup.
|
|
@@ -313,6 +374,14 @@ Menu-driven Git code review tool
|
|
|
313
374
|
--dir DIR Work in the specified directory
|
|
314
375
|
--difftool DIFFTOOL Override the default git diff tool
|
|
315
376
|
|
|
377
|
+
## ggit
|
|
378
|
+
|
|
379
|
+
Run a git command in all working trees under the current directory (somewhat superceded by multigit).
|
|
380
|
+
|
|
381
|
+
## ggrep
|
|
382
|
+
|
|
383
|
+
Run 'git grep' in all repos under the current directory (somewhat superceded by multigit).
|
|
384
|
+
|
|
316
385
|
# General Commands
|
|
317
386
|
|
|
318
387
|
## addpath
|
|
@@ -334,23 +403,9 @@ Add or remove entries from a path list (e.g. as used by the PATH environment var
|
|
|
334
403
|
--separator SEPARATOR
|
|
335
404
|
Override the default path separator
|
|
336
405
|
|
|
337
|
-
##
|
|
338
|
-
|
|
339
|
-
Stop or kill docker instances and/or remove docker images.
|
|
340
|
-
|
|
341
|
-
docker-purge [-h] [--stop] [--kill] [--remove] [--list] [--force] [--debug] [images ...]
|
|
342
|
-
|
|
343
|
-
positional arguments:
|
|
344
|
-
images List of Docker containers (regular expression)
|
|
406
|
+
## consolecolours
|
|
345
407
|
|
|
346
|
-
|
|
347
|
-
-h, --help show this help message and exit
|
|
348
|
-
--stop, -s Stop Docker instances
|
|
349
|
-
--kill, -k Kill Docker instances
|
|
350
|
-
--remove, -r Remove Docker images
|
|
351
|
-
--list, -l List what would be done without doing it
|
|
352
|
-
--force, -f Forcibly kill/remove instances
|
|
353
|
-
--debug Enable debug output
|
|
408
|
+
Display all available colours in the console.
|
|
354
409
|
|
|
355
410
|
## ffind
|
|
356
411
|
|
|
@@ -470,24 +525,6 @@ Recursively delete empty directories
|
|
|
470
525
|
Files to ignore when considering whether a directory is empty
|
|
471
526
|
--keep KEEP, -K KEEP Directories that should be kept even if they are empty
|
|
472
527
|
|
|
473
|
-
## rmdupe
|
|
474
|
-
|
|
475
|
-
Search for duplicate files.
|
|
476
|
-
|
|
477
|
-
rmdupe [-h] [--debug] [--save SAVE] [--load LOAD] [--script SCRIPT] [--exclude EXCLUDE] [--ignore IGNORE] [path]
|
|
478
|
-
|
|
479
|
-
positional arguments:
|
|
480
|
-
path Path(s) to search for duplicates
|
|
481
|
-
|
|
482
|
-
options:
|
|
483
|
-
-h, --help show this help message and exit
|
|
484
|
-
--debug Debug output
|
|
485
|
-
--save SAVE Save duplicate file list
|
|
486
|
-
--load LOAD Load duplicate file list
|
|
487
|
-
--script SCRIPT Generate a shell script to delete the duplicates
|
|
488
|
-
--exclude EXCLUDE Directories to skip when looking for duplicates
|
|
489
|
-
--ignore IGNORE Wildcards to ignore when looking for duplicates
|
|
490
|
-
|
|
491
528
|
## rpylint
|
|
492
529
|
|
|
493
530
|
Run pylint on all the Python source files in a directory tree
|
|
@@ -500,10 +537,6 @@ Run pylint on all the Python source files in a directory tree
|
|
|
500
537
|
options:
|
|
501
538
|
-h, --help show this help message and exit
|
|
502
539
|
|
|
503
|
-
## s3-sync
|
|
504
|
-
|
|
505
|
-
Synchronise files from S3 to local storage.
|
|
506
|
-
|
|
507
540
|
## strreplace
|
|
508
541
|
|
|
509
542
|
Simple search and replace utility for those times when trying to escape characters in a regexp to use sed is more hassle than it is worth.
|
|
@@ -592,33 +625,3 @@ YAML validator - checks that a file is valid YAML (use yamllint to verify that i
|
|
|
592
625
|
--block Force block style when dumping the YAML data
|
|
593
626
|
--flow Force flow style when dumping the YAML data
|
|
594
627
|
--hiera Process the file as Puppet Hiera data
|
|
595
|
-
|
|
596
|
-
# Obsolescent Utilities
|
|
597
|
-
|
|
598
|
-
These will be moved to the skilleter-extras package in due course.
|
|
599
|
-
|
|
600
|
-
## consolecolours
|
|
601
|
-
|
|
602
|
-
Display all available colours in the console.
|
|
603
|
-
|
|
604
|
-
# Obsolescent Commands
|
|
605
|
-
|
|
606
|
-
These commands will probably be retired in future versions of Thingy
|
|
607
|
-
|
|
608
|
-
## ggit
|
|
609
|
-
|
|
610
|
-
Run a git command in all working trees under the current directory (superceded by multigit).
|
|
611
|
-
|
|
612
|
-
## ggrep
|
|
613
|
-
|
|
614
|
-
Run 'git grep' in all repos under the current directory (superceded by multigit).
|
|
615
|
-
|
|
616
|
-
## GitLab Commands
|
|
617
|
-
|
|
618
|
-
### git mr
|
|
619
|
-
|
|
620
|
-
Push a feature branch to GitLab and create a merge request
|
|
621
|
-
|
|
622
|
-
### gl
|
|
623
|
-
|
|
624
|
-
Command line for GitLab
|
|
@@ -29,7 +29,7 @@ For ease of use it is recommended that you create an alias for multigit called `
|
|
|
29
29
|
|
|
30
30
|
alias mg="multigit $@"
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
### Initialisation
|
|
33
33
|
|
|
34
34
|
To use multigit, start by creating working trees for the repositories that you want to use in a directory tree - the working trees can be at different levels or even nested, for example:
|
|
35
35
|
|
|
@@ -47,7 +47,7 @@ To use multigit, start by creating working trees for the repositories that you w
|
|
|
47
47
|
|
|
48
48
|
Start by running ensuring that the default branch (e.g. `main`) is checked out in each of the working trees and, in the top-level directory, run `multigit init` to create the configuration file which, by default is called `multigit.toml` - this is just a text file that sets the configuration for each working tree in terms of name, origin, default branch, tags and location.
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
### Multigit Command Line
|
|
51
51
|
|
|
52
52
|
The multigit command line format is:
|
|
53
53
|
|
|
@@ -77,7 +77,7 @@ These options are AND-ed together, so specifying `--modified --branched --tag WO
|
|
|
77
77
|
|
|
78
78
|
Multigit tags are stored in the configuration file, not within the working tree and each working tree can have multiple tags.
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
### Multigit Commands
|
|
81
81
|
|
|
82
82
|
Multigit supports a small list of subcommands, each of which are prefixed with a `+` to distinguish them from Git commands:
|
|
83
83
|
|
|
@@ -161,6 +161,21 @@ This is most useful where branches contain ticket numbers so, for instance given
|
|
|
161
161
|
|
|
162
162
|
Note that the concept of the default branch `DEFAULT` mentioned above *only* applies when using the `multigit` command, although some of the commands will treat branches called `master` or `main` as special cases (see the individual command documentation).
|
|
163
163
|
|
|
164
|
+
## git br
|
|
165
|
+
|
|
166
|
+
List or delete branches that have been merged
|
|
167
|
+
|
|
168
|
+
usage: git-br [-h] [--all] [--delete] [--path PATH] [branches ...]
|
|
169
|
+
|
|
170
|
+
positional arguments:
|
|
171
|
+
branches Filter the list of branches according to one or more patterns
|
|
172
|
+
|
|
173
|
+
options:
|
|
174
|
+
-h, --help show this help message and exit
|
|
175
|
+
--all, -a List all branches, including remotes
|
|
176
|
+
--delete, -d Delete the specified branch(es), even if it is the current one (list of branches to delete must be supplied as parameters)
|
|
177
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
178
|
+
|
|
164
179
|
## git ca
|
|
165
180
|
|
|
166
181
|
Improved version of 'git commit --amend'. Updates files that are already in the commit and, optionally, adds and commits additional files.
|
|
@@ -219,6 +234,37 @@ Equivalent to `git checkout` but with enhanced branch matching as described abov
|
|
|
219
234
|
--exact, -e Do not use branch name matching - check out the branch as specified (if it exists)
|
|
220
235
|
--debug Enable debug output
|
|
221
236
|
|
|
237
|
+
## git common
|
|
238
|
+
|
|
239
|
+
Find the most recent common ancestor for two commits
|
|
240
|
+
|
|
241
|
+
usage: git-common [-h] [--short] [--long] [--path PATH] [commit1] [commit2]
|
|
242
|
+
|
|
243
|
+
positional arguments:
|
|
244
|
+
commit1 First commit (default=HEAD)
|
|
245
|
+
commit2 Second commit (default=master)
|
|
246
|
+
|
|
247
|
+
options:
|
|
248
|
+
-h, --help show this help message and exit
|
|
249
|
+
--short, -s Just output the ancestor commit ID
|
|
250
|
+
--long, -l Output the log entry for the commit
|
|
251
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
252
|
+
|
|
253
|
+
## git hold
|
|
254
|
+
|
|
255
|
+
Archive, list or recover one or more Git branches
|
|
256
|
+
|
|
257
|
+
usage: git-hold [-h] [--list] [--restore] [--path PATH] [branches ...]
|
|
258
|
+
|
|
259
|
+
positional arguments:
|
|
260
|
+
branches Branches
|
|
261
|
+
|
|
262
|
+
options:
|
|
263
|
+
-h, --help show this help message and exit
|
|
264
|
+
--list, -l List archived branches
|
|
265
|
+
--restore, -r Restore archived branches
|
|
266
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
267
|
+
|
|
222
268
|
## git parent
|
|
223
269
|
|
|
224
270
|
Attempt to determine the parent branch for the specified branch (defaulting to the current one).
|
|
@@ -235,6 +281,21 @@ Attempt to determine the parent branch for the specified branch (defaulting to t
|
|
|
235
281
|
--all, -a Include feature branches as possible parents
|
|
236
282
|
--verbose, -v Report verbose results (includes number of commits between branch and parent)
|
|
237
283
|
|
|
284
|
+
## git retag
|
|
285
|
+
|
|
286
|
+
Apply or update a tag, optionally updating it on the remote as well. If the specified tag exists, it is deleted
|
|
287
|
+
and re-applied, otherwise it is recreated.
|
|
288
|
+
|
|
289
|
+
usage: git-retag [-h] [--push] [--path PATH] tag
|
|
290
|
+
|
|
291
|
+
positional arguments:
|
|
292
|
+
tag The tag
|
|
293
|
+
|
|
294
|
+
options:
|
|
295
|
+
-h, --help show this help message and exit
|
|
296
|
+
--push, -p Push the tag to the remote
|
|
297
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
298
|
+
|
|
238
299
|
## git update
|
|
239
300
|
|
|
240
301
|
Update the rworking tree from the remote, rebase local branch(es) against their parents and optionally run git cleanup.
|
|
@@ -290,6 +351,14 @@ Menu-driven Git code review tool
|
|
|
290
351
|
--dir DIR Work in the specified directory
|
|
291
352
|
--difftool DIFFTOOL Override the default git diff tool
|
|
292
353
|
|
|
354
|
+
## ggit
|
|
355
|
+
|
|
356
|
+
Run a git command in all working trees under the current directory (somewhat superceded by multigit).
|
|
357
|
+
|
|
358
|
+
## ggrep
|
|
359
|
+
|
|
360
|
+
Run 'git grep' in all repos under the current directory (somewhat superceded by multigit).
|
|
361
|
+
|
|
293
362
|
# General Commands
|
|
294
363
|
|
|
295
364
|
## addpath
|
|
@@ -311,23 +380,9 @@ Add or remove entries from a path list (e.g. as used by the PATH environment var
|
|
|
311
380
|
--separator SEPARATOR
|
|
312
381
|
Override the default path separator
|
|
313
382
|
|
|
314
|
-
##
|
|
315
|
-
|
|
316
|
-
Stop or kill docker instances and/or remove docker images.
|
|
317
|
-
|
|
318
|
-
docker-purge [-h] [--stop] [--kill] [--remove] [--list] [--force] [--debug] [images ...]
|
|
319
|
-
|
|
320
|
-
positional arguments:
|
|
321
|
-
images List of Docker containers (regular expression)
|
|
383
|
+
## consolecolours
|
|
322
384
|
|
|
323
|
-
|
|
324
|
-
-h, --help show this help message and exit
|
|
325
|
-
--stop, -s Stop Docker instances
|
|
326
|
-
--kill, -k Kill Docker instances
|
|
327
|
-
--remove, -r Remove Docker images
|
|
328
|
-
--list, -l List what would be done without doing it
|
|
329
|
-
--force, -f Forcibly kill/remove instances
|
|
330
|
-
--debug Enable debug output
|
|
385
|
+
Display all available colours in the console.
|
|
331
386
|
|
|
332
387
|
## ffind
|
|
333
388
|
|
|
@@ -447,24 +502,6 @@ Recursively delete empty directories
|
|
|
447
502
|
Files to ignore when considering whether a directory is empty
|
|
448
503
|
--keep KEEP, -K KEEP Directories that should be kept even if they are empty
|
|
449
504
|
|
|
450
|
-
## rmdupe
|
|
451
|
-
|
|
452
|
-
Search for duplicate files.
|
|
453
|
-
|
|
454
|
-
rmdupe [-h] [--debug] [--save SAVE] [--load LOAD] [--script SCRIPT] [--exclude EXCLUDE] [--ignore IGNORE] [path]
|
|
455
|
-
|
|
456
|
-
positional arguments:
|
|
457
|
-
path Path(s) to search for duplicates
|
|
458
|
-
|
|
459
|
-
options:
|
|
460
|
-
-h, --help show this help message and exit
|
|
461
|
-
--debug Debug output
|
|
462
|
-
--save SAVE Save duplicate file list
|
|
463
|
-
--load LOAD Load duplicate file list
|
|
464
|
-
--script SCRIPT Generate a shell script to delete the duplicates
|
|
465
|
-
--exclude EXCLUDE Directories to skip when looking for duplicates
|
|
466
|
-
--ignore IGNORE Wildcards to ignore when looking for duplicates
|
|
467
|
-
|
|
468
505
|
## rpylint
|
|
469
506
|
|
|
470
507
|
Run pylint on all the Python source files in a directory tree
|
|
@@ -477,10 +514,6 @@ Run pylint on all the Python source files in a directory tree
|
|
|
477
514
|
options:
|
|
478
515
|
-h, --help show this help message and exit
|
|
479
516
|
|
|
480
|
-
## s3-sync
|
|
481
|
-
|
|
482
|
-
Synchronise files from S3 to local storage.
|
|
483
|
-
|
|
484
517
|
## strreplace
|
|
485
518
|
|
|
486
519
|
Simple search and replace utility for those times when trying to escape characters in a regexp to use sed is more hassle than it is worth.
|
|
@@ -569,33 +602,3 @@ YAML validator - checks that a file is valid YAML (use yamllint to verify that i
|
|
|
569
602
|
--block Force block style when dumping the YAML data
|
|
570
603
|
--flow Force flow style when dumping the YAML data
|
|
571
604
|
--hiera Process the file as Puppet Hiera data
|
|
572
|
-
|
|
573
|
-
# Obsolescent Utilities
|
|
574
|
-
|
|
575
|
-
These will be moved to the skilleter-extras package in due course.
|
|
576
|
-
|
|
577
|
-
## consolecolours
|
|
578
|
-
|
|
579
|
-
Display all available colours in the console.
|
|
580
|
-
|
|
581
|
-
# Obsolescent Commands
|
|
582
|
-
|
|
583
|
-
These commands will probably be retired in future versions of Thingy
|
|
584
|
-
|
|
585
|
-
## ggit
|
|
586
|
-
|
|
587
|
-
Run a git command in all working trees under the current directory (superceded by multigit).
|
|
588
|
-
|
|
589
|
-
## ggrep
|
|
590
|
-
|
|
591
|
-
Run 'git grep' in all repos under the current directory (superceded by multigit).
|
|
592
|
-
|
|
593
|
-
## GitLab Commands
|
|
594
|
-
|
|
595
|
-
### git mr
|
|
596
|
-
|
|
597
|
-
Push a feature branch to GitLab and create a merge request
|
|
598
|
-
|
|
599
|
-
### gl
|
|
600
|
-
|
|
601
|
-
Command line for GitLab
|
|
@@ -7,7 +7,7 @@ name = "skilleter_thingy"
|
|
|
7
7
|
|
|
8
8
|
# Version must be incremented to install updated Thingy
|
|
9
9
|
|
|
10
|
-
version = "0.
|
|
10
|
+
version = "0.3.1"
|
|
11
11
|
|
|
12
12
|
authors = [
|
|
13
13
|
{name="John Skilleter", email="john@skilleter.org.uk"},
|
|
@@ -43,7 +43,6 @@ Home = "https://skilleter.org.uk"
|
|
|
43
43
|
[project.scripts]
|
|
44
44
|
addpath = "skilleter_thingy:addpath.addpath"
|
|
45
45
|
consolecolours = "skilleter_thingy:console_colours.console_colours"
|
|
46
|
-
docker-purge = "skilleter_thingy:docker_purge.docker_purge"
|
|
47
46
|
ffind = "skilleter_thingy:ffind.ffind"
|
|
48
47
|
ggit = "skilleter_thingy:ggit.ggit"
|
|
49
48
|
ggrep = "skilleter_thingy:ggrep.ggrep"
|
|
@@ -53,7 +52,6 @@ git-cleanup = "skilleter_thingy:git_cleanup.git_cleanup"
|
|
|
53
52
|
git-co = "skilleter_thingy:git_co.git_co"
|
|
54
53
|
git-common = "skilleter_thingy:git_common.git_common"
|
|
55
54
|
git-hold = "skilleter_thingy:git_hold.git_hold"
|
|
56
|
-
git-mr = "skilleter_thingy:git_mr.git_mr"
|
|
57
55
|
git-parent = "skilleter_thingy:git_parent.git_parent"
|
|
58
56
|
git-retag = "skilleter_thingy:git_retag.git_retag"
|
|
59
57
|
git-review = "skilleter_thingy:git_review.git_review"
|
|
@@ -61,22 +59,16 @@ git-update = "skilleter_thingy:git_update.git_update"
|
|
|
61
59
|
git-wt = "skilleter_thingy:git_wt.git_wt"
|
|
62
60
|
gitcmp-helper = "skilleter_thingy:gitcmp_helper.gitcmp_helper"
|
|
63
61
|
gitprompt = "skilleter_thingy:gitprompt.gitprompt"
|
|
64
|
-
gl = "skilleter_thingy:gl.gl"
|
|
65
|
-
gphotosync = "skilleter_thingy:gphotosync.gphotosync"
|
|
66
62
|
linecount = "skilleter_thingy:linecount.linecount"
|
|
67
|
-
mg = "skilleter_thingy:mg.mg"
|
|
68
63
|
multigit = "skilleter_thingy:multigit.multigit"
|
|
69
64
|
py-audit = "skilleter_thingy:py_audit.py_audit"
|
|
70
65
|
readable = "skilleter_thingy:readable.readable"
|
|
71
66
|
remdir = "skilleter_thingy:remdir.remdir"
|
|
72
|
-
rmdupe = "skilleter_thingy:rmdupe.rmdupe"
|
|
73
67
|
rpylint = "skilleter_thingy:rpylint.rpylint"
|
|
74
|
-
s3-sync = "skilleter_thingy:s3_sync.s3_sync"
|
|
75
68
|
strreplace = "skilleter_thingy:strreplace.strreplace"
|
|
76
69
|
tfm = "skilleter_thingy:tfm.tfm"
|
|
77
70
|
tfparse = "skilleter_thingy:tfparse.tfparse"
|
|
78
71
|
trimpath = "skilleter_thingy:trimpath.trimpath"
|
|
79
72
|
venv-create = "skilleter_thingy:venv_create.venv_create"
|
|
80
|
-
webwatch = "skilleter_thingy:webwatch.webwatch"
|
|
81
73
|
xchmod = "skilleter_thingy:xchmod.xchmod"
|
|
82
74
|
yamlcheck = "skilleter_thingy:yamlcheck.yamlcheck"
|
|
@@ -298,8 +298,10 @@ def main():
|
|
|
298
298
|
if not deleted_file or not skip_deleted:
|
|
299
299
|
try:
|
|
300
300
|
subprocess.run([difftool, args.old_file, args.new_file], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
|
|
301
|
+
|
|
301
302
|
except subprocess.CalledProcessError as exc:
|
|
302
303
|
print(f'WARNING: Diff failed - status = {exc.returncode}')
|
|
304
|
+
|
|
303
305
|
except FileNotFoundError:
|
|
304
306
|
print(f'ERROR: Unable to locate diff tool {difftool}')
|
|
305
307
|
sys.exit(1)
|
|
@@ -646,16 +646,18 @@ def mg_run(args, config, console):
|
|
|
646
646
|
repo_path = absolute_repo_path(args, repo.name)
|
|
647
647
|
|
|
648
648
|
try:
|
|
649
|
-
status = subprocess.run(args.parameters, cwd=repo_path, check=
|
|
649
|
+
status = subprocess.run(args.parameters, cwd=repo_path, check=True)
|
|
650
|
+
|
|
650
651
|
except FileNotFoundError:
|
|
651
652
|
err_msg = f'"[BLUE:{args.parameters[0]}]" - Command not found'
|
|
652
653
|
if args.error_continue:
|
|
653
654
|
colour.write(f'[RED:WARNING]: {err_msg}')
|
|
654
655
|
else:
|
|
655
656
|
colour.error(f'[RED:ERROR]: {err_msg}')
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
657
|
+
|
|
658
|
+
except subprocess.CalledProcessError as exc:
|
|
659
|
+
if not args.error_continue:
|
|
660
|
+
sys.exit(exc.returncode)
|
|
659
661
|
|
|
660
662
|
################################################################################
|
|
661
663
|
|
|
@@ -100,11 +100,12 @@ def main():
|
|
|
100
100
|
f' && python3 -m pip {PIP_OPTIONS} list | tail -n+3 | tee {package_list.name}' \
|
|
101
101
|
' && deactivate'
|
|
102
102
|
|
|
103
|
-
|
|
103
|
+
try:
|
|
104
|
+
subprocess.run(script, check=True, shell=True)
|
|
104
105
|
|
|
105
|
-
|
|
106
|
-
print(f'ERROR #{
|
|
107
|
-
sys.exit(
|
|
106
|
+
except subprocess.CalledProcessError as exc:
|
|
107
|
+
print(f'ERROR #{exc.returncode}: {exc.stdout}')
|
|
108
|
+
sys.exit(exc.returncode)
|
|
108
109
|
|
|
109
110
|
with open(package_list.name) as infile:
|
|
110
111
|
for package in infile.readlines():
|
|
@@ -85,7 +85,7 @@ def git(cmd, stdout=None, stderr=None, path=None):
|
|
|
85
85
|
################################################################################
|
|
86
86
|
|
|
87
87
|
def git_run_status(cmd, stdout=None, stderr=None, path=None, redirect=True):
|
|
88
|
-
""" Wrapper for
|
|
88
|
+
""" Wrapper for subprocess.run that returns the output and status, and
|
|
89
89
|
does not raise an exception on error.
|
|
90
90
|
Optionally redirect stdout and stderr as specified. """
|
|
91
91
|
|