equal
deleted
inserted
replaced
927 and ex.args[0].startswith('push includes ') |
927 and ex.args[0].startswith('push includes ') |
928 and ex.hint is None): |
928 and ex.hint is None): |
929 ex.hint = hint |
929 ex.hint = hint |
930 raise |
930 raise |
931 return result |
931 return result |
932 |
|
933 |
|
934 repo.__class__ = obsoletingrepo |
932 repo.__class__ = obsoletingrepo |
|
933 |
|
934 |
|
935 ##################################################################### |
|
936 ### Older format management ### |
|
937 ##################################################################### |
|
938 |
|
939 # Code related to detection and management of older legacy format never |
|
940 # handled by core |
935 |
941 |
936 @eh.reposetup |
942 @eh.reposetup |
937 def _checkoldobsolete(ui, repo): |
943 def _checkoldobsolete(ui, repo): |
|
944 """Detect that a repo still carry some old obsolete format |
|
945 """ |
938 if not repo.local(): |
946 if not repo.local(): |
939 return |
947 return |
940 for arg in sys.argv: |
948 for arg in sys.argv: |
941 if 'debugc' in arg: |
949 if 'debugc' in arg: |
942 break |
950 break |
945 if not data: |
953 if not data: |
946 data = repo.sopener.tryread('obsoletemarkers') |
954 data = repo.sopener.tryread('obsoletemarkers') |
947 if data: |
955 if data: |
948 raise util.Abort('old format of obsolete marker detected!\n' |
956 raise util.Abort('old format of obsolete marker detected!\n' |
949 'run `hg debugconvertobsolete` once.') |
957 'run `hg debugconvertobsolete` once.') |
950 |
|
951 ### serialisation |
|
952 ############################# |
|
953 |
958 |
954 def _obsdeserialise(flike): |
959 def _obsdeserialise(flike): |
955 """read a file like object serialised with _obsserialise |
960 """read a file like object serialised with _obsserialise |
956 |
961 |
957 this desierialize into a {subject -> objects} mapping""" |
962 this desierialize into a {subject -> objects} mapping""" |