equal
deleted
inserted
replaced
235 def __del__(self): |
235 def __del__(self): |
236 if not self.bundlefile.closed: |
236 if not self.bundlefile.closed: |
237 self.bundlefile.close() |
237 self.bundlefile.close() |
238 if self.tempfile is not None: |
238 if self.tempfile is not None: |
239 os.unlink(self.tempfile) |
239 os.unlink(self.tempfile) |
|
240 |
|
241 def instance(ui, path, create): |
|
242 if create: |
|
243 raise util.Abort(_('cannot create new bundle repository')) |
|
244 path = util.drop_scheme('file', path) |
|
245 if path.startswith('bundle:'): |
|
246 path = util.drop_scheme('bundle', path) |
|
247 s = path.split("+", 1) |
|
248 if len(s) == 1: |
|
249 repopath, bundlename = "", s[0] |
|
250 else: |
|
251 repopath, bundlename = s |
|
252 else: |
|
253 repopath, bundlename = '', path |
|
254 return bundlerepository(ui, repopath, bundlename) |