Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
29149848
Commit
29149848
authored
Oct 13, 2011
by
gitlabhq
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix gitosis log error
parent
eefe826f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
lib/gitosis.rb
lib/gitosis.rb
+9
-7
No files found.
lib/gitosis.rb
View file @
29149848
...
@@ -11,19 +11,21 @@ class Gitosis
...
@@ -11,19 +11,21 @@ class Gitosis
Dir
.
mkdir
@local_dir
Dir
.
mkdir
@local_dir
@repo
=
Git
.
clone
(
GITOSIS
[
'admin_uri'
],
"
#{
@local_dir
}
/gitosis"
)
`git clone
#{
GITOSIS
[
'admin_uri'
]
}
#{
@local_dir
}
/gitosis`
end
end
def
push
def
push
@repo
.
add
(
'.'
)
Dir
.
chdir
(
File
.
join
(
@local_dir
,
"gitosis"
))
@repo
.
commit_all
"Gitlab"
`git add -A`
@repo
.
push
`git commit -am "Gitlab"`
`git push`
Dir
.
chdir
(
Rails
.
root
)
#
FileUtils.rm_rf(@local_dir)
FileUtils
.
rm_rf
(
@local_dir
)
end
end
def
configure
def
configure
status
=
Timeout
::
timeout
(
5
)
do
status
=
Timeout
::
timeout
(
20
)
do
File
.
open
(
File
.
join
(
Dir
.
tmpdir
,
"gitlabhq-gitosis.lock"
),
"w+"
)
do
|
f
|
File
.
open
(
File
.
join
(
Dir
.
tmpdir
,
"gitlabhq-gitosis.lock"
),
"w+"
)
do
|
f
|
f
.
flock
(
File
::
LOCK_EX
)
f
.
flock
(
File
::
LOCK_EX
)
...
@@ -39,7 +41,7 @@ class Gitosis
...
@@ -39,7 +41,7 @@ class Gitosis
end
end
def
destroy_project
(
project
)
def
destroy_project
(
project
)
#
FileUtils.rm_rf(project.path_to_repo)
FileUtils
.
rm_rf
(
project
.
path_to_repo
)
conf
=
IniFile
.
new
(
File
.
join
(
@local_dir
,
'gitosis'
,
'gitosis.conf'
))
conf
=
IniFile
.
new
(
File
.
join
(
@local_dir
,
'gitosis'
,
'gitosis.conf'
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment