psf / gh-migration

This repo is used to manage the migration from bugs.python.org to GitHub.
42 stars 8 forks source link

Subversion revisions references were not ported #23

Open serhiy-storchaka opened 2 years ago

serhiy-storchaka commented 2 years ago

For example:

https://bugs.python.org/issue2116#msg87822

Committed in r72662, r72670. Thanks!

https://github.com/python/cpython/issues/46370#issuecomment-1093409709

Committed in r72662, r72670. Thanks!

ezio-melotti commented 2 years ago

Those refs were already broken since they mapped to hg.python.org, which hasn't been accessible in a while, so I didn't port them.

gvanrossum commented 2 years ago

I assume you meant svn.python.org? hg.python.org is still alive.

ezio-melotti commented 2 years ago

The rXXXXX revisions were updated in bpo to point to hg.python.org/lookup, so that e.g. r72662 linked to https://hg.python.org/lookup/r72662. Then the lookup script was supposed to find the hg changeset equivalent to r72662, however if I try to open that link I get this: image

The title of the popup indeed mentions svn.python.org, but the end result is the same: the link and the lookup script don't seem accessible anymore.

gvanrossum commented 2 years ago

Hm, it looks like it might be difficult to recover those references. E.g. I looked for the commit that added weakref support to copy.py, which was r72662 according to https://bugs.python.org/issue2116#msg87822 (or r72670?). It's easy to locate in the git history for copy.py: https://github.com/python/cpython/commit/6e61006cc2dfa6c07fa84126622685769bac635d -- but somehow the revision number got changed:

Merged revisions 72669 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r72669 | antoine.pitrou | 2009-05-15 18:54:52 +0200 (ven., 15 mai 2009) | 3 lines

  Issue https://github.com/python/cpython/pull/2116: Weak references and weak dictionaries now support copy()ing and deepcopy()ing.
........
serhiy-storchaka commented 2 years ago

Yes, it was already broken on BPO for some time. It is bad. We are losing history. And it is only 13 years old.

I think it is a good opportunity to fix old references. Can we scan all logs and create a mapping between Subversion revision numbers, and Mercurial and Git hashes?

ezio-melotti commented 2 years ago

I found two files used by the lookup script:

There doesn't seem to be any mapping between SVN and HG, and the script simply accepts rXXXXX and redirects that to svn.python.org (see line 48).

I'm not aware of a mapping between HG and Git either, unless someone still has the logs of the SVN->HG and HG->Git migrations. It should be possible to recreate them though -- assuming we still have an SVN clone around (or if the SVN commit number is stored somewhere in the HG metadata).