How to list commits unique to a branch using Dulwich
Question: If I have two release branches v1.25 and v1.25-SOC how to I get commits only
in v1.250-SOC and I want to do this for every branch (get only branch specific
commits in git). I use dulwich python library.

Main idea is I want to find commits which are first committed to the given
branch. If these commits are there in later release versions its ok as long as
those are not in older release versions.


Answer: You can find all the commits that are in one branch but not the other by using
the revision graph Walker:

    
    
    from dulwich.repo import Repo
    r = Repo('.')
    for entry in r.get_walker(include=[r['refs/heads/branch1'].id], exclude=[r['refs/heads/branch2'].id]):
         print entry.commit.id
    

