Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
installsystems
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Seblu
installsystems
Commits
3544d537
Commit
3544d537
authored
13 years ago
by
Seblu
Browse files
Options
Downloads
Patches
Plain Diff
local repository are not cached by repomanager
parent
5abdc1f4
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
installsystems/repository.py
+14
-2
14 additions, 2 deletions
installsystems/repository.py
with
14 additions
and
2 deletions
installsystems/repository.py
+
14
−
2
View file @
3544d537
...
...
@@ -451,7 +451,19 @@ class RepositoryManager(object):
'''
Register a repository from its config
'''
debug
(
"
Registering repository %s (%s)
"
%
(
config
.
path
,
config
.
name
))
# if path is local, no needs to create a cache
if
istools
.
isfile
(
config
.
path
):
debug
(
"
Registering direct repository %s (%s)
"
%
(
config
.
path
,
config
.
name
))
self
.
repos
.
append
(
Repository
(
config
))
else
:
debug
(
"
Registering cached repository %s (%s)
"
%
(
config
.
path
,
config
.
name
))
self
.
repos
.
append
(
self
.
_cachify
(
config
))
def
_cachify
(
self
,
config
):
'''
Return a config of a cached repository from an orignal config file
'''
# find destination file and load last info
if
config
.
name
is
None
or
self
.
cache_path
is
None
:
# this is a forced temporary repository or without name repo
...
...
@@ -477,7 +489,7 @@ class RepositoryManager(object):
timeout
=
self
.
timeout
)
os
.
utime
(
filedest
,
(
rlast
,
rlast
))
config
.
dbpath
=
filedest
self
.
repos
.
append
(
Repository
(
config
)
)
return
Repository
(
config
)
def
get
(
self
,
name
,
version
=
None
):
'''
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment