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
0
Merge Requests
0
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
Tatuya Kamada
gitlab-ce
Commits
17e23108
Commit
17e23108
authored
Apr 03, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add instructions to Google Code import page.
parent
7b5bc32c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
13 deletions
+47
-13
app/controllers/import/google_code_controller.rb
app/controllers/import/google_code_controller.rb
+3
-3
app/views/import/google_code/new.html.haml
app/views/import/google_code/new.html.haml
+44
-10
No files found.
app/controllers/import/google_code_controller.rb
View file @
17e23108
...
...
@@ -8,17 +8,17 @@ class Import::GoogleCodeController < Import::BaseController
dump_file
=
params
[
:dump_file
]
unless
dump_file
.
respond_to?
(
:read
)
return
redirect_to
:back
,
alert:
"You need to upload a Google Takeout
JSON fil
e."
return
redirect_to
:back
,
alert:
"You need to upload a Google Takeout
archiv
e."
end
begin
dump
=
JSON
.
parse
(
dump_file
.
read
)
rescue
return
redirect_to
:back
,
alert:
"The uploaded file is not a valid Google Takeout
JSON fil
e."
return
redirect_to
:back
,
alert:
"The uploaded file is not a valid Google Takeout
archiv
e."
end
unless
Gitlab
::
GoogleCodeImport
::
Client
.
new
(
dump
).
valid?
return
redirect_to
:back
,
alert:
"The uploaded file is not a valid Google Takeout
JSON fil
e."
return
redirect_to
:back
,
alert:
"The uploaded file is not a valid Google Takeout
archiv
e."
end
session
[
:google_code_dump
]
=
dump
...
...
app/views/import/google_code/new.html.haml
View file @
17e23108
...
...
@@ -4,14 +4,48 @@
%hr
=
form_tag
callback_import_google_code_path
,
class:
'form-horizontal'
,
multipart:
true
do
%ul
%p
Follow the steps below to export your Google Code project data.
In the next step, you'll be able to select the projects you want to import.
%ol
%li
Use Google Takeout etc
.form-group
=
label_tag
:dump_file
,
"Google Takeout JSON file"
,
class:
'control-label'
.col-sm-10
%input
{
type:
"file"
,
name:
"dump_file"
,
id:
"dump_file"
}
.form-actions
=
submit_tag
'Select projects to import'
,
class:
"btn btn-create"
%p
Go to
#{
link_to
"Google Takeout"
,
"https://www.google.com/settings/takeout"
,
target:
"_blank"
}
.
%li
%p
Make sure you're logged into the account that owns the projects you'd like to import.
%li
%p
Click the
<strong>
Select none
</strong>
button on the right, since we only need "Google Code Project Hosting".
%li
%p
Scroll down to
<strong>
Google Code Project Hosting
</strong>
and enable the switch on the right.
%li
%p
Choose
<strong>
Next
</strong>
at the bottom of the page.
%li
%p
Leave the "File type" and "Delivery method" options on their default values.
%li
%p
Choose
<strong>
Create archive
</strong>
and wait for archiving to complete.
%li
%p
Click the
<strong>
Download
</strong>
button and wait for downloading to complete.
%li
%p
Find the downloaded ZIP file and decompress it.
%li
%p
Find the newly extracted
<code>
Takeout/Google Code Project Hosting/GoogleCodeProjectHosting.json
</code>
file.
%li
%p
Upload
<code>
GoogleCodeProjectHosting.json
</code>
here:
%p
%input
{
type:
"file"
,
name:
"dump_file"
,
id:
"dump_file"
}
%li
%p
Continue to the next step:
%p
=
submit_tag
'Select projects to import'
,
class:
"btn btn-create"
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