mercurial/cmdutil.py
changeset 16430 6883c2363f44
parent 16429 71dcce391a44
child 16458 55982f62651f
equal deleted inserted replaced
16429:71dcce391a44 16430:6883c2363f44
  1367         m.bad = badfn
  1367         m.bad = badfn
  1368         for abs in repo[node].walk(m):
  1368         for abs in repo[node].walk(m):
  1369             if abs not in names:
  1369             if abs not in names:
  1370                 names[abs] = m.rel(abs), m.exact(abs)
  1370                 names[abs] = m.rel(abs), m.exact(abs)
  1371 
  1371 
       
  1372         # get the list of subrepos that must be reverted
  1372         targetsubs = [s for s in repo[node].substate if m(s)]
  1373         targetsubs = [s for s in repo[node].substate if m(s)]
  1373         if targetsubs and not opts.get('no_backup'):
       
  1374             msg = _("cannot revert subrepos without --no-backup")
       
  1375             raise util.Abort(msg)
       
  1376 
       
  1377         m = scmutil.matchfiles(repo, names)
  1374         m = scmutil.matchfiles(repo, names)
  1378         changes = repo.status(match=m)[:4]
  1375         changes = repo.status(match=m)[:4]
  1379         modified, added, removed, deleted = map(set, changes)
  1376         modified, added, removed, deleted = map(set, changes)
  1380 
  1377 
  1381         # if f is a rename, also revert the source
  1378         # if f is a rename, also revert the source