mercurial/commands.py
changeset 6299 653ddd1d7cd7
parent 6296 a9e6b8875805
child 6304 d99b4e8652b3
equal deleted inserted replaced
6298:53cbb33e1269 6299:653ddd1d7cd7
  2378                     util.unlink(repo.wjoin(f))
  2378                     util.unlink(repo.wjoin(f))
  2379                 except OSError:
  2379                 except OSError:
  2380                     pass
  2380                     pass
  2381                 repo.dirstate.remove(f)
  2381                 repo.dirstate.remove(f)
  2382 
  2382 
       
  2383             normal = None
       
  2384             if node == parent:
       
  2385                 # We're reverting to our parent. If possible, we'd like status
       
  2386                 # to report the file as clean. We have to use normallookup for
       
  2387                 # merges to avoid losing information about merged/dirty files.
       
  2388                 if p2 != nullid:
       
  2389                     normal = repo.dirstate.normallookup
       
  2390                 else:
       
  2391                     normal = repo.dirstate.normal
  2383             for f in revert[0]:
  2392             for f in revert[0]:
  2384                 checkout(f)
  2393                 checkout(f)
       
  2394                 if normal:
       
  2395                     normal(f)
  2385 
  2396 
  2386             for f in add[0]:
  2397             for f in add[0]:
  2387                 checkout(f)
  2398                 checkout(f)
  2388                 repo.dirstate.add(f)
  2399                 repo.dirstate.add(f)
  2389 
  2400