[Python-Dev] hg verify warnings (original) (raw)

Tim Peters tim.peters at gmail.com
Mon Aug 19 19:51:41 CEST 2013


... $ hg verify repository uses revlog format 1 checking changesets checking manifests crosschecking files in changesets and manifests checking files warning: copy source of 'Modules/threadmodule.c' not in parents of 60ad83716733 warning: copy source of 'Objects/bytesobject.c' not in parents of 64bb1d258322 warning: copy source of 'Objects/stringobject.c' not in parents of 357e268e7c5f 9799 files, 79660 changesets, 176851 total revisions 3 warnings encountered!

$ hg --version Mercurial Distributed SCM (version 2.3.2) (see http://mercurial.selenic.com for more information)

FYI, I found this kind of warning in my own (non-Python) repository, created from scratch just a few weeks ago, so it's NOT necessarily the case that this has something to do with using ancient hg releases. I was teaching myself hg at the time, and suspect I did something hg didn't expect <0.5 wink>. Here's a tiny repository that displays the same kind of thing:

Make a new repository (this is on Windows - does it matter? doubt it):

C:>hg init HHH

C:>cd HHH

Hg is up to date (2.7):

C:\HHH>hg version Mercurial Distributed SCM (version 2.7) (see http://mercurial.selenic.com for more information) ...

Make a subdirectory and add a file:

C:\HHH>mkdir sub

C:\HHH>cd sub

C:\HHH\sub>echo a > a.txt

C:\HHH\sub>hg add adding a.txt

C:\HHH\sub>hg ci -m initial

Move the file up a level:

C:\HHH\sub>hg move a.txt ..

Now here's the funky part! Unsure about what was going on in my own repository, so doing as little as possible per step, I committed the move in 2 steps (do a plain "hg ci" at this point and nothing goes wrong). So first I recorded that the subdirectory a.txt is gone:

C:\HHH\sub>hg ci a.txt -m moving

Then up to the parent directory, and commit the new location of a.txt:

C:\HHH\sub>cd ..

C:\HHH>hg st A a.txt

C:\HHH>hg ci -m moving

Now verify -v complains:

C:\HHH>hg verify -v repository uses revlog format 1 checking changesets checking manifests crosschecking files in changesets and manifests checking files warning: copy source of 'a.txt' not in parents of 9c2205c187bf 2 files, 3 changesets, 2 total revisions 1 warnings encountered!

What the warning says seems to me to be true:

C:\HHH>hg log changeset: 2:9c2205c187bf tag: tip user: Tim Peters <tim at python.org> date: Mon Aug 19 12:24:43 2013 -0500 summary: moving

changeset: 1:60fffa9b0194 user: Tim Peters <tim at python.org> date: Mon Aug 19 12:24:26 2013 -0500 summary: moving

changeset: 0:0193842498ab user: Tim Peters <tim at python.org> date: Mon Aug 19 12:24:05 2013 -0500 summary: initial

The parent of 2 (9c2205c187bf) is 1 (60fffa9b0194), and indeed the copy source (HHH\sub\a.txt) was removed by changeset 1. Why that could be "bad" escapes me, though.

Regardless, I suspect Python's warnings came from similarly overly elaborate learning-curve workflow, and are harmless.



More information about the Python-Dev mailing list