comparison tests/test-subrepo.t @ 24470:76b0b0fed2e3

subrepo: add dirtyreason to centralize composing dirty reason message This patch newly adds "dirtyreason()" to centralize composing dirty reason message like "uncommitted changes in subrepository 'xxxx'". There are 3 similar messages below, and this patch is a part of preparations for unifying them into (1), too. 1. uncommitted changes in subrepository 'XXXX' 2. uncommitted changes in subrepository XXXX 3. uncommitted changes in subrepo XXXX This patch chooses adding new method "dirtyreason()" instead of making "dirty()" return "reason string", because: - some of existing "dirty()" implementation is too complicated to do so simply, and - ill-mannered 3rd party subrepo classes, of which "dirty()" doesn't return "reason string", cause meaningless message (even though it is rare case)
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
date Wed, 25 Mar 2015 13:55:32 +0900
parents a8595176dd64
children 1ff35d76421c
comparison
equal deleted inserted replaced
24469:e71053ef0c46 24470:76b0b0fed2e3
144 144
145 leave sub dirty (and check ui.commitsubrepos=no aborts the commit) 145 leave sub dirty (and check ui.commitsubrepos=no aborts the commit)
146 146
147 $ echo c > s/a 147 $ echo c > s/a
148 $ hg --config ui.commitsubrepos=no ci -m4 148 $ hg --config ui.commitsubrepos=no ci -m4
149 abort: uncommitted changes in subrepo s 149 abort: uncommitted changes in subrepository 's'
150 (use --subrepos for recursive commit) 150 (use --subrepos for recursive commit)
151 [255] 151 [255]
152 $ hg id 152 $ hg id
153 f6affe3fbfaa+ tip 153 f6affe3fbfaa+ tip
154 $ hg -R s ci -mc 154 $ hg -R s ci -mc