[ensureconf] prevent abortion on unclean repo

aborting abruptly is quite inconvenient
1 files changed, 3 insertions(+), 0 deletions(-)

M hgext/confman.py
M hgext/confman.py +3 -0
@@ 226,6 226,9 @@ def ensureconf(ui, repo, **opts):
         crepo = hg.repository(ui, path=path)
         source, _branches = hg.parseurl(crepo.ui.expandpath('default'), None)
         other = hg.peer(ui, opts, source)
+        if any(crepo.status()):
+            ui.warn('%s repo is unclean, please adjust\n' % section)
+            continue
         if not opts.get('no_pull'):
             ui.status('pulling repo %s\n' % section)
             crepo.pull(other)