equal
deleted
inserted
replaced
2049 def _isvalidlocalpath(self, path): |
2049 def _isvalidlocalpath(self, path): |
2050 """Returns True if the given path is a potentially valid repository. |
2050 """Returns True if the given path is a potentially valid repository. |
2051 This is its own function so that extensions can change the definition of |
2051 This is its own function so that extensions can change the definition of |
2052 'valid' in this case (like when pulling from a git repo into a hg |
2052 'valid' in this case (like when pulling from a git repo into a hg |
2053 one).""" |
2053 one).""" |
2054 return os.path.isdir(os.path.join(path, '.hg')) |
2054 try: |
|
2055 return os.path.isdir(os.path.join(path, '.hg')) |
|
2056 # Python 2 may return TypeError. Python 3, ValueError. |
|
2057 except (TypeError, ValueError): |
|
2058 return False |
2055 |
2059 |
2056 @property |
2060 @property |
2057 def suboptions(self): |
2061 def suboptions(self): |
2058 """Return sub-options and their values for this path. |
2062 """Return sub-options and their values for this path. |
2059 |
2063 |