Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
mercurial-devel
Manage
Activity
Members
Labels
Plan
Wiki
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
Environments
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
Show more breadcrumbs
mercurial
mercurial-devel
Commits
5b159ebb
Commit
5b159ebb
authored
17 years ago
by
Bryan O'Sullivan
Browse files
Options
Downloads
Patches
Plain Diff
convert: document splicemap, allow setting of multiple parents
parent
50a277e6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
hgext/convert/__init__.py
+12
-0
12 additions, 0 deletions
hgext/convert/__init__.py
hgext/convert/convcmd.py
+5
-4
5 additions, 4 deletions
hgext/convert/convcmd.py
with
17 additions
and
4 deletions
hgext/convert/__init__.py
+
12
−
0
View file @
5b159ebb
...
...
@@ -67,6 +67,17 @@
subdirectory into the root of the repository, use
'
.
'
as the path to
rename to.
The splicemap is a file that allows insertion of synthetic
history, letting you specify the parents of a revision. This is
useful if you want to e.g. give a Subversion merge two parents, or
graft two disconnected series of history together. Each entry
contains a key, followed by a space, followed by one or two
values, separated by spaces. The key is the revision ID in the
source revision control system whose parents should be modified
(same format as a key in .hg/shamap). The values are the revision
IDs (in either the source or destination revision control system)
that should be used as the new parents for that node.
Back end options:
--config convert.hg.clonebranches=False (boolean)
...
...
@@ -100,6 +111,7 @@
(
''
,
'
filemap
'
,
''
,
'
remap file names using contents of file
'
),
(
'
r
'
,
'
rev
'
,
''
,
'
import up to target revision REV
'
),
(
'
s
'
,
'
source-type
'
,
''
,
'
source repository type
'
),
(
''
,
'
splicemap
'
,
''
,
'
splice synthesized history into place
'
),
(
''
,
'
datesort
'
,
None
,
'
try to sort changesets by date
'
)],
'
hg convert [OPTION]... SOURCE [DEST [MAPFILE]]
'
),
"
debugsvnlog
"
:
...
...
This diff is collapsed.
Click to expand it.
hgext/convert/convcmd.py
+
5
−
4
View file @
5b159ebb
...
...
@@ -84,7 +84,7 @@
self
.
readauthormap
(
opts
.
get
(
'
authors
'
))
self
.
authorfile
=
self
.
dest
.
authorfile
()
self
.
splicemap
=
mapfile
(
ui
,
ui
.
config
(
'
convert
'
,
'
splicemap
'
))
self
.
splicemap
=
mapfile
(
ui
,
opts
.
get
(
'
splicemap
'
))
def
walktree
(
self
,
heads
):
'''
Return a mapping that identifies the uncommitted parents of every
...
...
@@ -252,9 +252,10 @@
self
.
dest
.
copyfile
(
copyf
,
f
)
try
:
parents
=
[
self
.
splicemap
[
rev
]]
self
.
ui
.
debug
(
'
spliced in %s as parents of %s
\n
'
%
(
parents
,
rev
))
parents
=
self
.
splicemap
[
rev
].
replace
(
'
,
'
,
'
'
).
split
()
self
.
ui
.
status
(
'
spliced in %s as parents of %s
\n
'
%
(
parents
,
rev
))
parents
=
[
self
.
map
.
get
(
p
,
p
)
for
p
in
parents
]
except
KeyError
:
parents
=
[
b
[
0
]
for
b
in
pbranches
]
newnode
=
self
.
dest
.
putcommit
(
filenames
,
parents
,
commit
)
...
...
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