Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
devflow
Commits
9be34db8
Commit
9be34db8
authored
Jan 28, 2013
by
Christos Stavrakakis
Browse files
Create the debian brach if missing
parent
61c5aa98
Changes
1
Hide whitespace changes
Inline
Side-by-side
devflow/autopkg.py
View file @
9be34db8
...
...
@@ -168,13 +168,8 @@ def main():
packages
=
config
[
'packages'
].
keys
()
print_green
(
"Will build the following packages:
\n
"
+
"
\n
"
.
join
(
packages
))
# Clone the repo
repo_dir
=
options
.
repo_dir
or
create_temp_directory
(
"df-repo"
)
repo
=
original_repo
.
clone
(
repo_dir
)
print_green
(
"Cloned repository to '%s'."
%
repo_dir
)
# Get current branch name and type and check if it is a valid one
branch
=
repo
.
head
.
reference
.
name
branch
=
original_
repo
.
head
.
reference
.
name
branch_type
=
versioning
.
get_branch_type
(
branch
)
if
branch_type
not
in
BRANCH_TYPES
.
keys
():
...
...
@@ -182,14 +177,23 @@ def main():
raise
ValueError
(
"Malformed branch name '%s', cannot classify as"
" one of %s"
%
(
branch
,
allowed_branches
))
#
Find the
debian branch
#
Check that original repo has the correct
debian branch
debian_branch
=
"debian-"
+
branch
origin_debian
=
"origin/"
+
debian_branch
if
not
origin_debian
in
repo
.
refere
nces
:
if
not
debian_branch
in
original_repo
.
bra
nc
h
es
:
# Get default debian branch
default_debian
=
BRANCH_TYPES
[
branch_type
].
default_debian_branch
origin_debian
=
"origin/"
+
default_debian
if
not
default_debian
in
original_repo
.
branches
:
original_repo
.
git
.
branch
(
default_debian
,
origin_debian
)
# Clone the repo
repo_dir
=
options
.
repo_dir
or
create_temp_directory
(
"df-repo"
)
repo
=
original_repo
.
clone
(
repo_dir
)
print_green
(
"Cloned repository to '%s'."
%
repo_dir
)
# Create the debian branch
repo
.
git
.
branch
(
debian_branch
,
origin_debian
)
print_green
(
"Created branch '%s' to track '%s'"
%
(
debian_branch
,
origin_debian
))
...
...
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