##// END OF EJS Templates
requirements: show all missing features in the error message....
Pierre-Yves David -
r14746:72e4fcb4 stable
parent child Browse files
Show More
@@ -698,10 +698,14 b' def readrequires(opener, supported):'
698 698 '''Reads and parses .hg/requires and checks if all entries found
699 699 are in the list of supported features.'''
700 700 requirements = set(opener.read("requires").splitlines())
701 missings = []
701 702 for r in requirements:
702 703 if r not in supported:
703 704 if not r or not r[0].isalnum():
704 705 raise error.RequirementError(_(".hg/requires file is corrupt"))
705 raise error.RequirementError(_("unknown repository format: "
706 "requires feature '%s' (upgrade Mercurial)") % r)
706 missings.append(r)
707 missings.sort()
708 if missings:
709 raise error.RequirementError(_("unknown repository format: "
710 "requires features '%s' (upgrade Mercurial)") % "', '".join(missings))
707 711 return requirements
@@ -98,7 +98,7 b' Make sure we do not obscure unknown requ'
98 98 $ echo foo >> foo
99 99 $ echo fake >> .hg/requires
100 100 $ hg commit -m bla
101 abort: unknown repository format: requires feature 'fake' (upgrade Mercurial)!
101 abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
102 102 [255]
103 103
104 104 $ cd ..
@@ -107,11 +107,11 b' Make sure we do not obscure unknown requ'
107 107
108 108 $ echo fake >> .hg/requires
109 109 $ hg id
110 abort: unknown repository format: requires feature 'fake' (upgrade Mercurial)!
110 abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
111 111 [255]
112 112
113 113 $ cd ..
114 114 $ hg id test
115 abort: unknown repository format: requires feature 'fake' (upgrade Mercurial)!
115 abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
116 116 [255]
117 117
@@ -9,5 +9,9 b''
9 9 [255]
10 10 $ echo indoor-pool > .hg/requires
11 11 $ hg tip
12 abort: unknown repository format: requires feature 'indoor-pool' (upgrade Mercurial)!
12 abort: unknown repository format: requires features 'indoor-pool' (upgrade Mercurial)!
13 13 [255]
14 $ echo outdoor-pool >> .hg/requires
15 $ hg tip
16 abort: unknown repository format: requires features 'indoor-pool', 'outdoor-pool' (upgrade Mercurial)!
17 [255]
General Comments 0
You need to be logged in to leave comments. Login now