mercurial/scmutil.py
changeset 41649 799e156785f7
parent 41629 5ee3c49fc9cd
child 41650 f8b18583049f
equal deleted inserted replaced
41648:d8cdd5320f75 41649:799e156785f7
  1038     if similarity < 0 or similarity > 100:
  1038     if similarity < 0 or similarity > 100:
  1039         raise error.Abort(_('similarity must be between 0 and 100'))
  1039         raise error.Abort(_('similarity must be between 0 and 100'))
  1040     similarity /= 100.0
  1040     similarity /= 100.0
  1041 
  1041 
  1042     ret = 0
  1042     ret = 0
  1043     join = lambda f: os.path.join(prefix, f)
       
  1044 
  1043 
  1045     wctx = repo[None]
  1044     wctx = repo[None]
  1046     for subpath in sorted(wctx.substate):
  1045     for subpath in sorted(wctx.substate):
  1047         submatch = matchmod.subdirmatcher(subpath, m)
  1046         submatch = matchmod.subdirmatcher(subpath, m)
  1048         if opts.get('subrepos') or m.exact(subpath) or any(submatch.files()):
  1047         if opts.get('subrepos') or m.exact(subpath) or any(submatch.files()):
  1051             try:
  1050             try:
  1052                 if sub.addremove(submatch, subprefix, opts):
  1051                 if sub.addremove(submatch, subprefix, opts):
  1053                     ret = 1
  1052                     ret = 1
  1054             except error.LookupError:
  1053             except error.LookupError:
  1055                 repo.ui.status(_("skipping missing subrepository: %s\n")
  1054                 repo.ui.status(_("skipping missing subrepository: %s\n")
  1056                                  % join(subpath))
  1055                                  % m.uipath(subpath))
  1057 
  1056 
  1058     rejected = []
  1057     rejected = []
  1059     def badfn(f, msg):
  1058     def badfn(f, msg):
  1060         if f in m.files():
  1059         if f in m.files():
  1061             m.bad(f, msg)
  1060             m.bad(f, msg)