ryppl / Boost2Git

Conversion to Git for Boost
http://jenkins.boost.org/job/Boost2Git
5 stars 6 forks source link

Make sure commits are connected #6

Closed purpleKarrot closed 11 years ago

purpleKarrot commented 11 years ago

Looking at the tree view, there are lots of commits that are not connected to any branch. Probably some merge information is missing.

dabrahams commented 11 years ago

Please add links to examples so I can understand what you mean

purpleKarrot commented 11 years ago

Here is a picture taken from: https://bitbucket.org/boostorg/smart_ptr/commits/all/6c79ff4e07d1

branches

dabrahams commented 11 years ago

This appears to be missing branch info rather than missing merge info. Is it possible this is due to missing "recurse" rule functionality?

dabrahams commented 11 years ago

Many of the disconnected commits seem to be "manufactured by cvs2svn." I notice there is special-case handling in svn2git for that case, but I haven't yet had a chance to analyze it. Do you think it might make sense to disable the special case?.

dabrahams commented 11 years ago

FYI, I tried disabling the special case for cvs2svn and it made zero noticeable difference, down to generating the exact same SHAs for the commits I checked.

dabrahams commented 11 years ago

So, it looks like this is happening when a branch is created and then (the part of it directed at a given repository) is deleted in one revision. For example:

$ svnadmin dump ~/src/boost/svnrepo -q --incremental -r 7699
Revision-number: 7699
Prop-content-length: 149
Content-length: 149

K 8
svn:date
V 27
2000-09-09T10:20:26.000000Z
K 7
svn:log
V 75
This commit was manufactured by cvs2svn to create branch
'unlabeled-1.4.6'.
PROPS-END

Node-path: branches/unlabeled-1.4.6
Node-kind: dir
Node-action: add
Node-copyfrom-rev: 7697
Node-copyfrom-path: trunk

Node-path: branches/unlabeled-1.4.6/boost/boost/detail/compressed_pair.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/detail/ob_call_traits.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/detail/ob_compressed_pair.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/detail/ob_type_traits.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/detail/type_traits.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/array.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/array_traits.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/call_traits.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/cast.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/compose.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/compressed_pair.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/config.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/cstdint.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/functional.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/integer.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/integer_traits.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/iterator.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/min_rand.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/nondet_random.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/operators.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/progress.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/random.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/rational.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/smart_ptr.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/stdint.h
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/timer.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/type_traits.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/boost/utility.hpp
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/c++boost.gif
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/index.htm
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/libraries.htm
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/libs
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/more
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/people
Node-action: delete

Node-path: branches/unlabeled-1.4.6/boost/people.htm
Node-action: delete

Node-path: branches/unlabeled-1.4.6/CVSROOT
Node-action: delete

IMO in these cases the branch commit should be dropped from those repositories where it is deleted.

dabrahams commented 11 years ago

OK, that handled some of it. However, there are still lots of dangling branches. Please have a look and see what you can conclude!

dabrahams commented 11 years ago

One theory I had was that the source revision of the svn copy sometimes doesn't exist in a given Git repo, because no change in that revision fell into the repo in question. Maybe the code doesn't deal with that case?

dabrahams commented 11 years ago

My theory above seems to be wrong, even though the logic in that function is a bit questionable. Why does it return 0 instead of -1 when no commit is found here?

It looks like 4487ba0 doesn't quite deal with all the cases it was meant to address; see this commit for example. I imagine that the branch never registers as fully deleted in that case, but nonetheless it has no files in it and should be dropped.

dabrahams commented 11 years ago

Then there are cases like this one, where earlier commits in sandbox/boost/smart_ptr should really stay in the sandbox Git repo as they're part of an experimental policy-based smart pointer library. Instead they're showing up in the smart_ptr Git repo, which causes the commit that moves them to sandbox/boost/policy_ptr and sandbox/libs/policy_ptr to show up as a parent-less commit with no files in it.

dabrahams commented 11 years ago

With the exception of boostorg/smart_ptr@aa855dd48552, which looks like it might genuinely be a disconnected commit, all the commits in that repo now appear to be connected. Please verify and reopen if that's not so.