svn-all-fast-export / svn2git

:octopus: A fast-import based converter for an svn repo to git repos
GNU General Public License v3.0
261 stars 100 forks source link

source code is different After Migration #110

Closed supernaughty closed 4 years ago

supernaughty commented 4 years ago

hi. I think i do something wrong..

i made a svn to git migration verifying program, and it keep reporting my migration result is not exact.

it always have 5 bytes difference, so i edit the file. and I found when my file begins 'link ', this word is disappeared.

example : (before migration) SVN : link ../../something~~~ (after migration) GIT : ../../something~~~

is there any good way to solve this problem?

supernaughty commented 4 years ago

I found some code has "link " string value in svn.cpp, dumpblob function but I don't know this code's working.. I'm going to remove these codes and test it after compile tomorrow ..

svn.cpp 255 lines

if (propvalue) { apr_size_t len = strlen("link "); if (!CommandLineParser::instance()->contains("dry-run")) { QByteArray buf; buf.reserve(len); SVN_ERR(svn_stream_read_full(in_stream, buf.data(), &len)); if (len == strlen("link ") && strncmp(buf, "link ", len) == 0) { mode = 0120000; stream_length -= len; } else { //this can happen if a link changed into a file in one commit qWarning("file %s is svn:special but not a symlink", pathname); // re-open the file as we tried to read "link " svn_stream_close(in_stream); SVN_ERR(svn_fs_file_contents(&in_stream, fs_root, pathname, dumppool)); } } }

supernaughty commented 4 years ago

It worked. missing codes are back... It is concerned about symbolic link, but I don't know It affect to migration program.....