skilleter-thingy 0.0.81__py3-none-any.whl → 0.0.82__py3-none-any.whl

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.

@@ -8,7 +8,6 @@ import argparse
8
8
  import fnmatch
9
9
  import configparser
10
10
  import shlex
11
- import pathlib
12
11
  from collections import defaultdict
13
12
 
14
13
  import thingy.git2 as git
@@ -102,13 +101,23 @@ def select_git_repos(args, config):
102
101
  or, return them all if no relevant options specified"""
103
102
 
104
103
  for repo in config.sections():
105
- # If wildcards are specified, then only match wildcards
104
+ # If repos are specified, then only match according to wildcards, full
105
+ # path or just basename.
106
106
 
107
107
  if args.repos:
108
- for card in args.repos:
109
- if fnmatch.fnmatch(repo, card):
108
+ for entry in args.repos:
109
+ if '?' in entry or '*' in entry:
110
+ if fnmatch.fnmatch(repo, entry):
111
+ matching = True
112
+ break
113
+ elif '/' in entry:
114
+ if repo == entry:
115
+ matching = True
116
+ break
117
+ elif os.path.basename(repo) == entry:
110
118
  matching = True
111
119
  break
120
+
112
121
  else:
113
122
  matching = False
114
123
  else:
@@ -139,6 +148,7 @@ def branch_name(name, default_branch):
139
148
  ################################################################################
140
149
 
141
150
  def run_git_status(cmd, path, cont=False, redirect=True):
151
+ """Run a git command and exit if it fails"""
142
152
 
143
153
  output, status = git.git_run_status(cmd, path=path, redirect=redirect)
144
154
 
@@ -351,7 +361,7 @@ def mg_checkout(args, config, console):
351
361
  if not args.quiet:
352
362
  show_progress(console.columns, repo.name)
353
363
 
354
- branch = branch_name(args.branch or repo.name['default branch'])
364
+ branch = branch_name(args.branch, repo['default branch'])
355
365
 
356
366
  if git.branch(path=repo.name) != branch:
357
367
  colour.write(f'Checking out [BLUE:{branch}] in [BOLD:{repo.name}]')
@@ -407,7 +417,7 @@ def mg_update(args, config, console):
407
417
  git.checkout(default_branch, path=repo.name)
408
418
 
409
419
  if not args.quiet:
410
- colour.write(f'Pulling updates from remote', indent=4)
420
+ colour.write('Pulling updates from remote', indent=4)
411
421
 
412
422
  git.pull(path=repo.name)
413
423
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: skilleter_thingy
3
- Version: 0.0.81
3
+ Version: 0.0.82
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
@@ -25,7 +25,7 @@ skilleter_thingy/gl.py,sha256=9zbGpKxw6lX9RghLkdy-Q5sZlqtbB3uGFO04qTu1dH8,5954
25
25
  skilleter_thingy/gphotosync.py,sha256=Vb2zYTEFp26BYdkG810SRg9afyfDqvq4CLHTk-MFf60,22388
26
26
  skilleter_thingy/linecount.py,sha256=5voQtjJjDCVx4zjPwVRy620NpuLiwwFitzxjIsRGtxQ,4310
27
27
  skilleter_thingy/moviemover.py,sha256=j_Xb9_jFdgpFBAXcF4tEqbnKH_FonlnUU39LiCK980k,4470
28
- skilleter_thingy/multigit.py,sha256=LPZjl2-VzTtAQRVozxgu7QAaVqiIylcKlYstnJcf9Dw,26021
28
+ skilleter_thingy/multigit.py,sha256=Q7KMrrwU1fROS0WAilPguo1u3q9vJWXMpy5pgrBCZvk,26418
29
29
  skilleter_thingy/photodupe.py,sha256=l0hbzSLb2Vk2ceteg-x9fHXCEE1uUuFo84hz5rsZUPA,4184
30
30
  skilleter_thingy/phototidier.py,sha256=5gSjlINUxf3ZQl3NG0o7CsWwODvTbokIMIafLFvn8Hc,7818
31
31
  skilleter_thingy/py_audit.py,sha256=xJm5k5qyeA6ii8mODa4dOkmP8L1drv94UHuxR54RsIM,4384
@@ -61,9 +61,9 @@ skilleter_thingy/thingy/run.py,sha256=6SNKWF01fSxzB10GMU9ajraXYZqAL1w0PXkqjJdr1U
61
61
  skilleter_thingy/thingy/tfm_pane.py,sha256=oqy5zBzKwfbjbGqetbbhpKi4x5He7sl4qkmhUeqtdZc,19789
62
62
  skilleter_thingy/thingy/tidy.py,sha256=71DCyj0VJrj52RmjQyj1eOiQJIfy5EIPHuThOrS6ZTA,5876
63
63
  skilleter_thingy/thingy/venv_template.py,sha256=SsVNvSwojd8NnFeQaZPCRQYTNdwJRplpZpygbUEXRnY,1015
64
- skilleter_thingy-0.0.81.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
65
- skilleter_thingy-0.0.81.dist-info/METADATA,sha256=Jvbejh1CK4TUDqNgFuJ2VrFASRHf-d5n2u0O6uWbg_8,6113
66
- skilleter_thingy-0.0.81.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
67
- skilleter_thingy-0.0.81.dist-info/entry_points.txt,sha256=u5ymS-KPljIGTnprV5yJsAjz7qgeT2BZ-Qo_Con_PFM,2145
68
- skilleter_thingy-0.0.81.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
69
- skilleter_thingy-0.0.81.dist-info/RECORD,,
64
+ skilleter_thingy-0.0.82.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
65
+ skilleter_thingy-0.0.82.dist-info/METADATA,sha256=Fm5VGC_pZ07L9yCx6Pm_ZtBqwUnVKJNgOD45Rsd3rH4,6113
66
+ skilleter_thingy-0.0.82.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
67
+ skilleter_thingy-0.0.82.dist-info/entry_points.txt,sha256=u5ymS-KPljIGTnprV5yJsAjz7qgeT2BZ-Qo_Con_PFM,2145
68
+ skilleter_thingy-0.0.82.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
69
+ skilleter_thingy-0.0.82.dist-info/RECORD,,