You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The gitutils.Commit class has hash() and eq()/ne() methods that make them act sort of as strings (the commit's SHA-1) when used in, for instance, sets. So the set subtraction works as intended, returning the SHA-1 strings in 'parents' that are not matched by Commit objects in 'commit_set'.
And no, the order is correct. The tails of the commit set is defined as all parents (of commits in the commit set) that aren't themselves part of the commit set. If the expression was "commit_set - parents", you'd get every commit in the commit set that isn't a parent of another commit in the commit set. (This incidentally is what I call the "heads" of the commit set.)
The commit set class is fairly central functionality, on which quite a bit of other functionality depends, so we ought to have noticed if it was severely broken. :-)
oh, you are right about the set deduction operation, the reason i doubt the order is, when i click the filter link reviewable in http://host/r/1 page, it gives me an exception, impossible commit-set. so I checked the code, switched those two operands, and get an exception raised by subprocess complaining args type mush be string type.
in log/commitset.py, this line:
self.__tails = parents - commit_set is error, since parents is a set of strs, but commit_set is a set of commit objects, these two are different.
btw, according to the comment, i think the right order is commit_set - parents.
The text was updated successfully, but these errors were encountered: