equal
deleted
inserted
replaced
520 # requires file contains a newline-delimited list of |
520 # requires file contains a newline-delimited list of |
521 # features/capabilities the opener (us) must have in order to use |
521 # features/capabilities the opener (us) must have in order to use |
522 # the repository. This file was introduced in Mercurial 0.9.2, |
522 # the repository. This file was introduced in Mercurial 0.9.2, |
523 # which means very old repositories may not have one. We assume |
523 # which means very old repositories may not have one. We assume |
524 # a missing file translates to no requirements. |
524 # a missing file translates to no requirements. |
525 try: |
525 read = vfs.tryread if allowmissing else vfs.read |
526 return set(vfs.read(b'requires').splitlines()) |
526 return set(read(b'requires').splitlines()) |
527 except FileNotFoundError: |
|
528 if not allowmissing: |
|
529 raise |
|
530 return set() |
|
531 |
527 |
532 |
528 |
533 def makelocalrepository(baseui, path, intents=None): |
529 def makelocalrepository(baseui, path, intents=None): |
534 """Create a local repository object. |
530 """Create a local repository object. |
535 |
531 |