skilleter-thingy 0.1.9__py3-none-any.whl → 0.1.11__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/git_wt.py +11 -32
- skilleter_thingy/multigit.py +4 -1
- skilleter_thingy/thingy/git2.py +1 -1
- {skilleter_thingy-0.1.9.dist-info → skilleter_thingy-0.1.11.dist-info}/METADATA +1 -1
- {skilleter_thingy-0.1.9.dist-info → skilleter_thingy-0.1.11.dist-info}/RECORD +9 -9
- {skilleter_thingy-0.1.9.dist-info → skilleter_thingy-0.1.11.dist-info}/WHEEL +1 -1
- {skilleter_thingy-0.1.9.dist-info → skilleter_thingy-0.1.11.dist-info}/entry_points.txt +0 -0
- {skilleter_thingy-0.1.9.dist-info → skilleter_thingy-0.1.11.dist-info}/licenses/LICENSE +0 -0
- {skilleter_thingy-0.1.9.dist-info → skilleter_thingy-0.1.11.dist-info}/top_level.txt +0 -0
skilleter_thingy/git_wt.py
CHANGED
|
@@ -14,7 +14,7 @@ import sys
|
|
|
14
14
|
import argparse
|
|
15
15
|
import os
|
|
16
16
|
|
|
17
|
-
import
|
|
17
|
+
import thingy.git2 as git
|
|
18
18
|
|
|
19
19
|
################################################################################
|
|
20
20
|
|
|
@@ -28,48 +28,27 @@ def main():
|
|
|
28
28
|
help='If we are already at the top of the working tree, check if the parent directory is in a working tree and output the top-level directory of that tree.')
|
|
29
29
|
parser.add_argument('--dir', '-d', action='store', default=os.getcwd(),
|
|
30
30
|
help='Find the location of the top-level directory in the working tree starting at the specified directory')
|
|
31
|
-
|
|
31
|
+
|
|
32
32
|
args = parser.parse_args()
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
start_dir = os.path.abspath(args.dir)
|
|
35
|
+
|
|
36
|
+
if not os.path.isdir(start_dir):
|
|
37
|
+
sys.stderr.write(f'Unable to locate directory {args.dir}\n')
|
|
36
38
|
sys.exit(1)
|
|
37
39
|
|
|
38
|
-
#
|
|
40
|
+
# Search for a .git directory in the current or parent directories
|
|
39
41
|
|
|
40
|
-
|
|
41
|
-
working_tree = pygit2.Repository(args.dir).workdir
|
|
42
|
-
except pygit2.GitError:
|
|
43
|
-
print(f'Directory {args.dir} is not in a Git working tree')
|
|
44
|
-
sys.exit(2)
|
|
42
|
+
working_tree = git.working_tree(start_dir)
|
|
45
43
|
|
|
46
44
|
# If we are in a working tree and also looking for the parent working
|
|
47
45
|
# tree, check if we are at the top of the current tree, and, if so,
|
|
48
46
|
# hop up a level and try again.
|
|
49
47
|
|
|
50
|
-
if args.parent:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
if os.path.samefile(working_tree, current_directory):
|
|
54
|
-
os.chdir('..')
|
|
55
|
-
current_directory = os.getcwd()
|
|
56
|
-
|
|
57
|
-
try:
|
|
58
|
-
working_tree = pygit2.Repository(current_directory).workdir
|
|
59
|
-
except pygit2.GitError:
|
|
60
|
-
print(f'Parent directory {current_directory} is not in a Git working tree')
|
|
61
|
-
sys.exit(3)
|
|
62
|
-
|
|
63
|
-
# Output the result, if we have one
|
|
64
|
-
|
|
65
|
-
if args.level:
|
|
66
|
-
start = args.dir.split('/')
|
|
67
|
-
working = working_tree.split('/')
|
|
68
|
-
|
|
69
|
-
working_tree = os.path.join(working_tree, '/'.join(start[len(working):len(working) + int(args.level)]))
|
|
48
|
+
if args.parent and working_tree == start_dir:
|
|
49
|
+
working_tree = git.working_tree(working_tree.parent)
|
|
70
50
|
|
|
71
|
-
|
|
72
|
-
print(working_tree)
|
|
51
|
+
print(working_tree)
|
|
73
52
|
|
|
74
53
|
################################################################################
|
|
75
54
|
|
skilleter_thingy/multigit.py
CHANGED
|
@@ -733,7 +733,10 @@ def main():
|
|
|
733
733
|
# Run an internal or external command-specific validation
|
|
734
734
|
|
|
735
735
|
if args.internal_command:
|
|
736
|
-
#
|
|
736
|
+
# Everything except '+init' and '+clone' requires the configuration file
|
|
737
|
+
|
|
738
|
+
if args.command not in ('init', 'clone') and args.configuration_file is None:
|
|
739
|
+
error('Configuration file not found')
|
|
737
740
|
|
|
738
741
|
COMMANDS[args.command](args, config, console)
|
|
739
742
|
|
skilleter_thingy/thingy/git2.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: skilleter_thingy
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.11
|
|
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
|
|
@@ -17,14 +17,14 @@ skilleter_thingy/git_mr.py,sha256=g33FaRtJTbIQI0tfXv_a042YpGwtbg5fKw072aqjAdw,30
|
|
|
17
17
|
skilleter_thingy/git_parent.py,sha256=DLy38mo06R0YDyJWQjrP8pQS-qc7tvLYcn8unKqzEiQ,2774
|
|
18
18
|
skilleter_thingy/git_review.py,sha256=Vmepd1qHPM9eHYE19KNO0UWJIYhGhlwPlVBjbgFZ2PM,52448
|
|
19
19
|
skilleter_thingy/git_update.py,sha256=nw-bnDFrMi7yNf7P6gGF8gzmJUjXU5PhWhOYPgApcX4,14350
|
|
20
|
-
skilleter_thingy/git_wt.py,sha256=
|
|
20
|
+
skilleter_thingy/git_wt.py,sha256=YrMGDuLC_glRzN9-6wkTIfZkhtDqstWajzDjjCVjp9U,2176
|
|
21
21
|
skilleter_thingy/gitcmp_helper.py,sha256=wutDHpBPOX8ZsXbsC5ApHxMY5tOKgD3P0eyFVs_mSAI,11214
|
|
22
22
|
skilleter_thingy/gitprompt.py,sha256=SzSMd0EGI7ftPko80Q2PipwbVA-qjU1jsmdpmTCM5GI,8912
|
|
23
23
|
skilleter_thingy/gl.py,sha256=9zbGpKxw6lX9RghLkdy-Q5sZlqtbB3uGFO04qTu1dH8,5954
|
|
24
24
|
skilleter_thingy/gphotosync.py,sha256=M0yzt5IxCHezkCOQwz3Chn8oudY_M7PRffboIUFLedk,22477
|
|
25
25
|
skilleter_thingy/linecount.py,sha256=ehTN6VD76i4U5k6dXuYoiqSRHI67_BP-bziklNAJSKY,4309
|
|
26
26
|
skilleter_thingy/moviemover.py,sha256=QzUAWQzQ1AWWREIhl-VMaLo2h8MMhOekBnao5jGWV1s,4470
|
|
27
|
-
skilleter_thingy/multigit.py,sha256=
|
|
27
|
+
skilleter_thingy/multigit.py,sha256=TMfu6PCx0alxmv-qNwNnbG4rl4_eW3OrBZtvtGnuCWE,28708
|
|
28
28
|
skilleter_thingy/photodupe.py,sha256=l0hbzSLb2Vk2ceteg-x9fHXCEE1uUuFo84hz5rsZUPA,4184
|
|
29
29
|
skilleter_thingy/phototidier.py,sha256=BOu-cKHMivDlBqlRqv7sL3J6Ix1K2dxWWNcderldyZo,7818
|
|
30
30
|
skilleter_thingy/py_audit.py,sha256=xJm5k5qyeA6ii8mODa4dOkmP8L1drv94UHuxR54RsIM,4384
|
|
@@ -51,7 +51,7 @@ skilleter_thingy/thingy/dircolors.py,sha256=5NbXMsGWdABLvvZfB70VPmN6N5HyyihfpgoQ
|
|
|
51
51
|
skilleter_thingy/thingy/docker.py,sha256=9EFatudoVPfB1UbDEtzdJDB3o6ToHiNHv8-oLsUeqiQ,2449
|
|
52
52
|
skilleter_thingy/thingy/files.py,sha256=oW6E6WWwVFSUPdrZnKMx7P_w_hh3etjoN7RrqvYHCHc,4705
|
|
53
53
|
skilleter_thingy/thingy/git.py,sha256=5EYzj6kxXZCK8E7AhiNPOyLYydCB86amnU6uyDEPfS4,38902
|
|
54
|
-
skilleter_thingy/thingy/git2.py,sha256=
|
|
54
|
+
skilleter_thingy/thingy/git2.py,sha256=5sBGIa01PyidcyViNSAqcj5C97zbK7qwMM2RHQKZhqM,37141
|
|
55
55
|
skilleter_thingy/thingy/gitlab.py,sha256=uXAF918xnPk6qQyiwPQDbMZfqtJzhiRqDS7yEtJEIAg,6079
|
|
56
56
|
skilleter_thingy/thingy/path.py,sha256=8uM2Q9zFRWv_SaVOX49PeecQXttl7J6lsmBuRXWsXKY,4732
|
|
57
57
|
skilleter_thingy/thingy/popup.py,sha256=jW-nbpdeswqEMTli7OmBv1J8XQsvFoMI0J33O6dOeu8,2529
|
|
@@ -60,9 +60,9 @@ skilleter_thingy/thingy/run.py,sha256=6SNKWF01fSxzB10GMU9ajraXYZqAL1w0PXkqjJdr1U
|
|
|
60
60
|
skilleter_thingy/thingy/tfm_pane.py,sha256=oqy5zBzKwfbjbGqetbbhpKi4x5He7sl4qkmhUeqtdZc,19789
|
|
61
61
|
skilleter_thingy/thingy/tidy.py,sha256=UWpBWuIMCE1UonLJErb41yW3RtpXrK_bt4Z4cZR-eDU,5910
|
|
62
62
|
skilleter_thingy/thingy/venv_template.py,sha256=SsVNvSwojd8NnFeQaZPCRQYTNdwJRplpZpygbUEXRnY,1015
|
|
63
|
-
skilleter_thingy-0.1.
|
|
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.
|
|
63
|
+
skilleter_thingy-0.1.11.dist-info/licenses/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
|
64
|
+
skilleter_thingy-0.1.11.dist-info/METADATA,sha256=yIfo6Rkwh-OiB1HH9K5VCeN7MDDptlnL48VCb65iUO8,29874
|
|
65
|
+
skilleter_thingy-0.1.11.dist-info/WHEEL,sha256=0CuiUZ_p9E4cD6NyLD6UG80LBXYyiSYZOKDm5lp32xk,91
|
|
66
|
+
skilleter_thingy-0.1.11.dist-info/entry_points.txt,sha256=u5ymS-KPljIGTnprV5yJsAjz7qgeT2BZ-Qo_Con_PFM,2145
|
|
67
|
+
skilleter_thingy-0.1.11.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
|
|
68
|
+
skilleter_thingy-0.1.11.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|