ScriptCollection 4.2.125__py3-none-any.whl → 4.2.127__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.
@@ -299,7 +299,7 @@ def UpdateDependencies() -> int:
299
299
  parser.add_argument('--targetenvironment', required=False, default="QualityCheck")
300
300
  parser.add_argument('--additionalargumentsfile', required=False, default=None)
301
301
  parser.add_argument("-c",'--nocache', required=False, default=False, action='store_true')
302
- args = parser.parse_args()
302
+ args = parser.parse_args()
303
303
  verbosity=LogLevel(int(args.verbosity))
304
304
  repo:str=GeneralUtilities.resolve_relative_path(args.repositoryfolder,os.getcwd())
305
305
  t:TFCPS_CodeUnit_BuildCodeUnits=TFCPS_CodeUnit_BuildCodeUnits(repo,verbosity,args.targetenvironment,args.additionalargumentsfile,not args.nocache,False,False)
@@ -38,7 +38,7 @@ from .ProgramRunnerBase import ProgramRunnerBase
38
38
  from .ProgramRunnerPopen import ProgramRunnerPopen
39
39
  from .SCLog import SCLog, LogLevel
40
40
 
41
- version = "4.2.125"
41
+ version = "4.2.127"
42
42
  __version__ = version
43
43
 
44
44
  class VSCodeWorkspaceShellTask:
@@ -535,6 +535,15 @@ class ScriptCollectionCore:
535
535
  self.assert_is_git_repository(folder)
536
536
  self.run_program_argsasarray("git", ["push", remotename, "--delete", branchname], folder, throw_exception_if_exitcode_is_not_zero=True)
537
537
 
538
+ @GeneralUtilities.check_arguments
539
+ def git_create_branch(self, folder: str, new_branch_name: str, base: str = "HEAD", checkout: bool = True) -> None:
540
+ self.assert_is_git_repository(folder)
541
+ if checkout:
542
+ args = ["checkout", "-b", new_branch_name, base]
543
+ else:
544
+ args = ["branch", new_branch_name, base]
545
+ self.run_program_argsasarray("git", args, folder, throw_exception_if_exitcode_is_not_zero=True)
546
+
538
547
  @GeneralUtilities.check_arguments
539
548
  def git_push_with_retry(self, folder: str, remotename: str, localbranchname: str, remotebranchname: str, forcepush: bool = False, pushalltags: bool = True, verbosity: LogLevel = LogLevel.Quiet, amount_of_attempts: int = 5) -> None:
540
549
  GeneralUtilities.retry_action(lambda: self.git_push(folder, remotename, localbranchname, remotebranchname, forcepush, pushalltags, verbosity), amount_of_attempts)
@@ -988,6 +997,9 @@ class ScriptCollectionCore:
988
997
  @GeneralUtilities.check_arguments
989
998
  def assert_no_uncommitted_changes(self, repository_folder: str,custom_message:str=None) -> None:
990
999
  if self.git_repository_has_uncommitted_changes(repository_folder):
1000
+ status_result = self.run_program("git", "status --porcelain=v1", repository_folder, throw_exception_if_exitcode_is_not_zero=False)
1001
+ GeneralUtilities.write_message_to_stderr(f"Uncommitted changes in '{repository_folder}':")
1002
+ GeneralUtilities.write_message_to_stderr(status_result[1])
991
1003
  if custom_message:
992
1004
  raise ValueError(f"Repository '{repository_folder}' has uncommitted changes: "+custom_message)
993
1005
  else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scriptcollection
3
- Version: 4.2.125
3
+ Version: 4.2.127
4
4
  Summary: The ScriptCollection is the place for reusable scripts.
5
5
  Author-email: Marius Göcke <marius.goecke@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/anionDev/ScriptCollection
@@ -1,6 +1,6 @@
1
1
  ScriptCollection/AnionBuildPlatform.py,sha256=9h74ltLwt1Lt-C9NSdn3PBP5YryZhFSczkr4MBCqNAs,11783
2
2
  ScriptCollection/CertificateUpdater.py,sha256=dR5JpJDlZdjD4_pgMz7zCrt1IM7VfatmK6pULSczxQw,9693
