mercurial/cmdutil.py
changeset 34083 08346a8fa65f
parent 34081 5dc6ac6555e6
child 34085 e8a7c1a0565a
equal deleted inserted replaced
34082:ba6e14f9a2d8 34083:08346a8fa65f
  1999     4. [ui] setting 'style'
  1999     4. [ui] setting 'style'
  2000     If all of these values are either the unset or the empty string,
  2000     If all of these values are either the unset or the empty string,
  2001     regular display via changeset_printer() is done.
  2001     regular display via changeset_printer() is done.
  2002     """
  2002     """
  2003     # options
  2003     # options
  2004     matchfn = None
  2004     match = None
  2005     if opts.get('patch') or opts.get('stat'):
  2005     if opts.get('patch') or opts.get('stat'):
  2006         matchfn = scmutil.matchall(repo)
  2006         match = scmutil.matchall(repo)
  2007 
  2007 
  2008     if opts.get('template') == 'json':
  2008     if opts.get('template') == 'json':
  2009         return jsonchangeset(ui, repo, matchfn, opts, buffered)
  2009         return jsonchangeset(ui, repo, match, opts, buffered)
  2010 
  2010 
  2011     spec = _lookuplogtemplate(ui, opts.get('template'), opts.get('style'))
  2011     spec = _lookuplogtemplate(ui, opts.get('template'), opts.get('style'))
  2012 
  2012 
  2013     if not spec.ref and not spec.tmpl and not spec.mapfile:
  2013     if not spec.ref and not spec.tmpl and not spec.mapfile:
  2014         return changeset_printer(ui, repo, matchfn, opts, buffered)
  2014         return changeset_printer(ui, repo, match, opts, buffered)
  2015 
  2015 
  2016     return changeset_templater(ui, repo, spec, matchfn, opts, buffered)
  2016     return changeset_templater(ui, repo, spec, match, opts, buffered)
  2017 
  2017 
  2018 def showmarker(fm, marker, index=None):
  2018 def showmarker(fm, marker, index=None):
  2019     """utility function to display obsolescence marker in a readable way
  2019     """utility function to display obsolescence marker in a readable way
  2020 
  2020 
  2021     To be used by debug function."""
  2021     To be used by debug function."""