[issue1582] convert: splicemap syntax is confusing and poorly explained
Greg Ward
mercurial-bugs at selenic.com
Mon Mar 30 16:47:47 CDT 2009
New submission from Greg Ward <greg-hg at gerg.ca>:
The syntax for the splicemap file is confusing, and I don't think the help
output accurately describes it. Here's what the help says:
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.
Note that "key" is singular and "values" plural.
Based on that help, I constructed this splicemap file:
3012 3009 3011
3023 3022 3012
9689 9678 9688
which I *thought* meant "CVS patch #3012 has parents 3009 and 3011".
I had to hack Mercurial to figure out why this splicemap file had no effect.
This patch:
--- a/hgext/convert/convcmd.py
+++ b/hgext/convert/convcmd.py
@@ -91,6 +91,7 @@
self.authorfile = self.dest.authorfile()
self.splicemap = mapfile(ui, opts.get('splicemap'))
+ ui.debug("splicemap = %r\n" % self.splicemap)
def walktree(self, heads):
'''Return a mapping that identifies the uncommitted parents of every
reveals that my splicemap is being parsed to
{'3023 3022': '3012', '3012 3009': '3011', '9689 9678': '9688'}
i.e. the key/value split happens on the *last* space of each line, not the
*first* space as the help implies.
Hmmm: I think it's impossible for a purely space-separated splicemap to work.
Something is wrong here...
----------
messages: 8937
nosy: gward
priority: bug
status: unread
title: convert: splicemap syntax is confusing and poorly explained
____________________________________________________
Mercurial issue tracker <mercurial-bugs at selenic.com>
<http://www.selenic.com/mercurial/bts/issue1582>
____________________________________________________
More information about the Mercurial-devel
mailing list