mercurial/cmdutil.py
changeset 47730 cc438f793b98
parent 47728 4d1ae9cba551
child 47732 dc610e325302
equal deleted inserted replaced
47729:b66ae4468c9a 47730:cc438f793b98
   628 
   628 
   629                     if dirstate[realname] == b'n':
   629                     if dirstate[realname] == b'n':
   630                         # without normallookup, restoring timestamp
   630                         # without normallookup, restoring timestamp
   631                         # may cause partially committed files
   631                         # may cause partially committed files
   632                         # to be treated as unmodified
   632                         # to be treated as unmodified
   633                         dirstate.normallookup(realname)
   633 
       
   634                         # XXX-PENDINGCHANGE: We should clarify the context in
       
   635                         # which this function is called  to make sure it
       
   636                         # already called within a `pendingchange`, However we
       
   637                         # are taking a shortcut here in order to be able to
       
   638                         # quickly deprecated the older API.
       
   639                         with dirstate.parentchange():
       
   640                             dirstate.update_file(
       
   641                                 realname,
       
   642                                 p1_tracked=True,
       
   643                                 wc_tracked=True,
       
   644                                 possibly_dirty=True,
       
   645                             )
   634 
   646 
   635                     # copystat=True here and above are a hack to trick any
   647                     # copystat=True here and above are a hack to trick any
   636                     # editors that have f open that we haven't modified them.
   648                     # editors that have f open that we haven't modified them.
   637                     #
   649                     #
   638                     # Also note that this racy as an editor could notice the
   650                     # Also note that this racy as an editor could notice the