mercurial/context.py
changeset 44365 7c4b98a4e536
parent 44354 2e2cfc3bea0b
child 44857 e607099d8b93
child 44912 4234c9af515d
equal deleted inserted replaced
44364:8be0c63535b5 44365:7c4b98a4e536
  2485             user=user,
  2485             user=user,
  2486             branch=branch,
  2486             branch=branch,
  2487             editor=editor,
  2487             editor=editor,
  2488         )
  2488         )
  2489 
  2489 
       
  2490     def tomemctx_for_amend(self, precursor):
       
  2491         extra = precursor.extra().copy()
       
  2492         extra[b'amend_source'] = precursor.hex()
       
  2493         return self.tomemctx(
       
  2494             text=precursor.description(),
       
  2495             branch=precursor.branch(),
       
  2496             extra=extra,
       
  2497             date=precursor.date(),
       
  2498             user=precursor.user(),
       
  2499         )
       
  2500 
  2490     def isdirty(self, path):
  2501     def isdirty(self, path):
  2491         return path in self._cache
  2502         return path in self._cache
  2492 
  2503 
  2493     def isempty(self):
  2504     def isempty(self):
  2494         # We need to discard any keys that are actually clean before the empty
  2505         # We need to discard any keys that are actually clean before the empty