Created
February 27, 2010 21:18
-
-
Save anonymous/316958 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from dulwich.repo import Repo | |
import sys | |
repo = Repo('.') | |
have = [] | |
want = [] | |
for arg in sys.argv[1:]: | |
if arg[0] == '^': | |
assert len(arg) == 41 | |
have.append(arg[1:]) | |
else: | |
assert len(arg) == 40 | |
want.append(arg) | |
for sha, path in repo.object_store.find_missing_objects(have, want): | |
print sha, path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment