Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
py-heptapod
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
heptapod
py-heptapod
Commits
09f8807e
Commit
09f8807e
authored
8 months ago
by
Georges Racinet
Browse files
Options
Downloads
Plain Diff
Merged oldstable branch into stable
Contains the fix to
heptapod#714
parents
362b7350
fb05140f
Branches
Branches containing commit
Tags
Tags containing commit
2 merge requests
!106
Merge stable branch
,
!105
Merged oldstable branch into stable
Pipeline
#85768
passed
8 months ago
Stage: main
Stage: downstream
Pipeline: hgitaly
#85769
Changes
3
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
hgext3rd/heptapod/branch.py
+3
-0
3 additions, 0 deletions
hgext3rd/heptapod/branch.py
hgext3rd/heptapod/no_git.py
+1
-0
1 addition, 0 deletions
hgext3rd/heptapod/no_git.py
hgext3rd/heptapod/tests/test_default_branch.py
+1
-0
1 addition, 0 deletions
hgext3rd/heptapod/tests/test_default_branch.py
with
5 additions
and
0 deletions
hgext3rd/heptapod/branch.py
+
3
−
0
View file @
09f8807e
...
...
@@ -63,6 +63,9 @@
def
get_default_gitlab_branch
(
repo
):
"""
Return the default GitLab branch name, or ``None`` if not set.
"""
shared_from
=
hg
.
sharedreposource
(
repo
)
if
shared_from
is
not
None
:
repo
=
shared_from
branch
=
repo
.
vfs
.
tryread
(
DEFAULT_GITLAB_BRANCH_FILE_NAME
)
# (hg 5.4) tryread returns empty strings for missing files
if
not
branch
:
...
...
This diff is collapsed.
Click to expand it.
hgext3rd/heptapod/no_git.py
+
1
−
0
View file @
09f8807e
...
...
@@ -91,6 +91,7 @@
gl_branch
=
get_default_gitlab_branch
(
self
.
repo
)
if
gl_branch
is
not
None
:
res
=
gitlab_branch_ref
(
gl_branch
)
self
.
_default_git_ref
=
res
return
res
def
set_default_gitlab_ref
(
self
,
new_default_ref
):
...
...
This diff is collapsed.
Click to expand it.
hgext3rd/heptapod/tests/test_default_branch.py
+
1
−
0
View file @
09f8807e
...
...
@@ -39,3 +39,4 @@
assert
get_default_gitlab_branch
(
main
.
repo
)
is
None
set_default_gitlab_branch
(
share
.
repo
,
b
'
branch/default
'
)
assert
get_default_gitlab_branch
(
main
.
repo
)
==
b
'
branch/default
'
assert
get_default_gitlab_branch
(
share
.
repo
)
==
b
'
branch/default
'
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