skilleter-thingy 0.1.28__py3-none-any.whl → 0.1.29__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.
- skilleter_thingy/multigit.py +20 -3
- skilleter_thingy/thingy/colour.py +11 -0
- {skilleter_thingy-0.1.28.dist-info → skilleter_thingy-0.1.29.dist-info}/METADATA +1 -1
- {skilleter_thingy-0.1.28.dist-info → skilleter_thingy-0.1.29.dist-info}/RECORD +8 -8
- {skilleter_thingy-0.1.28.dist-info → skilleter_thingy-0.1.29.dist-info}/WHEEL +0 -0
- {skilleter_thingy-0.1.28.dist-info → skilleter_thingy-0.1.29.dist-info}/entry_points.txt +0 -0
- {skilleter_thingy-0.1.28.dist-info → skilleter_thingy-0.1.29.dist-info}/licenses/LICENSE +0 -0
- {skilleter_thingy-0.1.28.dist-info → skilleter_thingy-0.1.29.dist-info}/top_level.txt +0 -0
skilleter_thingy/multigit.py
CHANGED
|
@@ -317,6 +317,8 @@ def add_new_repo(args, config, repo):
|
|
|
317
317
|
|
|
318
318
|
abs_repo_path = absolute_repo_path(args, repo)
|
|
319
319
|
|
|
320
|
+
added = repo not in config
|
|
321
|
+
|
|
320
322
|
config[repo] = {}
|
|
321
323
|
|
|
322
324
|
default_branch = git.branch(path=abs_repo_path)
|
|
@@ -335,7 +337,10 @@ def add_new_repo(args, config, repo):
|
|
|
335
337
|
config[repo]['repo name'] = os.path.basename(repo)
|
|
336
338
|
|
|
337
339
|
if not args.quiet:
|
|
338
|
-
|
|
340
|
+
if added:
|
|
341
|
+
colour.write(f'Added [BLUE:{repo}] with default branch [BLUE:{default_branch}]')
|
|
342
|
+
else:
|
|
343
|
+
colour.write(f'Reset [BLUE:{repo}] with default branch [BLUE:{default_branch}]')
|
|
339
344
|
|
|
340
345
|
################################################################################
|
|
341
346
|
|
|
@@ -472,9 +477,21 @@ def mg_add(args, config, console):
|
|
|
472
477
|
location = args.parameters[1]
|
|
473
478
|
|
|
474
479
|
if os.path.exists(location):
|
|
475
|
-
|
|
480
|
+
if os.path.isdir(os.path.join(location, '.git')):
|
|
481
|
+
remotes = git.remotes(path=location)
|
|
482
|
+
|
|
483
|
+
for remote in remotes:
|
|
484
|
+
if repo.endswith('.git') and repo == remotes[remote]:
|
|
485
|
+
break
|
|
486
|
+
elif f'{repo}.git' == remotes[remote]:
|
|
487
|
+
break
|
|
488
|
+
else:
|
|
489
|
+
colour.error(f'"[BLUE:{location}]" already exists and was not cloned from [BLUE:{repo}]', prefix=True)
|
|
490
|
+
else:
|
|
491
|
+
colour.error(f'"[BLUE:{location}]" already exists and is not a Git working tree')
|
|
476
492
|
|
|
477
|
-
|
|
493
|
+
else:
|
|
494
|
+
git.clone(repo, path=location)
|
|
478
495
|
|
|
479
496
|
# Add to the configuration
|
|
480
497
|
|
|
@@ -198,6 +198,17 @@ def error(txt, newline=True, stream=sys.stderr, status=1, prefix=False):
|
|
|
198
198
|
|
|
199
199
|
################################################################################
|
|
200
200
|
|
|
201
|
+
def warning(txt, newline=True, stream=sys.stderr, prefix=False):
|
|
202
|
+
""" Write a warning message to the specified stream (defaulting to
|
|
203
|
+
stderr). Prefix the output with 'WARNING:' in red if prefix==True """
|
|
204
|
+
|
|
205
|
+
if prefix:
|
|
206
|
+
write('[RED:WARNING]: ', newline=False, stream=stream, )
|
|
207
|
+
|
|
208
|
+
write(txt, newline, stream)
|
|
209
|
+
|
|
210
|
+
################################################################################
|
|
211
|
+
|
|
201
212
|
if __name__ == '__main__':
|
|
202
213
|
write('Foreground: [RED]red [GREEN]green [BLACK]black [NORMAL]normal')
|
|
203
214
|
write('Background: [BRED]red [BGREEN]green [BBLACK]black [NORMAL]normal')
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: skilleter_thingy
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.29
|
|
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/linecount.py,sha256=ehTN6VD76i4U5k6dXuYoiqSRHI67_BP-bziklNAJSKY,4309
|
|
26
26
|
skilleter_thingy/localphotosync.py,sha256=WF0TcCvLfl7cVOLzYYQK_t2WebLfQ-5FM6UB3r7Fpvw,5952
|
|
27
27
|
skilleter_thingy/moviemover.py,sha256=QzUAWQzQ1AWWREIhl-VMaLo2h8MMhOekBnao5jGWV1s,4470
|
|
28
|
-
skilleter_thingy/multigit.py,sha256=
|
|
28
|
+
skilleter_thingy/multigit.py,sha256=rnQ0YGkEy6H54PRt8nCt-G02LGy-wiKRJVk8ovR_pTw,35179
|
|
29
29
|
skilleter_thingy/photodupe.py,sha256=2hw4EhDKH37_BgdXKkPm9GrftfIORmubQi38Yn0b4Mg,4084
|
|
30
30
|
skilleter_thingy/phototidier.py,sha256=BOu-cKHMivDlBqlRqv7sL3J6Ix1K2dxWWNcderldyZo,7818
|
|
31
31
|
skilleter_thingy/py_audit.py,sha256=4CAdqBAIIVcpTCn_7dGm56bdfGpUtUJofqTGZomClkY,4417
|
|
@@ -44,7 +44,7 @@ skilleter_thingy/window_rename.py,sha256=dCBgZqih_3YKHt35hsOAhARFp3QxOi8w8huC63s
|
|
|
44
44
|
skilleter_thingy/xchmod.py,sha256=T89xiH_po0nvH5T1AGgQOD5yhjKd9-LcHcmez3IORww,4604
|
|
45
45
|
skilleter_thingy/yamlcheck.py,sha256=FXylZ5NtHirDlPVhVEUZUZkTugVR-g51BbjaN06akAc,2868
|
|
46
46
|
skilleter_thingy/thingy/__init__.py,sha256=rVPTxm8L5w52U0YdTd7r_D44SBP7pS3JCJtsf0iIsow,110
|
|
47
|
-
skilleter_thingy/thingy/colour.py,sha256=
|
|
47
|
+
skilleter_thingy/thingy/colour.py,sha256=mxHDpbUYad6xDsOKWco7CL0Nk3J5VKV_IZ3T5VjXwOI,7978
|
|
48
48
|
skilleter_thingy/thingy/dc_curses.py,sha256=fuuQPR11zV_akAhygL_cAhVLC5YAgKgowzlITVbETE8,8539
|
|
49
49
|
skilleter_thingy/thingy/dc_defaults.py,sha256=ahcteQvoWZrO5iTU68zkIY1Zex6iX5uR5ubwI4CCYBk,6170
|
|
50
50
|
skilleter_thingy/thingy/dc_util.py,sha256=Df73imXhHx3HzcPHiRcHAoea0e3HURdLcrolUsMhOFs,1783
|
|
@@ -61,9 +61,9 @@ skilleter_thingy/thingy/run.py,sha256=6SNKWF01fSxzB10GMU9ajraXYZqAL1w0PXkqjJdr1U
|
|
|
61
61
|
skilleter_thingy/thingy/tfm_pane.py,sha256=XTTpSm71CyQyGmlVLuCthioOwech0jhUiFUXb-chS_Q,19792
|
|
62
62
|
skilleter_thingy/thingy/tidy.py,sha256=AQ2RawsZJg6WHrgayi_ZptFL9occ7suSdCHbU3P-cys,5971
|
|
63
63
|
skilleter_thingy/thingy/venv_template.py,sha256=SsVNvSwojd8NnFeQaZPCRQYTNdwJRplpZpygbUEXRnY,1015
|
|
64
|
-
skilleter_thingy-0.1.
|
|
65
|
-
skilleter_thingy-0.1.
|
|
66
|
-
skilleter_thingy-0.1.
|
|
67
|
-
skilleter_thingy-0.1.
|
|
68
|
-
skilleter_thingy-0.1.
|
|
69
|
-
skilleter_thingy-0.1.
|
|
64
|
+
skilleter_thingy-0.1.29.dist-info/licenses/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
|
65
|
+
skilleter_thingy-0.1.29.dist-info/METADATA,sha256=DlnH54zxSd8HRZ1-BUOYZxXZziID__gkX8_N0oeDLkw,30430
|
|
66
|
+
skilleter_thingy-0.1.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
67
|
+
skilleter_thingy-0.1.29.dist-info/entry_points.txt,sha256=mklrWFvNKw9Hyem9RG3x0PoVYjlx2fDnJ3xWMTMOmfs,2258
|
|
68
|
+
skilleter_thingy-0.1.29.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
|
|
69
|
+
skilleter_thingy-0.1.29.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|