Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Repair Mercurial Warning "copy source of X not in parents of Y"

Tags:

mercurial

I have a Mercurial "copy source of X not in parents of" warning that I'm trying to repair:

PS C:\repos\myProject-hg> hg verify
repository uses revlog format 1
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
warning: copy source of 'XXX/YYY/__init__.py' not in parents of 3910fe874b90
702 files, 21 changesets, 753 total revisions
1 warnings encountered!
PS C:\repos\myProject-hg>

I have already localized the commit that caused the problem (using hg clone -r X brokenRepo testRepo) but am stumped on how to proceed with the repair as the RepositoryCorruption link doesn't seem to address this specific type problem.

like image 982
Nate Avatar asked May 05 '15 17:05

Nate


1 Answers

According to a post on the mercurial mailing lists (scroll all the way down), this appears in repositories which have been committed to with very old versions of Mercurial. Apparently, they incorrectly recorded certain operations. Mozilla regards this as harmless.

If you're really desperate to get rid of these errors, you might try doing an hg convert on the repo, but that will change some/most/all of your changeset hashes, so it's probably not worth it.

like image 51
Kevin Avatar answered Nov 09 '22 08:11

Kevin