equal
deleted
inserted
replaced
12 |
12 |
13 from mercurial import util |
13 from mercurial import util |
14 |
14 |
15 try: |
15 try: |
16 from mercurial import obsolete |
16 from mercurial import obsolete |
17 if not obsolete._enabled: |
|
18 obsolete._enabled = True |
|
19 except ImportError: |
17 except ImportError: |
20 raise util.Abort('Obsolete extension requires Mercurial 2.3 (or later)') |
18 raise util.Abort('Obsolete extension requires Mercurial 2.3 (or later)') |
21 |
19 |
22 import sys |
20 import sys |
23 import json |
21 import json |
38 def reposetup(ui, repo): |
36 def reposetup(ui, repo): |
39 """Detect that a repo still contains some old obsolete format |
37 """Detect that a repo still contains some old obsolete format |
40 """ |
38 """ |
41 if not repo.local(): |
39 if not repo.local(): |
42 return |
40 return |
|
41 evolveopts = ui.configlist('experimental', 'evolution') |
|
42 if not evolveopts: |
|
43 evolveopts = 'all' |
|
44 ui.setconfig('experimental', 'evolution', evolveopts) |
43 for arg in sys.argv: |
45 for arg in sys.argv: |
44 if 'debugc' in arg: |
46 if 'debugc' in arg: |
45 break |
47 break |
46 else: |
48 else: |
47 data = repo.opener.tryread('obsolete-relations') |
49 data = repo.opener.tryread('obsolete-relations') |