mercurial/commands.py
changeset 27637 b502138f5faa
parent 27624 d46db4390715
child 27651 07fc2f2134ba
equal deleted inserted replaced
27636:21b363bd87dc 27637:b502138f5faa
  3115             manifestfiles = set(ctx.manifest().keys())
  3115             manifestfiles = set(ctx.manifest().keys())
  3116             dirstatefiles = set(dirstate)
  3116             dirstatefiles = set(dirstate)
  3117             manifestonly = manifestfiles - dirstatefiles
  3117             manifestonly = manifestfiles - dirstatefiles
  3118             dsonly = dirstatefiles - manifestfiles
  3118             dsonly = dirstatefiles - manifestfiles
  3119             dsnotadded = set(f for f in dsonly if dirstate[f] != 'a')
  3119             dsnotadded = set(f for f in dsonly if dirstate[f] != 'a')
  3120             changedfiles =  manifestonly | dsnotadded
  3120             changedfiles = manifestonly | dsnotadded
  3121 
  3121 
  3122         dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)
  3122         dirstate.rebuild(ctx.node(), ctx.manifest(), changedfiles)
  3123     finally:
  3123     finally:
  3124         wlock.release()
  3124         wlock.release()
  3125 
  3125 
  5491     if optupdate:
  5491     if optupdate:
  5492         try:
  5492         try:
  5493             brev = checkout
  5493             brev = checkout
  5494             movemarkfrom = None
  5494             movemarkfrom = None
  5495             if not checkout:
  5495             if not checkout:
  5496                 updata =  destutil.destupdate(repo)
  5496                 updata = destutil.destupdate(repo)
  5497                 checkout, movemarkfrom, brev = updata
  5497                 checkout, movemarkfrom, brev = updata
  5498             ret = hg.update(repo, checkout)
  5498             ret = hg.update(repo, checkout)
  5499         except error.UpdateAbort as inst:
  5499         except error.UpdateAbort as inst:
  5500             msg = _("not updating: %s") % str(inst)
  5500             msg = _("not updating: %s") % str(inst)
  5501             hint = inst.hint
  5501             hint = inst.hint
  6928                              )
  6928                              )
  6929 
  6929 
  6930         if check:
  6930         if check:
  6931             cmdutil.bailifchanged(repo, merge=False)
  6931             cmdutil.bailifchanged(repo, merge=False)
  6932         if rev is None:
  6932         if rev is None:
  6933             updata =  destutil.destupdate(repo, clean=clean, check=check)
  6933             updata = destutil.destupdate(repo, clean=clean, check=check)
  6934             rev, movemarkfrom, brev = updata
  6934             rev, movemarkfrom, brev = updata
  6935 
  6935 
  6936         repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
  6936         repo.ui.setconfig('ui', 'forcemerge', tool, 'update')
  6937 
  6937 
  6938         if clean:
  6938         if clean: