[issue2379] Failure converting to clone with shamap derived from saverev data

Alain Linden bugs at mercurial.selenic.com
Wed Sep 15 17:18:57 CDT 2010

New submission from Alain Linden <alain at lindenlab.com>:

Basically I have been following the procedure outlined in this blog post
to build a pared down mercurial repository.  I have a source repository with
a long history and many files which I pruned by making a filemap and using
hg convert to produce the reduced repository.  I set the convert.hg.saverev
configuration to true so that I can reconstruct a shamap in clones so that
anyone can push updates from the source repository to the converted. 
Unfortunately, when I clone the converted repository and reconstruct the
shamap from the clone's history, attempts to use convert to get more changes
from source to the clone fail, e.g:

$ hg convert --filemap filemap --config convert.hg.saver
ev=True source/ cloned/
scanning source...
3 Merged cmake based configuration of version files with recent indra-common.
** unknown exception encountered, details follow
** report bug details to http://mercurial.selenic.com/bts/
** or mercurial at selenic.com
** Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)]
** Mercurial Distributed SCM (version 1.6.3)
** Extensions loaded: fetch, convert, mq
Traceback (most recent call last):
  File "hg", line 27, in <module>
  File "mercurial\dispatch.pyc", line 16, in run
  File "mercurial\dispatch.pyc", line 34, in dispatch
  File "mercurial\dispatch.pyc", line 54, in _runcatch
  File "mercurial\dispatch.pyc", line 494, in _dispatch
  File "mercurial\dispatch.pyc", line 355, in runcommand
  File "mercurial\dispatch.pyc", line 545, in _runcommand
  File "mercurial\dispatch.pyc", line 499, in checkargs
  File "mercurial\dispatch.pyc", line 492, in <lambda>
  File "mercurial\util.pyc", line 420, in check
  File "hgext\convert\__init__.pyc", line 243, in convert
  File "hgext\convert\convcmd.pyc", line 429, in convert
  File "hgext\convert\convcmd.pyc", line 359, in convert
  File "hgext\convert\convcmd.pyc", line 302, in copy
  File "hgext\convert\filemap.pyc", line 265, in getchanges
  File "hgext\convert\filemap.pyc", line 184, in rebuild
  File "hgext\convert\filemap.pyc", line 258, in mark_wanted
KeyError: '99ccf41e82ac9094378f8cbf7f2d7d9f48dcc5ac'

A close inspection of the log for source (hg log --debug) reveals that the
changeset associated with the key in the error exists only in the source
history but not the converted.  That is because the changeset involves only
files which are not included in the converted repository and its clones. 
I'm not sure why this exception occurs and I have not been able to reproduce
the problem with any simple example.

messages: 13625
nosy: Alain Linden
priority: bug
status: unread
title: Failure converting to clone with shamap derived from saverev data
topic: convert

Mercurial issue tracker <bugs at mercurial.selenic.com>

More information about the Mercurial-devel mailing list