equal
deleted
inserted
replaced
875 # first load config from shared source if we has to |
875 # first load config from shared source if we has to |
876 if requirementsmod.SHARESAFE_REQUIREMENT in requirements and sharedvfs: |
876 if requirementsmod.SHARESAFE_REQUIREMENT in requirements and sharedvfs: |
877 try: |
877 try: |
878 ui.readconfig(sharedvfs.join(b'hgrc'), root=sharedvfs.base) |
878 ui.readconfig(sharedvfs.join(b'hgrc'), root=sharedvfs.base) |
879 ret = True |
879 ret = True |
880 except IOError: |
880 except OSError: |
881 pass |
881 pass |
882 |
882 |
883 try: |
883 try: |
884 ui.readconfig(hgvfs.join(b'hgrc'), root=wdirvfs.base) |
884 ui.readconfig(hgvfs.join(b'hgrc'), root=wdirvfs.base) |
885 ret = True |
885 ret = True |
886 except IOError: |
886 except OSError: |
887 pass |
887 pass |
888 |
888 |
889 try: |
889 try: |
890 ui.readconfig(hgvfs.join(b'hgrc-not-shared'), root=wdirvfs.base) |
890 ui.readconfig(hgvfs.join(b'hgrc-not-shared'), root=wdirvfs.base) |
891 ret = True |
891 ret = True |
892 except IOError: |
892 except OSError: |
893 pass |
893 pass |
894 |
894 |
895 return ret |
895 return ret |
896 |
896 |
897 |
897 |
2812 else: |
2812 else: |
2813 msg = _( |
2813 msg = _( |
2814 b'repository tip rolled back to revision %d (undo %s)\n' |
2814 b'repository tip rolled back to revision %d (undo %s)\n' |
2815 ) % (oldtip, desc) |
2815 ) % (oldtip, desc) |
2816 parentgone = any(self[p].rev() > oldtip for p in parents) |
2816 parentgone = any(self[p].rev() > oldtip for p in parents) |
2817 except IOError: |
2817 except OSError: |
2818 msg = _(b'rolling back unknown transaction\n') |
2818 msg = _(b'rolling back unknown transaction\n') |
2819 desc = None |
2819 desc = None |
2820 parentgone = True |
2820 parentgone = True |
2821 |
2821 |
2822 if not force and self[b'.'] != self[b'tip'] and desc == b'commit': |
2822 if not force and self[b'.'] != self[b'tip'] and desc == b'commit': |
3964 |
3964 |
3965 if createopts.get(b'sharedrelative'): |
3965 if createopts.get(b'sharedrelative'): |
3966 try: |
3966 try: |
3967 sharedpath = os.path.relpath(sharedpath, hgvfs.base) |
3967 sharedpath = os.path.relpath(sharedpath, hgvfs.base) |
3968 sharedpath = util.pconvert(sharedpath) |
3968 sharedpath = util.pconvert(sharedpath) |
3969 except (IOError, ValueError) as e: |
3969 except (OSError, ValueError) as e: |
3970 # ValueError is raised on Windows if the drive letters differ |
3970 # ValueError is raised on Windows if the drive letters differ |
3971 # on each path. |
3971 # on each path. |
3972 raise error.Abort( |
3972 raise error.Abort( |
3973 _(b'cannot calculate relative path'), |
3973 _(b'cannot calculate relative path'), |
3974 hint=stringutil.forcebytestr(e), |
3974 hint=stringutil.forcebytestr(e), |