skilleter-thingy 0.0.89__py3-none-any.whl → 0.0.90__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.

@@ -68,7 +68,7 @@ Sub-commands:
68
68
  {+init,+dir,+config,GIT_COMMAND}
69
69
  +init Build or update the configuration file using the current branch in each repo as the default branch
70
70
  +config Return the name and location of the configuration file
71
- +dir Return the location of a working tree, given the repo name
71
+ +dir Return the location of a working tree, given the repo name, or if no parameter specified, the root directory of the multigit tree
72
72
  GIT_COMMAND Any git command, including options and parameters - this is then run in all specified working trees
73
73
 
74
74
  """
@@ -98,7 +98,7 @@ class Arguments():
98
98
  def error(msg, status=1):
99
99
  """Quit with an error"""
100
100
 
101
- sys.stderr.write(f'{msg}\n')
101
+ colour.write(f'[RED:ERROR:] {msg}\n', stream=sys.stderr)
102
102
  sys.exit(status)
103
103
 
104
104
  ################################################################################
@@ -248,29 +248,34 @@ def mg_init(args, config, console):
248
248
  ################################################################################
249
249
 
250
250
  def mg_dir(args, config, console):
251
- """Return the location of a working tree, given the name. Returns an
252
- error unless there is a unique match"""
251
+ """Return the location of a working tree, given the name, or the root directory
252
+ of the tree if not
253
+ Returns an error unless there is a unique match"""
253
254
 
254
255
  # DONE: Should return location relative to the current directory or as absolute path
255
256
 
256
257
  _ = console
257
258
  _ = config
258
259
 
259
- if len(args.parameters) != 1:
260
- error('The +dir command takes one parameter - the name of the working tree to search for')
261
260
 
262
- location = []
261
+ if len(args.parameters) > 1:
262
+ error('The +dir command takes no more than one parameter - the name of the working tree to search for')
263
+ elif args.parameters:
264
+ location = []
265
+ search_dir = args.parameters[0]
263
266
 
264
- for repo in select_git_repos(args, config):
265
- if fnmatch.fnmatch(repo['name'], args.parameters[0]):
266
- location.append(repo.name)
267
+ for repo in select_git_repos(args, config):
268
+ if fnmatch.fnmatch(repo['name'], search_dir):
269
+ location.append(repo.name)
267
270
 
268
- if len(location) == 0:
269
- error(f'No matches with {search_dir}')
270
- elif len(location) > 1:
271
- error(f'Multiple matches with {search_dir}')
271
+ if len(location) == 0:
272
+ error(f'No matches with [BLUE:{search_dir}]')
273
+ elif len(location) > 1:
274
+ error(f'Multiple matches with [BLUE:{search_dir}] - {" ".join(location)}')
272
275
 
273
- colour.write(os.path.join(os.path.dirname(args.configuration_file), location[0]))
276
+ colour.write(os.path.join(os.path.dirname(args.configuration_file), location[0]))
277
+ else:
278
+ colour.write(os.path.dirname(args.configuration_file))
274
279
 
275
280
  ################################################################################
276
281
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: skilleter_thingy
3
- Version: 0.0.89
3
+ Version: 0.0.90
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=hAMF5glefQ82_tMs-zGXj-5FGkXpytQZO5hjqjqA95M,16212
28
+ skilleter_thingy/multigit.py,sha256=-UzmnCHXTq3Wlsem1zm4QsEp8wIB1HZnFvpTo3R3h_o,16575
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.89.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
65
- skilleter_thingy-0.0.89.dist-info/METADATA,sha256=m_ybn_cE_YK_cnxhqEmXKxyPm32Kx5cYWuRPwcqURUA,8236
66
- skilleter_thingy-0.0.89.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
67
- skilleter_thingy-0.0.89.dist-info/entry_points.txt,sha256=u5ymS-KPljIGTnprV5yJsAjz7qgeT2BZ-Qo_Con_PFM,2145
68
- skilleter_thingy-0.0.89.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
69
- skilleter_thingy-0.0.89.dist-info/RECORD,,
64
+ skilleter_thingy-0.0.90.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
65
+ skilleter_thingy-0.0.90.dist-info/METADATA,sha256=JqhKf6MsYFBPaHNvtsPxEv0kbzzd9kVyWYdRmwDEVS8,8236
66
+ skilleter_thingy-0.0.90.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
67
+ skilleter_thingy-0.0.90.dist-info/entry_points.txt,sha256=u5ymS-KPljIGTnprV5yJsAjz7qgeT2BZ-Qo_Con_PFM,2145
68
+ skilleter_thingy-0.0.90.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
69
+ skilleter_thingy-0.0.90.dist-info/RECORD,,