Kiln » Kiln Extensions
Clone URL:  
Pushed to 2 repositories · View In Graph Contained in tip

upgrade extensions to Kiln 2.5.172

Changeset 70e309ffda36

Parent 3f4083dafa13

by Profile picture of User 12Benjamin Pollack <benjamin@fogcreek.com>

Changes to 2 files · Browse files at 70e309ffda36 Showing diff from parent 3f4083dafa13 Diff from another changeset...

 
178
179
180
181
 
182
183
184
 
178
179
180
 
181
182
183
184
@@ -178,7 +178,7 @@
  path = ''   remote = repo   else: - remote = hg.peer(repo, {}, path) + remote = hg.repository(hg.remoteui(ui, {}), path, False)     # The path could be a scheme so use Mercurial's normal functionality   # to resolve the scheme to a repository and use its path
 
83
84
85
86
87
 
88
89
90
 
114
115
116
117
118
119
120
121
122
123
124
125
126
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
129
130
 
83
84
85
 
 
86
87
88
89
 
113
114
115
 
 
 
 
 
 
 
 
 
 
 
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
@@ -83,8 +83,7 @@
  # in this case: send the data straight through   else:   try: - ret, output = self._callpush("putbfile", fd, sha=sha, - headers={'content-type':'application/mercurial-0.1'}) + ret, output = self._callpush("putbfile", fd, sha=sha)   if ret == "":   raise error.ResponseError(_('putbfile failed:'),   output) @@ -114,17 +113,30 @@
  # way, consider it missing   return 2   - @wireproto.batchable - def heads(self): - f = wireproto.future() - yield {}, f - d = f.value - if d[:len(_heads_prefix)] == _heads_prefix: - d = d[len(_heads_prefix):] - try: - yield wireproto.decodelist(d[:-1]) - except ValueError: - self._abort(error.ResponseError(_("unexpected response:"), d)) + try: + @wireproto.batchable + def heads(self): + f = wireproto.future() + yield {}, f + d = f.value + if d[:len(_heads_prefix)] == _heads_prefix: + d = d[len(_heads_prefix):] + try: + yield wireproto.decodelist(d[:-1]) + except ValueError: + self._abort(error.ResponseError(_("unexpected response:"), d)) + except AttributeError: + # Mercurial < 1.9 has no @batchable; define a normal wirerepo heads + # command + def heads(self): + d = self._call('heads') + if d[:len(_heads_prefix)] == _heads_prefix: + d = d[len(_heads_prefix):] + try: + return wireproto.decodelist(d[:-1]) + except ValueError: + self._abort(error.ResponseError(_("unexpected response:"), d)) +   repo.__class__ = kbfileswirerepository    # wrap dispatch to check for and remove the kbfiles argument so commands with