Kiln » Dependencies » Dulwich Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master, master-1, and master-0

Skip ^{} tags.

Changeset 669105af83a4

Parent 9df270a8044b

by Jelmer Vernooij

Changes to 3 files · Browse files at 669105af83a4 Showing diff from parent 9df270a8044b Diff from another changeset...

Change 1 of 4 Show Entire File bin/​dulwich Stacked
 
29
30
31
 
32
33
34
 
36
37
38
39
 
40
41
42
 
152
153
154
155
156
157
158
 
164
165
166
167
168
169
170
171
 
172
173
174
 
29
30
31
32
33
34
35
 
37
38
39
 
40
41
42
43
 
153
154
155
 
156
157
158
 
164
165
166
 
167
168
169
 
170
171
172
173
@@ -29,6 +29,7 @@
  # if its not git or git+ssh, try a local url..   return SubprocessGitClient(), uri   +  def cmd_fetch_pack(args):   from dulwich.client import SimpleFetchGraphWalker   from dulwich.repo import Repo @@ -36,7 +37,7 @@
  opts = dict(opts)   client, path = get_transport_and_path(args.pop(0))   if "--all" in opts: - determine_wants = lambda x: [y for y in x.values() if not y in r.object_store] + determine_wants = r.object_store.determine_wants_all   else:   determine_wants = lambda x: [y for y in args if not y in r.object_store]   r = Repo(".") @@ -152,7 +153,6 @@
  if args == []:   print "usage: dulwich clone host:path [PATH]"   sys.exit(1) -   client, host_path = get_transport_and_path(args.pop(0))     if len(args) > 0: @@ -164,11 +164,10 @@
  os.mkdir(path)   Repo.init(path)   r = Repo(path) - determine_wants = lambda x: [y for y in x.values() if not y in r.object_store]   graphwalker = SimpleFetchGraphWalker(r.heads().values(), r.get_parents)   f, commit = r.object_store.add_pack()   try: - client.fetch_pack(host_path, determine_wants, graphwalker, f.write, + client.fetch_pack(host_path, r.object_store.determine_wants_all, graphwalker, f.write,   sys.stdout.write)   f.close()   commit()
Change 1 of 1 Show Entire File dulwich/​client.py Stacked
 
85
86
87
88
89
 
90
91
92
 
85
86
87
 
 
88
89
90
91
@@ -85,8 +85,7 @@
  (sha, ref) = pkt.rstrip("\n").split(" ", 1)   if server_capabilities is None:   (ref, server_capabilities) = extract_capabilities(ref) - if not (ref == "capabilities^{}" and sha == "0" * 40): - refs[ref] = sha + refs[ref] = sha   return refs, server_capabilities     def send_pack(self, path, generate_pack_contents):
 
42
43
44
 
 
 
45
46
47
 
42
43
44
45
46
47
48
49
50
@@ -42,6 +42,9 @@
  self.path = path   self._packs = None   + def determine_wants_all(self, refs): + return [sha for (ref, sha) in refs.iteritems() if not sha in self and not ref.endswith("^{}")] +   def iter_shas(self, shas):   return ObjectStoreIterator(self, shas)