repo fixed
This commit is contained in:
parent
418f82bb97
commit
62a77d0fef
@ -1,24 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import subprocess
|
import subprocess
|
||||||
import argparse
|
import argparse
|
||||||
|
from helpers import Colors, print_colored, SCRIPT_DESCRIPTION, SCRIPT_EPILOG
|
||||||
class Colors:
|
|
||||||
HEADER = '\033[95m'
|
|
||||||
BLUE = '\033[94m'
|
|
||||||
GREEN = '\033[92m'
|
|
||||||
YELLOW = '\033[93m'
|
|
||||||
RED = '\033[91m'
|
|
||||||
ENDC = '\033[0m'
|
|
||||||
BOLD = '\033[1m'
|
|
||||||
|
|
||||||
def print_colored(message, color, bold=False):
|
|
||||||
"""
|
|
||||||
Print a colored message to the terminal
|
|
||||||
"""
|
|
||||||
if bold:
|
|
||||||
print(f"{Colors.BOLD}{color}{message}{Colors.ENDC}")
|
|
||||||
else:
|
|
||||||
print(f"{color}{message}{Colors.ENDC}")
|
|
||||||
|
|
||||||
def create_new_branch(repo_path, branch_name):
|
def create_new_branch(repo_path, branch_name):
|
||||||
"""
|
"""
|
||||||
@ -127,18 +110,8 @@ def main():
|
|||||||
# Setup argument parser with detailed help
|
# Setup argument parser with detailed help
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
prog='mob_repos.py',
|
prog='mob_repos.py',
|
||||||
description='''
|
description=SCRIPT_DESCRIPTION,
|
||||||
Git repository management script for multiple repositories.
|
epilog=SCRIPT_EPILOG,
|
||||||
This script helps manage multiple Git repositories defined in repos.txt file.
|
|
||||||
It can perform bulk operations like switching to develop branch, pulling latest changes,
|
|
||||||
or creating new branches across all repositories.
|
|
||||||
''',
|
|
||||||
epilog='''
|
|
||||||
Examples:
|
|
||||||
python3 mob_repos.py # Switch to develop and pull in all repos
|
|
||||||
python3 mob_repos.py -bc feature/GND1111-testing-repo # Create new branch from develop in all repos
|
|
||||||
python3 mob_repos.py --help # Show this help message
|
|
||||||
''',
|
|
||||||
formatter_class=argparse.RawDescriptionHelpFormatter
|
formatter_class=argparse.RawDescriptionHelpFormatter
|
||||||
)
|
)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user