comparison mercurial/crecord.py @ 25310:c1f5ef76d1c2

record: add an operation arguments to customize recording ui This patch is part of a series of patches to change the recording ui to reflect the operation currently running (commit, shelve, revert ...). This patch adds a new argument to the recording function to reflect in the UI what operation we are running.
author Laurent Charignon <lcharignon@fb.com>
date Wed, 27 May 2015 15:49:24 -0700
parents d71492ca2fdd
children 724421cb4745
comparison
equal deleted inserted replaced
25309:b333ca94403d 25310:c1f5ef76d1c2
423 def __getattr__(self, name): 423 def __getattr__(self, name):
424 return getattr(self._hunk, name) 424 return getattr(self._hunk, name)
425 def __repr__(self): 425 def __repr__(self):
426 return '<hunk %r@%d>' % (self.filename(), self.fromline) 426 return '<hunk %r@%d>' % (self.filename(), self.fromline)
427 427
428 def filterpatch(ui, chunks, chunkselector): 428 def filterpatch(ui, chunks, chunkselector, operation=None):
429 """interactively filter patch chunks into applied-only chunks""" 429 """interactively filter patch chunks into applied-only chunks"""
430 430
431 chunks = list(chunks) 431 chunks = list(chunks)
432 # convert chunks list into structure suitable for displaying/modifying 432 # convert chunks list into structure suitable for displaying/modifying
433 # with curses. create a list of headers only. 433 # with curses. create a list of headers only.