##// 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 '''Reads and parses .hg/requires and checks if all entries found
698 '''Reads and parses .hg/requires and checks if all entries found
699 are in the list of supported features.'''
699 are in the list of supported features.'''
700 requirements = set(opener.read("requires").splitlines())
700 requirements = set(opener.read("requires").splitlines())
701 missings = []
701 for r in requirements:
702 for r in requirements:
702 if r not in supported:
703 if r not in supported:
703 if not r or not r[0].isalnum():
704 if not r or not r[0].isalnum():
704 raise error.RequirementError(_(".hg/requires file is corrupt"))
705 raise error.RequirementError(_(".hg/requires file is corrupt"))
705 raise error.RequirementError(_("unknown repository format: "
706 missings.append(r)
706 "requires feature '%s' (upgrade Mercurial)") % r)
707 missings.sort()
708 if missings:
709 raise error.RequirementError(_("unknown repository format: "
710 "requires features '%s' (upgrade Mercurial)") % "', '".join(missings))
707 return requirements
711 return requirements
@@ -98,7 +98,7 b' Make sure we do not obscure unknown requ'
98 $ echo foo >> foo
98 $ echo foo >> foo
99 $ echo fake >> .hg/requires
99 $ echo fake >> .hg/requires
100 $ hg commit -m bla
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 [255]
102 [255]
103
103
104 $ cd ..
104 $ cd ..
@@ -107,11 +107,11 b' Make sure we do not obscure unknown requ'
107
107
108 $ echo fake >> .hg/requires
108 $ echo fake >> .hg/requires
109 $ hg id
109 $ hg id
110 abort: unknown repository format: requires feature 'fake' (upgrade Mercurial)!
110 abort: unknown repository format: requires features 'fake' (upgrade Mercurial)!
111 [255]
111 [255]
112
112
113 $ cd ..
113 $ cd ..
114 $ hg id test
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 [255]
116 [255]
117
117
@@ -9,5 +9,9 b''
9 [255]
9 [255]
10 $ echo indoor-pool > .hg/requires
10 $ echo indoor-pool > .hg/requires
11 $ hg tip
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 [255]
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