3
- ScriptCollection/Executables.py,sha256=a8uSVP1bppRK-6zWSp-uz9z0hUaNRji1gMZ507SVO38,50091
3
+ ScriptCollection/Executables.py,sha256=zWI6RxMnJ1n8K76hkauBlnSbhd3vKBwJrwNAXx6sqGQ,50087
4
4
  ScriptCollection/GeneralUtilities.py,sha256=NOdih5ZSQTHBYwe-ncTXXGCmGkofdDjChA_PV6dj0is,67672
5
5
  ScriptCollection/HTTPMaintenanceOverheadHelper.py,sha256=TToNtyO1XzsMbBsTBf3o0xgOK0v4Jf03qw2Z0xb2nCk,2007
6
6
  ScriptCollection/ProcessesRunner.py,sha256=o5raxIt3lknNPoPrjNzJ2bprRPJ3SnL0rrR7crraD7E,1523
@@ -9,7 +9,7 @@ ScriptCollection/ProgramRunnerMock.py,sha256=uTu-aFle1W_oKjeQEmuPsFPQpvo0kRf2FrR
9
9
  ScriptCollection/ProgramRunnerPopen.py,sha256=8tP0xWKeRYoGlaNB3iUh4o61O-tKtcxrS7IUqtU85C4,4091
10
10
  ScriptCollection/ProgramRunnerSudo.py,sha256=4lxbUFMIWMbthM5Q_QaFjvZfAsNpKlXeqfEbiofg_DI,5109
11
11
  ScriptCollection/SCLog.py,sha256=8TRy1LeYMsPOIuWUcnUNNbO5pd-cNBS-3cn-kdzP8FU,4768
12
- ScriptCollection/ScriptCollectionCore.py,sha256=qEgTq5JUwV0C1lDpF1JuWfGFOsIzShxD8tZY9Y9JSZQ,205530
12
+ ScriptCollection/ScriptCollectionCore.py,sha256=qwYM3QCup1AbrVCahrGL-3y1fgESJQw-b6BLjcQncms,206304
13
13
  ScriptCollection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  ScriptCollection/OCIImages/AbstractImageHandler.py,sha256=o129UYDtLymCRjMZBP9Puaj19ueMHoNt6UTLspfnaRc,1758
15
15
  ScriptCollection/OCIImages/OCIImageManager.py,sha256=en97kK75sc7ZJOkX7VE_ZwycfasTBAQQCSQdPIYC91s,12451
@@ -53,8 +53,8 @@ ScriptCollection/TFCPS/Python/TFCPS_CodeUnitSpecific_Python.py,sha256=fqGhXNx8tK
53
53
  ScriptCollection/TFCPS/Python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
54
54
  ScriptCollection/TFCPS/Rust/TFCPS_CodeUnitSpecific_Rust.py,sha256=WhOsMpJxNGqnQGA3nJ99ruyqymxBeJxCcpK98zJduTo,1680
55
55
  ScriptCollection/TFCPS/Rust/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
56
- scriptcollection-4.2.125.dist-info/METADATA,sha256=7TQoAanUnIcyid0UY-PywunJ7Ol_o1B05a4zANJ6wnI,7697
57
- scriptcollection-4.2.125.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
58
- scriptcollection-4.2.125.dist-info/entry_points.txt,sha256=ySZ09rptnBxyfpU-K62zmoUFH-0xWZUxzoPScoXubrg,5045
59
- scriptcollection-4.2.125.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
60
- scriptcollection-4.2.125.dist-info/RECORD,,
56
+ scriptcollection-4.2.127.dist-info/METADATA,sha256=1Gu2bXe0YfzNa8g3k40fIC5QezUDsXv8-LNvnq-NSrc,7697
57
+ scriptcollection-4.2.127.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
58
+ scriptcollection-4.2.127.dist-info/entry_points.txt,sha256=ySZ09rptnBxyfpU-K62zmoUFH-0xWZUxzoPScoXubrg,5045
59
+ scriptcollection-4.2.127.dist-info/top_level.txt,sha256=hY2hOVH0V0Ce51WB76zKkIWTUNwMUdHo4XDkR2vYVwg,17
60
+ scriptcollection-4.2.127.dist-info/RECORD,,