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

@@ -78,7 +78,7 @@ def main():
78
78
 
79
79
  # Get the list of files modified in the most recent commit
80
80
 
81
- current_commit = git.commit_info('HEAD', 'HEAD^')
81
+ current_commit = git.commit_changes()
82
82
 
83
83
  # Get the list of locally-modified and untracked files, including
84
84
  # files matching .gitignore, if necessary
@@ -0,0 +1,54 @@
1
+ #! /usr/bin/env python3
2
+
3
+ ################################################################################
4
+ """ Apply or update a tag, optionally updating it on the remote as well.
5
+
6
+ Copyright (C) 2025 John Skilleter
7
+
8
+ Licence: GPL v3 or later
9
+ """
10
+ ################################################################################
11
+
12
+ import sys
13
+ import argparse
14
+
15
+ import thingy.git2 as git
16
+
17
+ ################################################################################
18
+
19
+ def main():
20
+ """ Main function """
21
+
22
+ # Command line parameters
23
+
24
+ parser = argparse.ArgumentParser(description='Apply or update a tag, optionally updating it on the remote as well.')
25
+ parser.add_argument('--push', '-p', action='store_true', help='Push the tag to the remote')
26
+ parser.add_argument('tag', nargs=1, help='The tag')
27
+
28
+ args = parser.parse_args()
29
+
30
+ # Delete the tag if it currently exists, optionally pushing the deletion
31
+
32
+ if args.tag in git.tags():
33
+ git.tag_delete(args.tag, push=args.push)
34
+
35
+ # Apply the tag
36
+
37
+ git.tag_apply(args.tag, push=args.push)
38
+
39
+ ################################################################################
40
+
41
+ def git_retag():
42
+ """Entry point"""
43
+
44
+ try:
45
+ main()
46
+ except KeyboardInterrupt:
47
+ sys.exit(1)
48
+ except BrokenPipeError:
49
+ sys.exit(2)
50
+
51
+ ################################################################################
52
+
53
+ if __name__ == '__main__':
54
+ git_retag()
@@ -189,7 +189,27 @@ def tag():
189
189
  def tags():
190
190
  """ Return the list of tags in the current repo """
191
191
 
192
- return git(['tag'])
192
+ return git(['tag', '--list'])
193
+
194
+ ################################################################################
195
+
196
+ def tag_delete(tag, push=False):
197
+ """Delete a tag, optionally pushing the deletion"""
198
+
199
+ git(['tag', '-d', tag])
200
+
201
+ if push:
202
+ git(['push', '--delete', tag])
203
+
204
+ ################################################################################
205
+
206
+ def tag_apply(tag, push=False):
207
+ """Apply a tag, optionally pushing it"""
208
+
209
+ git(['tag', tag])
210
+
211
+ if push:
212
+ git(['push', tag])
193
213
 
194
214
  ################################################################################
195
215
 
@@ -917,6 +937,13 @@ def author(commit):
917
937
 
918
938
  ################################################################################
919
939
 
940
+ def commit_changes(commit='HEAD', path=None):
941
+ """Return a list of the files changed in a commit"""
942
+
943
+ return git(['show', '--name-only', '--pretty=format:', commit], path=path)
944
+
945
+ ################################################################################
946
+
920
947
  def files(dir=None):
921
948
  """ Return the output from 'git ls-files' """
922
949
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: skilleter_thingy
3
- Version: 0.1.15
3
+ Version: 0.1.16
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
@@ -8,13 +8,14 @@ skilleter_thingy/ffind.py,sha256=XJwH27rTLI0-zGD-7s8viyg7_SZjJaq5Q7VBbJPSYSI,192
8
8
  skilleter_thingy/ggit.py,sha256=_gJo3Pqangdwszga2YMRshJLNI3eGFZ7aP0Fu68yqzU,2465
9
9
  skilleter_thingy/ggrep.py,sha256=0zFyo9pxmYCuWrJgcH3Sj2hr7qOi02ijQuJ5teLbvCI,5863
10
10
  skilleter_thingy/git_br.py,sha256=-N6TcN_KwsIGxzNejLalO126HufU8OtQfexdQydiuO4,5799
11
- skilleter_thingy/git_ca.py,sha256=ewHCGLWpY8SdG_4OFdZ-YFg1GCmCesgQRXTWGMba1Ok,4944
11
+ skilleter_thingy/git_ca.py,sha256=ajPpmVsOsvBfMnf2P_8irUAa5N4a3cFQgLjN-by5LSg,4932
12
12
  skilleter_thingy/git_cleanup.py,sha256=8PAxf3ZeKYYAuiBZNHQrKd_PlYYs9_-OwrIWFCC8_xg,10201
13
13
  skilleter_thingy/git_co.py,sha256=0i8bOHJIA4zhyy_KWVWh8HbbEuQCKUAxASGZOdr_SYY,8205
14
14
  skilleter_thingy/git_common.py,sha256=ZjNkvIBRDGNLFYwOu9FjeqdDKJdm0sndX5QATtmq290,1879
15
15
  skilleter_thingy/git_hold.py,sha256=Zk6YUhr08znUOdpVJkJAt0rOtrCXnKE0NHoZzoaEEGo,4616
16
16
  skilleter_thingy/git_mr.py,sha256=g33FaRtJTbIQI0tfXv_a042YpGwtbg5fKw072aqjAdw,3086
17
17
  skilleter_thingy/git_parent.py,sha256=DLy38mo06R0YDyJWQjrP8pQS-qc7tvLYcn8unKqzEiQ,2774
18
+ skilleter_thingy/git_retag.py,sha256=70rbybb1M2sCUblmD2-iLVG0xdFq-Bl5HG0U1LRnAvs,1442
18
19
  skilleter_thingy/git_review.py,sha256=Vmepd1qHPM9eHYE19KNO0UWJIYhGhlwPlVBjbgFZ2PM,52448
19
20
  skilleter_thingy/git_update.py,sha256=nw-bnDFrMi7yNf7P6gGF8gzmJUjXU5PhWhOYPgApcX4,14350
20
21
  skilleter_thingy/git_wt.py,sha256=ZeflIastpy-ej7_qGxKQB6nlKsEHTjgEGg6z0I45Cck,2219
@@ -52,7 +53,7 @@ skilleter_thingy/thingy/dircolors.py,sha256=5NbXMsGWdABLvvZfB70VPmN6N5HyyihfpgoQ
52
53
  skilleter_thingy/thingy/docker.py,sha256=9EFatudoVPfB1UbDEtzdJDB3o6ToHiNHv8-oLsUeqiQ,2449
53
54
  skilleter_thingy/thingy/files.py,sha256=oW6E6WWwVFSUPdrZnKMx7P_w_hh3etjoN7RrqvYHCHc,4705
54
55
  skilleter_thingy/thingy/git.py,sha256=5EYzj6kxXZCK8E7AhiNPOyLYydCB86amnU6uyDEPfS4,38902
55
- skilleter_thingy/thingy/git2.py,sha256=5sBGIa01PyidcyViNSAqcj5C97zbK7qwMM2RHQKZhqM,37141
56
+ skilleter_thingy/thingy/git2.py,sha256=ZzAq3DvJS91E4ahJA5eQDx0ejeXbFv7sk8xy_iB-ue8,37895
56
57
  skilleter_thingy/thingy/gitlab.py,sha256=uXAF918xnPk6qQyiwPQDbMZfqtJzhiRqDS7yEtJEIAg,6079
57
58
  skilleter_thingy/thingy/path.py,sha256=8uM2Q9zFRWv_SaVOX49PeecQXttl7J6lsmBuRXWsXKY,4732
58
59
  skilleter_thingy/thingy/popup.py,sha256=jW-nbpdeswqEMTli7OmBv1J8XQsvFoMI0J33O6dOeu8,2529
@@ -61,9 +62,9 @@ skilleter_thingy/thingy/run.py,sha256=6SNKWF01fSxzB10GMU9ajraXYZqAL1w0PXkqjJdr1U
61
62
  skilleter_thingy/thingy/tfm_pane.py,sha256=oqy5zBzKwfbjbGqetbbhpKi4x5He7sl4qkmhUeqtdZc,19789
62
63
  skilleter_thingy/thingy/tidy.py,sha256=UWpBWuIMCE1UonLJErb41yW3RtpXrK_bt4Z4cZR-eDU,5910
63
64
  skilleter_thingy/thingy/venv_template.py,sha256=SsVNvSwojd8NnFeQaZPCRQYTNdwJRplpZpygbUEXRnY,1015
64
- skilleter_thingy-0.1.15.dist-info/licenses/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
65
- skilleter_thingy-0.1.15.dist-info/METADATA,sha256=7fRlyFMGQ7jSFD75jREKT91ASXTssscVCDa1GJvVpt4,29914
66
- skilleter_thingy-0.1.15.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
67
- skilleter_thingy-0.1.15.dist-info/entry_points.txt,sha256=eGQNF-s-RGnOAyJqz_f9EPS0ExGsBmAmzwb3FlSmZzM,2209
68
- skilleter_thingy-0.1.15.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
69
- skilleter_thingy-0.1.15.dist-info/RECORD,,
65
+ skilleter_thingy-0.1.16.dist-info/licenses/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
66
+ skilleter_thingy-0.1.16.dist-info/METADATA,sha256=PoMmNKfujQVWQET7PmXJpWTUgItG9H41RF6dGOT6Mss,29914
67
+ skilleter_thingy-0.1.16.dist-info/WHEEL,sha256=Nw36Djuh_5VDukK0H78QzOX-_FQEo6V37m3nkm96gtU,91
68
+ skilleter_thingy-0.1.16.dist-info/entry_points.txt,sha256=mklrWFvNKw9Hyem9RG3x0PoVYjlx2fDnJ3xWMTMOmfs,2258
69
+ skilleter_thingy-0.1.16.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
70
+ skilleter_thingy-0.1.16.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.4.0)
2
+ Generator: setuptools (80.7.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -15,6 +15,7 @@ git-common = skilleter_thingy:git_common.git_common
15
15
  git-hold = skilleter_thingy:git_hold.git_hold
16
16
  git-mr = skilleter_thingy:git_mr.git_mr
17
17
  git-parent = skilleter_thingy:git_parent.git_parent
18
+ git-retag = skilleter_thingy:git_retag.git_retag
18
19
  git-review = skilleter_thingy:git_review.git_review
19
20
  git-update = skilleter_thingy:git_update.git_update
20
21
  git-wt = skilleter_thingy:git_wt.git_wt