mercurial/copies.py
changeset 42115 27475ae67676
parent 41936 a791623458ef
child 42118 967c098eed33
equal deleted inserted replaced
42114:aa84bc48c2f7 42115:27475ae67676
   158     """
   158     """
   159     ma = a.manifest()
   159     ma = a.manifest()
   160     mb = b.manifest()
   160     mb = b.manifest()
   161     return mb.filesnotin(ma, match=match)
   161     return mb.filesnotin(ma, match=match)
   162 
   162 
       
   163 def usechangesetcentricalgo(repo):
       
   164     """Checks if we should use changeset-centric copy algorithms"""
       
   165     return (repo.ui.config('experimental', 'copies.read-from') ==
       
   166             'compatibility')
       
   167 
   163 def _committedforwardcopies(a, b, match):
   168 def _committedforwardcopies(a, b, match):
   164     """Like _forwardcopies(), but b.rev() cannot be None (working copy)"""
   169     """Like _forwardcopies(), but b.rev() cannot be None (working copy)"""
   165     # files might have to be traced back to the fctx parent of the last
   170     # files might have to be traced back to the fctx parent of the last
   166     # one-side-only changeset, but not further back than that
   171     # one-side-only changeset, but not further back than that
   167     repo = a._repo
   172     repo = a._repo
   168 
   173 
   169     if repo.ui.config('experimental', 'copies.read-from') == 'compatibility':
   174     if usechangesetcentricalgo(repo):
   170         return _changesetforwardcopies(a, b, match)
   175         return _changesetforwardcopies(a, b, match)
   171 
   176 
   172     debug = repo.ui.debugflag and repo.ui.configbool('devel', 'debug.copies')
   177     debug = repo.ui.debugflag and repo.ui.configbool('devel', 'debug.copies')
   173     dbg = repo.ui.debug
   178     dbg = repo.ui.debug
   174     if debug:
   179     if debug: