Skip to content
Browse files

holy good god, it works!

  • Loading branch information...
1 parent d6c90df commit 1e5b2d5bd7bdc6bdea250d42a2fb609c19814c26 @schacon committed Aug 7, 2009
Showing with 15 additions and 4 deletions.
  1. +10 −0 bin/agit-daemon
  2. +5 −4 dulwich/agitmemnon.py
View
10 bin/agit-daemon
@@ -0,0 +1,10 @@
+#!/usr/bin/python
+
+import sys
+from dulwich.server import TCPGitServer
+from dulwich.agitmemnon import *
+
+if __name__ == "__main__":
+ backend = AgitmemnonBackend()
+ server = TCPGitServer(backend, 'localhost')
+ server.serve_forever()
View
9 dulwich/agitmemnon.py
@@ -110,12 +110,13 @@ def fetch_objects(self, determine_wants, graph_walker, progress):
def get_refs(self):
"""Get dictionary with all refs."""
ret = {}
- refs = a.get_super('Repositories', 'fuzed')
- ret['HEAD'] = 'refs/heads/master' # TODO: fix this
+ refs = self.get_super('Repositories', 'fuzed') # TODO: dont hardcode the repo
for x in refs:
for col in x.columns:
if len(col.value) == 40:
ret['refs/' + x.name + '/' + col.name] = col.value
+ if x.name == 'heads' and col.name == 'master':
+ ret['HEAD'] = col.value
return ret
class AgitmemnonBackend(Backend):
@@ -126,7 +127,7 @@ def __init__(self):
self.get_refs = self.repo.get_refs
-a = Agitmemnon()
+#a = Agitmemnon()
#print a.get_object('7486f4075d2b9307d02e3905c69e28e456a51a32')[0].value
-print a['7486f4075d2b9307d02e3905c69e28e456a51a32'].get_parents()
+#print a['7486f4075d2b9307d02e3905c69e28e456a51a32'].get_parents()
#print a.get_object('7486f4075d2b9307d02e3905c69e28e456a51a32')

0 comments on commit 1e5b2d5

Please sign in to comment.
Something went wrong with that request. Please try again.