Mercurial > public > mercurial-scm > hg
comparison mercurial/hg.py @ 46794:e2f7b2695ba1
merge with stable
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Thu, 18 Mar 2021 18:24:59 -0400 |
parents | af7535249ea9 1099541b6462 |
children | d4ba4d51f85f |
comparison
equal
deleted
inserted
replaced
46782:6b52cffd8d0a | 46794:e2f7b2695ba1 |
---|---|
39 logexchange, | 39 logexchange, |
40 merge as mergemod, | 40 merge as mergemod, |
41 mergestate as mergestatemod, | 41 mergestate as mergestatemod, |
42 narrowspec, | 42 narrowspec, |
43 phases, | 43 phases, |
44 pycompat, | |
45 requirements, | 44 requirements, |
46 scmutil, | 45 scmutil, |
47 sshpeer, | 46 sshpeer, |
48 statichttprepo, | 47 statichttprepo, |
49 ui as uimod, | 48 ui as uimod, |
51 url, | 50 url, |
52 util, | 51 util, |
53 verify as verifymod, | 52 verify as verifymod, |
54 vfs as vfsmod, | 53 vfs as vfsmod, |
55 ) | 54 ) |
56 from .utils import hashutil | 55 from .utils import ( |
56 hashutil, | |
57 stringutil, | |
58 ) | |
59 | |
57 | 60 |
58 release = lock.release | 61 release = lock.release |
59 | 62 |
60 # shared features | 63 # shared features |
61 sharedbookmarks = b'bookmarks' | 64 sharedbookmarks = b'bookmarks' |
72 st = os.stat(path) | 75 st = os.stat(path) |
73 isfile = stat.S_ISREG(st.st_mode) | 76 isfile = stat.S_ISREG(st.st_mode) |
74 # Python 2 raises TypeError, Python 3 ValueError. | 77 # Python 2 raises TypeError, Python 3 ValueError. |
75 except (TypeError, ValueError) as e: | 78 except (TypeError, ValueError) as e: |
76 raise error.Abort( | 79 raise error.Abort( |
77 _(b'invalid path %s: %s') % (path, pycompat.bytestr(e)) | 80 _(b'invalid path %s: %s') % (path, stringutil.forcebytestr(e)) |
78 ) | 81 ) |
79 except OSError: | 82 except OSError: |
80 isfile = False | 83 isfile = False |
81 | 84 |
82 return isfile and bundlerepo or localrepo | 85 return isfile and bundlerepo or localrepo |