Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Odoo scripts
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
XCG
Odoo scripts
Commits
3542e201177b
Commit
3542e201177b
authored
3 years ago
by
Vincent Hatakeyama
Browse files
Options
Downloads
Patches
Plain Diff
add option to set the repo path of the sources copy
TG-237
parent
de9c4651e443
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!59
TG-237 Add an option to specify the cloned source repository
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
NEWS.rst
+5
-0
5 additions, 0 deletions
NEWS.rst
README.rst
+1
-0
1 addition, 0 deletions
README.rst
odoo_scripts/config.py
+6
-1
6 additions, 1 deletion
odoo_scripts/config.py
odoo_scripts/update_duplicate_sources.py
+10
-6
10 additions, 6 deletions
odoo_scripts/update_duplicate_sources.py
with
22 additions
and
7 deletions
NEWS.rst
+
5
−
0
View file @
3542e201
...
...
@@ -2,6 +2,11 @@
History
=======
11.1.0
------
Add the possibility to indicate a different path for the copied sources.
11.0.1
------
...
...
This diff is collapsed.
Click to expand it.
README.rst
+
1
−
0
View file @
3542e201
...
...
@@ -115,6 +115,7 @@
- ``modules``: list of directories and files to include (also used by another script)
- ``dependencies``: list of directories and files to include (also used by another script)
- ``other_sources``: list of directories and files to include (only used by this script, used for README, ReleaseNotes, script directories, etc.)
- ``duplicate_repo``: target repository, if none are specified, uses the same URL and append `_sources` to it.
No change are made to the name of the directories/files included.
...
...
This diff is collapsed.
Click to expand it.
odoo_scripts/config.py
+
6
−
1
View file @
3542e201
...
...
@@ -160,7 +160,12 @@
# those keys are single string values, no expand
for
key
in
(
"
db_user
"
,
"
db_password
"
,
"
load-language
"
):
for
key
in
(
"
db_user
"
,
"
db_password
"
,
"
load-language
"
,
"
duplicate_repo
"
,
):
setattr
(
self
,
key_format
(
key
),
section
.
get
(
key
,
None
))
def
read_expanded
(
key
:
str
,
default_value
=
None
):
...
...
This diff is collapsed.
Click to expand it.
odoo_scripts/update_duplicate_sources.py
+
10
−
6
View file @
3542e201
...
...
@@ -15,5 +15,5 @@
_logger
=
logging
.
getLogger
(
__name__
)
__version__
=
"
1.
0
.0
"
__version__
=
"
1.
1
.0
"
__date__
=
"
2020-06-19
"
...
...
@@ -19,5 +19,5 @@
__date__
=
"
2020-06-19
"
__updated__
=
"
202
0-06-30
"
__updated__
=
"
202
1-10-01
"
def
__parser
():
...
...
@@ -31,7 +31,7 @@
program_license
=
"""
%s
Created by Vincent Hatakeyama on %s.
Copyright 2018, 2020 XCG Consulting. All rights reserved.
Copyright 2018, 2020
, 2021
XCG Consulting. All rights reserved.
Licensed under the MIT License
...
...
@@ -86,4 +86,5 @@
if
b
"
tip
"
in
tags
:
tags
.
remove
(
b
"
tip
"
)
_logger
.
info
(
"
Current tags %s
"
,
"
,
"
.
join
(
u
(
tag
)
for
tag
in
tags
))
# XXX get topics?
# find the duplicate repository URL
...
...
@@ -89,6 +90,10 @@
# find the duplicate repository URL
remote_path
=
hg
.
paths
(
b
(
path
))
duplicate_path
=
b
(
"
{}_sources
"
.
format
(
u
(
remote_path
)))
c
=
Config
()
if
c
.
duplicate_repo
:
duplicate_path
=
b
(
c
.
duplicate_repo
)
else
:
remote_path
=
hg
.
paths
(
b
(
path
))
duplicate_path
=
b
(
"
{}_sources
"
.
format
(
u
(
remote_path
)))
_logger
.
info
(
"
Clone path %s
"
,
u
(
duplicate_path
))
# clone the duplicate repository
duplicate_destination
=
b
"
sources
"
...
...
@@ -122,7 +127,6 @@
"
Branch %s not found in duplicate, updating to tip
"
,
u
(
branch
)
)
# rsync content inside the other directory
c
=
Config
()
cmd
=
(
[
"
rsync
"
,
...
...
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