comparison tests/test-subrepo-missing.t @ 16596:95ca6c8b38da stable

subrepo: do not traceback on .hgsubstate parsing errors Note that aborting in subrepo.state() prevents "repairing" commands like revert to be issued. The user will have to edit the .hgsubstate manually (but he probably had already otherwise this would not be failing). The same behaviour already happens with invalid .hgsub entries.
author Patrick Mezard <patrick@mezard.eu>
date Fri, 04 May 2012 14:19:55 +0200
parents 2de6ac4ac17c
children f2719b387380
comparison
equal deleted inserted replaced
16595:2de6ac4ac17c 16596:95ca6c8b38da
16 16
17 >>> file('.hgsubstate', 'wb').write('\n\n \t \n \n') 17 >>> file('.hgsubstate', 'wb').write('\n\n \t \n \n')
18 $ hg st --subrepos 18 $ hg st --subrepos
19 M .hgsubstate 19 M .hgsubstate
20 $ hg revert -qC .hgsubstate 20 $ hg revert -qC .hgsubstate
21
22 abort more gracefully on .hgsubstate parsing error
23
24 $ cp .hgsubstate .hgsubstate.old
25 >>> file('.hgsubstate', 'wb').write('\ninvalid')
26 $ hg st --subrepos
27 abort: invalid subrepository revision specifier in .hgsubstate line 2
28 [255]
29 $ mv .hgsubstate.old .hgsubstate
21 30
22 delete .hgsub and revert it 31 delete .hgsub and revert it
23 32
24 $ rm .hgsub 33 $ rm .hgsub
25 $ hg revert .hgsub 34 $ hg revert .hgsub