Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
hg-git
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
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
Admin message
This instance will be upgraded to Heptapod 17.9.0rc1 on 2025-03-27 between 17:00 and 18:00 UTC+2
Show more breadcrumbs
mercurial
hg-git
Commits
2e8820592bd3
Commit
2e8820592bd3
authored
13 years ago
by
mike bayer
Browse files
Options
Downloads
Patches
Plain Diff
Add documentation for branch_bookmark_suffix configuration parameter
parent
e58a6d0b80e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+34
-0
34 additions, 0 deletions
README.md
with
34 additions
and
0 deletions
README.md
+
34
−
0
View file @
2e882059
...
...
@@ -149,3 +149,37 @@
[git]
intree = True
git.branch_bookmark_suffix
---------------------------
hg-git does not convert between Mercurial named branches and git branches as
the two are conceptually different; instead, it uses Mercurial bookmarks to
represent the concept of a git branch. Therefore, when translating an hg repo
over to git, you typically need to create bookmarks to mirror all the named
branches that you'd like to see transferred over to git. The major caveat with
this is that you can't use the same name for your bookmark as that of the
named branch, and furthermore there's no feasible way to rename a branch in
Mercurial. For the use case where one would like to transfer an hg repo over
to git, and maintain the same named branches as are present on the hg side,
the
`branch_bookmark_suffix`
might be all that's needed. This presents a
string "suffix" that will be recognized on each bookmark name, and stripped
off as the bookmark is translated to a git branch:
[git]
branch_bookmark_suffix=_bookmark
Above, if an hg repo had a named branch called
`release_6_maintenance`
, you could
then link it to a bookmark called
`release_6_maintenance_bookmark`
. hg-git will then
strip off the
`_bookmark`
suffix from this bookmark name, and create a git branch
called
`release_6_maintenance`
. When pulling back from git to hg, the
`_bookmark`
suffix is then applied back, if and only if an hg named branch of that name exists.
E.g., when changes to the
`release_6_maintenance`
branch are checked into git, these
will be placed into the
`release_6_maintenance_bookmark`
bookmark on hg. But if a
new branch called
`release_7_maintenance`
were pulled over to hg, and there was
not a
`release_7_maintenance`
named branch already, the bookmark will be named
`release_7_maintenance`
with no usage of the suffix.
The
`branch_bookmark_suffix`
option is, like the
`authors`
option, intended for
migrating legacy hg named branches. Going forward, an hg repo that is to
be linked with a git repo should only use bookmarks for named branching.
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