Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
10f40f4d00 | |||
1a7129d632 | |||
49874b7785 |
@@ -21,11 +21,17 @@ def help():
|
||||
return "plop"
|
||||
|
||||
|
||||
|
||||
def add_specific_arguments(my_args, section):
|
||||
my_args.add("d", "download", haveParam=False, desc="Just download not download repository")
|
||||
|
||||
def execute(arguments):
|
||||
if len(arguments) != 0:
|
||||
debug.error("Sync have not parameter")
|
||||
just_download = False
|
||||
for elem in arguments:
|
||||
if elem.get_option_name() == "download":
|
||||
just_download = True
|
||||
debug.info("find remote name: '" + elem.get_arg() + "'")
|
||||
else:
|
||||
debug.error("SYNC Wrong argument: '" + elem.get_option_name() + "' '" + elem.get_arg() + "'")
|
||||
|
||||
# check if .XXX exist (create it if needed)
|
||||
if os.path.exists(env.get_island_path()) == False \
|
||||
@@ -59,9 +65,10 @@ def execute(arguments):
|
||||
# this is a new clone ==> this is easy ...
|
||||
#clone the manifest repository
|
||||
address_manifest = ""
|
||||
|
||||
### example git@git.plouf.com:basic_folder
|
||||
cmd = "git clone " + elem.select_remote["fetch"]
|
||||
if elem.select_remote["fetch"][0:4] == "git@":
|
||||
if elem.select_remote["fetch"][0:4] == "git@" \
|
||||
and len(elem.select_remote["fetch"][4:].split(":")) <= 1:
|
||||
cmd += ":"
|
||||
else:
|
||||
cmd += "/"
|
||||
@@ -118,6 +125,10 @@ def execute(arguments):
|
||||
|
||||
continue
|
||||
|
||||
if just_download == True:
|
||||
debug.info("SYNC: Already downloaded")
|
||||
continue
|
||||
|
||||
if os.path.exists(os.path.join(git_repo_path,".git")) == False:
|
||||
# path already exist but it is not used to as a git repo ==> this is an error
|
||||
debug.error("path '" + git_repo_path + "' is already existing but not used for a git repository. Clean it and restart")
|
||||
|
2
setup.py
2
setup.py
@@ -16,7 +16,7 @@ def readme():
|
||||
|
||||
# https://pypi.python.org/pypi?%3Aaction=list_classifiers
|
||||
setup(name='island',
|
||||
version='0.5.0',
|
||||
version='0.5.1',
|
||||
description='island generic source manager (like repo in simple mode)',
|
||||
long_description=readme(),
|
||||
url='http://github.com/HeeroYui/island',
|
||||
|
Reference in New Issue
Block a user