Merge lp:~quartz25/dulwich/alt-ssh-path into lp:~vcs-imports/dulwich/trunk

Proposed by Ross Light
Status: Merged
Merge reported by: Jelmer Vernooij
Merged at revision: not available
Proposed branch: lp:~quartz25/dulwich/alt-ssh-path
Merge into: lp:~vcs-imports/dulwich/trunk
Diff against target: 29 lines (+6/-2)
1 file modified
dulwich/client.py (+6/-2)
To merge this branch: bzr merge lp:~quartz25/dulwich/alt-ssh-path
Reviewer Review Type Date Requested Status
Jelmer Vernooij (community) code Approve
Review via email: mp+26780@code.launchpad.net

This proposal supersedes a proposal from 2010-05-26.

Description of the change

Allows alternate paths for the git-receive-pack and git-upload-pack over SSH connections.

To post a comment you must log in.
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Posted in a previous version of this proposal

Thanks.

review: Approve (code)
Revision history for this message
Jelmer Vernooij (jelmer) wrote : Posted in a previous version of this proposal

We need to make sure this is merged in the right order, Augie has some upcoming refactoring work that might conflict with this.

Revision history for this message
Ross Light (quartz25) wrote :

I merged the latest changes. It doesn't seem to have affected my code.

Revision history for this message
Ross Light (quartz25) wrote :

Launchpad doesn't seem to be letting me push to my branch at the moment. I'll try again tomorrow morning.

Revision history for this message
Ross Light (quartz25) wrote :

The branch works again. Feel free to merge.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Argh, I hadn't actually merged Augie's branch yet. This conflicts horribly now, I'll see if I can fix it up and land.

Revision history for this message
Jelmer Vernooij (jelmer) :
review: Approve (code)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'dulwich/client.py'
2--- dulwich/client.py 2010-05-30 15:00:00 +0000
3+++ dulwich/client.py 2010-06-05 00:50:33 +0000
4@@ -371,19 +371,23 @@
5 self.host = host
6 self.port = port
7 self.username = username
8+ self.receive_pack_path = "git-receive-pack"
9+ self.upload_pack_path = "git-upload-pack"
10 self._args = args
11 self._kwargs = kwargs
12
13 def send_pack(self, path, determine_wants, generate_pack_contents):
14 remote = get_ssh_vendor().connect_ssh(
15- self.host, ["git-receive-pack '%s'" % path],
16+ self.host, ["'%s' '%s'" % (self.receive_pack_path, path)],
17 port=self.port, username=self.username)
18 client = GitClient(lambda: _fileno_can_read(remote.proc.stdout.fileno()), remote.recv, remote.send, *self._args, **self._kwargs)
19 return client.send_pack(path, determine_wants, generate_pack_contents)
20
21 def fetch_pack(self, path, determine_wants, graph_walker, pack_data,
22 progress):
23- remote = get_ssh_vendor().connect_ssh(self.host, ["git-upload-pack '%s'" % path], port=self.port, username=self.username)
24+ remote = get_ssh_vendor().connect_ssh(
25+ self.host, ["'%s' '%s'" % (self.upload_pack_path, path)],
26+ port=self.port, username=self.username)
27 client = GitClient(lambda: _fileno_can_read(remote.proc.stdout.fileno()), remote.recv, remote.send, *self._args, **self._kwargs)
28 return client.fetch_pack(path, determine_wants, graph_walker, pack_data,
29 progress)

Subscribers

People subscribed via source and target branches