equal
deleted
inserted
replaced
294 shutil.rmtree(self.dir, True) |
294 shutil.rmtree(self.dir, True) |
295 |
295 |
296 d = dircleanup(dest) |
296 d = dircleanup(dest) |
297 |
297 |
298 link = 0 |
298 link = 0 |
|
299 abspath = source |
299 if not (source.startswith("http://") or |
300 if not (source.startswith("http://") or |
300 source.startswith("hg://") or |
301 source.startswith("hg://") or |
301 source.startswith("old-http://")): |
302 source.startswith("old-http://")): |
302 source = os.path.abspath(source) |
303 abspath = os.path.abspath(source) |
303 d1 = os.stat(dest).st_dev |
304 d1 = os.stat(dest).st_dev |
304 d2 = os.stat(source).st_dev |
305 d2 = os.stat(source).st_dev |
305 if d1 == d2: link = 1 |
306 if d1 == d2: link = 1 |
306 |
307 |
307 if link: |
308 if link: |
321 cg = other.changegroup(fetch) |
322 cg = other.changegroup(fetch) |
322 repo.addchangegroup(cg) |
323 repo.addchangegroup(cg) |
323 |
324 |
324 f = repo.opener("hgrc", "w") |
325 f = repo.opener("hgrc", "w") |
325 f.write("[paths]\n") |
326 f.write("[paths]\n") |
326 f.write("default = %s\n" % source) |
327 f.write("default = %s\n" % abspath) |
327 |
328 |
328 if not opts['noupdate']: |
329 if not opts['noupdate']: |
329 update(ui, repo) |
330 update(ui, repo) |
330 |
331 |
331 d.close() |
332 d.close() |