|
|
@@ -63,8 +63,7 @@ class ProgressPrinter(RemoteProgress):
|
|
|
def update(self,op_code,cur_count,max_count=None,message=''):
|
|
|
cur_count_int = round(cur_count)
|
|
|
max_count_int = round(max_count or 100)
|
|
|
- print(' '.join(['' for _ in range(30)]), end='\r')
|
|
|
- print(f"{cur_count_int}/{max_count_int}", str(round(100*cur_count / (max_count or 100)))+'%', end="\r")
|
|
|
+ print(f"\033[2K{cur_count_int}/{max_count_int}", str(round(100*cur_count / (max_count or 100)))+'%', end="\r")
|
|
|
|
|
|
def clone_repo_cached( cache_dir=None, bare=False):
|
|
|
def clone_repo(path, remote, ref=None, cache_dir=cache_dir, bare=bare):
|
|
|
@@ -84,6 +83,7 @@ def clone_repo_cached( cache_dir=None, bare=False):
|
|
|
cache = repo.remotes['cache']
|
|
|
else:
|
|
|
cache = repo.create_remote('cache', real_relpath( cache_repo_path, path))
|
|
|
+ cache.set_url("no_push" , '--push')
|
|
|
cache.fetch(refspec="+refs/remotes/origin/*:refs/remotes/origin/*",progress=ProgressPrinter())
|
|
|
print()
|
|
|
else:
|