Skip to content
Snippets Groups Projects
Commit 562fc51b authored by Scott Chacon's avatar Scott Chacon
Browse files

we did the same thing, not sure why it conflicted

parent 48a639cc
No related branches found
No related tags found
No related merge requests found
......@@ -112,4 +112,5 @@
:param generate_pack_contents: Function that can return the shas of the
objects to upload.
"""
print 'SEND PACK'
refs, server_capabilities = self.read_refs()
......@@ -115,3 +116,5 @@
refs, server_capabilities = self.read_refs()
print refs
print server_capabilities
changed_refs = [] # FIXME
if not changed_refs:
......@@ -116,4 +119,5 @@
changed_refs = [] # FIXME
if not changed_refs:
print 'got here - nooo'
self.proto.write_pkt_line(None)
return
......@@ -118,6 +122,8 @@
self.proto.write_pkt_line(None)
return
print 'got here - yay'
print changed_refs
self.proto.write_pkt_line("%s %s %s\0%s" % (changed_refs[0][0], changed_refs[0][1], changed_refs[0][2], self.capabilities()))
want = []
have = []
for changed_ref in changed_refs[:]:
......@@ -120,11 +126,11 @@
self.proto.write_pkt_line("%s %s %s\0%s" % (changed_refs[0][0], changed_refs[0][1], changed_refs[0][2], self.capabilities()))
want = []
have = []
for changed_ref in changed_refs[:]:
self.proto.write_pkt_line("%s %s %s" % changed_refs)
want.append(changed_refs[1])
if changed_refs[0] != "0"*40:
have.append(changed_refs[0])
self.proto.write_pkt_line("%s %s %s" % changed_ref)
want.append(changed_ref[1])
if changed_ref[0] != "0"*40:
have.append(changed_ref[0])
self.proto.write_pkt_line(None)
shas = generate_pack_contents(want, have, None)
write_pack_data(self.write, shas, len(shas))
......
......@@ -329,5 +329,6 @@
def import_git_commit(self, commit):
print "importing: " + commit.id
# TODO : look for HG metadata in the message and use it
# TODO : add extra Git data (committer info) as extras to changeset
# TODO : (?) have to handle merge contexts at some point (two parent files, etc)
......@@ -332,5 +333,6 @@
# TODO : (?) have to handle merge contexts at some point (two parent files, etc)
# TODO : throw IOError for removed files
def getfilectx(repo, memctx, f):
(e, sha, data) = self.git.get_file(commit, f)
e = '' # TODO : make this a real mode
......@@ -377,9 +379,9 @@
def get_transport_and_path(self, uri):
from dulwich.client import TCPGitClient, SSHGitClient, SubprocessGitClient
for handler, transport in (("git://", TCPGitClient), ("git@", SSHGitClient)):
for handler, transport in (("git://", TCPGitClient), ("git@", SSHGitClient), ("git+ssh://", SSHGitClient)):
if uri.startswith(handler):
if handler == 'git@':
host, path = uri[len(handler):].split(":", 1)
host = 'git@' + host
else:
......@@ -381,9 +383,9 @@
if uri.startswith(handler):
if handler == 'git@':
host, path = uri[len(handler):].split(":", 1)
host = 'git@' + host
else:
host, path = uri[len(handler):].split('/', 1)
host, path = uri[len(handler):].split("/", 1)
return transport(host), '/' + path
# if its not git or git+ssh, try a local url..
return SubprocessGitClient(), uri
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment