Skip to content

Commit 3dc7b5a

Browse files
committed
adding default URL to get shared repositories (to be able to change ctuning to workgroup git) ...
1 parent a193758 commit 3dc7b5a

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

ck/kernel.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@
3030
"ck_web":"https://github.com/ctuning/ck",
3131
"ck_web_wiki":"https://github.com/ctuning/ck/wiki",
3232

33+
"default_shared_repo_url":"https://github.com/ctuning",
34+
3335
"default_license":"See CK LICENSE.txt for licensing details",
3436
"default_copyright":"See CK Copyright.txt for copyright details",
3537
"default_developer":"cTuning foundation",

repo/module/kernel/module.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def setup(i):
4343
(group) - if !='', configure only this group:
4444
* install - install as python library
4545
* content - related to content
46+
* repos - related to repositories
4647
* editing - related to editing
4748
* writing - related to writing control
4849
* wfe - related to web front end
@@ -68,6 +69,7 @@ def setup(i):
6869
if i.get('content','')=='yes': param='content'
6970
elif i.get('install','')=='yes': param='install'
7071
elif i.get('editing','')=='yes': param='editing'
72+
elif i.get('repos','')=='yes': param='repos'
7173
elif i.get('writing','')=='yes': param='writing'
7274
elif i.get('wfe','')=='yes': param='wfe'
7375
elif i.get('indexing','')=='yes': param='indexing'
@@ -185,6 +187,23 @@ def setup(i):
185187
d=r['string']
186188
if d!='': cfg['default_license']=d
187189

190+
# Repo options
191+
if param=='' or param=='repos':
192+
ck.out(sep)
193+
ck.out('*** Repositories control ***')
194+
195+
ck.out('')
196+
x=cfg.get('default_shared_repo_url','')
197+
if x=='':
198+
x=ck.cfg.get('default_shared_repo_url','')
199+
ck.out('Default URL for shared repositories: '+x)
200+
201+
ck.out('')
202+
r=ck.inp({'text': 'Enter new URL (Enter to keep current): '})
203+
x=r['string']
204+
if x!='':
205+
cfg['default_shared_repo_url']=x
206+
188207
# Editing options
189208
if param=='' or param=='editing':
190209
ck.out(sep)

repo/module/repo/module.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def add(i):
191191

192192
# Check additional parameters if git
193193
if shared=='git' and url=='':
194-
durl='https://github.com/ctuning/'+d+'.git'
194+
durl=ck.cfg.get('default_shared_repo_url','')+'/'+d+'.git'
195195
if quiet!='yes':
196196
s='Enter URL of GIT repo '
197197
if d=='': s+='(for example, https://github.com/ctuning/ck-analytics.git)'

0 commit comments

Comments
 (0)