equal
deleted
inserted
replaced
3514 assert name.startswith(b'journal') |
3514 assert name.startswith(b'journal') |
3515 return os.path.join(base, name.replace(b'journal', b'undo', 1)) |
3515 return os.path.join(base, name.replace(b'journal', b'undo', 1)) |
3516 |
3516 |
3517 |
3517 |
3518 def instance(ui, path, create, intents=None, createopts=None): |
3518 def instance(ui, path, create, intents=None, createopts=None): |
|
3519 |
|
3520 # prevent cyclic import localrepo -> upgrade -> localrepo |
|
3521 from . import upgrade |
|
3522 |
3519 localpath = urlutil.urllocalpath(path) |
3523 localpath = urlutil.urllocalpath(path) |
3520 if create: |
3524 if create: |
3521 createrepository(ui, localpath, createopts=createopts) |
3525 createrepository(ui, localpath, createopts=createopts) |
3522 |
3526 |
3523 return makelocalrepository(ui, localpath, intents=intents) |
3527 def repo_maker(): |
|
3528 return makelocalrepository(ui, localpath, intents=intents) |
|
3529 |
|
3530 repo = repo_maker() |
|
3531 repo = upgrade.may_auto_upgrade(repo, repo_maker) |
|
3532 return repo |
3524 |
3533 |
3525 |
3534 |
3526 def islocal(path): |
3535 def islocal(path): |
3527 return True |
3536 return True |
3528 |
3537 |