hg convert eats empty changesets

Mads Kiilerich mads at kiilerich.com
Thu Jun 30 03:30:59 CDT 2011

On 06/30/2011 09:46 AM, Peter Hosey wrote:
> I'm converting a repository from Mercurial to Mercurial with a filemap using hg 1.8.4.
> One thing I've noticed is that if a changeset is empty (such as when it contained only property changes in the old Subversion repository or because it only affected files that have been filemapped out), hg convert will eat the changeset: The output repository does not have the changeset at all.
> This may be a recent (as in sometime since 2008) change, since the original conversion from Subversion did not eat the property-only changesets, unless it only happens for Mercurial->Mercurial conversions.

This might be related to http://mercurial.selenic.com/bts/issue2538 , 
and it might depend on whether you use a filter or not.

It is generally not possible to create "empty" changesets in Mercurial, 
and the question is in which cases convert should do it.

> Is there any way to preserve “empty” changesets? I don't see one in the ConvertExtension page or in help convert.

I don't think so. Such an option would also be overwhelming in most 
cases and generally it is a good thing that convert removes empty 
changesets. For most uses of convert filters you want to forget 
changesets that only touched files you no longer see.


More information about the Mercurial mailing list