mercurial/localrepo.py
changeset 11496 52762189c382
parent 11486 d3c3e2fdeb0c
child 11598 5be142109ed4
child 11640 c3e8ab80ee90
equal deleted inserted replaced
11495:6ee107782018 11496:52762189c382
   824                 removedsubs.update(s for s in p.substate if match(s))
   824                 removedsubs.update(s for s in p.substate if match(s))
   825             for s in wctx.substate:
   825             for s in wctx.substate:
   826                 removedsubs.discard(s)
   826                 removedsubs.discard(s)
   827                 if match(s) and wctx.sub(s).dirty():
   827                 if match(s) and wctx.sub(s).dirty():
   828                     subs.append(s)
   828                     subs.append(s)
   829             if (subs or removedsubs) and '.hgsubstate' not in changes[0]:
   829             if (subs or removedsubs):
   830                 changes[0].insert(0, '.hgsubstate')
   830                 if (not match('.hgsub') and
       
   831                     '.hgsub' in (wctx.modified() + wctx.added())):
       
   832                     raise util.Abort(_("can't commit subrepos without .hgsub"))
       
   833                 if '.hgsubstate' not in changes[0]:
       
   834                     changes[0].insert(0, '.hgsubstate')
   831 
   835 
   832             # make sure all explicit patterns are matched
   836             # make sure all explicit patterns are matched
   833             if not force and match.files():
   837             if not force and match.files():
   834                 matched = set(changes[0] + changes[1] + changes[2])
   838                 matched = set(changes[0] + changes[1] + changes[2])
   835 
   839