Closed uqs closed 4 years ago
I fixed some of these (like vendor/dtc) but there are others still. It's when they create the SVN tag in a strange way.
Here's the output of commit hash, tree hash for zstd and it uses an older rev to branch from (this can be seen in the svn log -v output on the top-level dir, clearly).
* 40dbdde6971c 9b41925d7159 - (tag: vendor/zstd/1.4.5) Tag Zstd 1.4.5
| svn path=/vendor/zstd/1.4.5/; revision=361424
| svn path=/vendor/zstd/1.4.5/; revision=361424; tag=vendor/zstd/1.4.5
|
| * bc64b5ce191d 9b41925d7159 - (vendor/zstd/dist) Import Zstd 1.4.5
|/ svn path=/vendor/zstd/dist/; revision=361423
|
* ea68403922c3 9870b0c69585 - Import Zstd 1.4.4
| svn path=/vendor/zstd/dist/; revision=354371
|
| * 16712072cdcf 9870b0c69585 - (tag: vendor/zstd/1.4.4) Tag Zstd 1.4.4
|/ svn path=/vendor/zstd/1.4.4/; revision=354372
| svn path=/vendor/zstd/1.4.4/; revision=354372; tag=vendor/zstd/1.4.4
|
* 90f4bdbe917e c579df59365b - (tag: vendor/zstd/1.4.2) import zstd 1.4.2
| svn path=/vendor/zstd/dist/; revision=350754
| svn path=/vendor/zstd/1.4.2/; revision=350755; tag=vendor/zstd/1.4.2
|
* fa94c7381af4 1f6152d1ad65 - (tag: vendor/zstd/1.4.1) import zstd 1.4.1
| svn path=/vendor/zstd/dist/; revision=350752
| svn path=/vendor/zstd/1.4.1/; revision=350753; tag=vendor/zstd/1.4.1
|
* 3f774a5e8643 2ba6d7db9473 - import zstd 1.4.0
| svn path=/vendor/zstd/dist/; revision=346361
|
| * 58055709c1fb 2ba6d7db9473 - (tag: vendor/zstd/1.4.0) tag zstd 1.4.0
|/ svn path=/vendor/zstd/1.4.0/; revision=346362
| svn path=/vendor/zstd/1.4.0/; revision=346362; tag=vendor/zstd/1.4.0
|
This could be fixed post-conversion:
for all tags foo/tag not on mainline foo/dist: if there is one and only one commit on mainline with the same tree-hash -> rewrite tag to point to that commit instead
I think I understand what is happening here now.
A good svn cp will result in just the prefix being copied. As there are no further modifications, we end up with an annotated tag for that copy.
But with the messed up svn copies, the exporter has an actual diff to work with, creating a new commit and then the tag points to that commit (with the identical tree hash, urgh)
At least the case of tags predating the vendor imports is now fixed.
Good:
reset refs/tags/vendor/mandoc/1.13.2
from :42276466
progress SVN r276217 branch refs/tags/vendor/mandoc/1.13.2 = :42276466 # from branch vendor/mandoc/dist
Bad:
reset refs/tags/vendor/mandoc/1.13.3
from :42280269
progress SVN r280024 branch refs/tags/vendor/mandoc/1.13.3 = :42280269 # from branch vendor/mandoc/dist
commit refs/tags/vendor/mandoc/1.13.3
mark :42280270
committer Baptiste Daroussin <bapt@FreeBSD.org> 1426418973 +0000
data 28
Tag import of mdocml 1.13.3
D Makefile.local
M 100644 :18446744073709551614 INSTALL
M 100644 :18446744073709551613 Makefile
M 100644 :18446744073709551612 NEWS
...
I wonder if we could trick svn2git into just never re-adjusting the tag to the 2nd commit, because that is specially handled (but we'd miss all the tags that have been advanced after their initial creation, good thing I have a diff script for that).
Exporting revision 280024 /vendor/mdocml/1.13.3 was copied from /vendor/mdocml/dist rev 280021
rev 280024 /vendor/mdocml/1.13.3/ matched rule: "/data/git_conv/freebsd-base.rules:1342 /(vendor)/(mandoc|mdocml)/((?!dist)[^/]+)/" exporting.
.freebsd-base.git : branch refs/tags/vendor/mandoc/1.13.3 is branching from vendor/mandoc/dist
Creating branch: "refs/tags/vendor/mandoc/1.13.3" from "vendor/mandoc/dist" ( 280021 "from branch vendor/mandoc/dist at r280021 => r279525" )
rev 280024 /vendor/mdocml/1.13.3/INSTALL matched rule: "/data/git_conv/freebsd-base.rules:1342 /(vendor)/(mandoc|mdocml)/((?!dist)[^/]+)/" exporting.
Creating annotated tag vendor/mandoc/1.13.3 (refs/tags/vendor/mandoc/1.13.3) for freebsd-base.git
.copy from branch "vendor/mandoc/dist" to branch "refs/tags/vendor/mandoc/1.13.3" @rev 280023
"WARN: repository freebsd-base.git branch refs/tags/vendor/mandoc/1.13.3 has some files copied from vendor/mandoc/dist@280023"
WARN: found branchpoint from lower mark, about to recreate branch from different revision
Creating branch: "refs/tags/vendor/mandoc/1.13.3" from "vendor/mandoc/dist" ( 280023 "from branch vendor/mandoc/dist" )
add/change file ( /vendor/mdocml/1.13.3/INSTALL -> "refs/tags/vendor/mandoc/1.13.3" "INSTALL" )
rev 280024 /vendor/mdocml/1.13.3/Makefile matched rule: "/data/git_conv/freebsd-base.rules:1342 /(vendor)/(mandoc|mdocml)/((?!dist)[^/]+)/" exporting.
Re-creating annotated tag vendor/mandoc/1.13.3 for freebsd-base.git
Note that last line which -- in this specific case -- messes up the tags position.
% grep "Re-creating annotated tag" log-base|wc -l
996
Sigh ....
This is fixed by a post-processing script. Sadly, it means the converter can no longer run in incremental mode, but then again, with git version 2.27 this is already no longer possible.
No idea what is going on here, but note when 20170608 was imported vs. where the tag is coming from (same for 1.14.2). The contents of the tag are all fine, but the branchpoint is messed up. This affects numerous vendor tags
The converter logs these down like so:
where it messes up the "from" of the branch. It's also in the regular output:
This is coming from FastImportRepository::markFrom in repository.cpp