mercurial/commands.py
changeset 50826 3bd013e8e024
parent 50825 13ad1b2ad3b4
child 50827 f5d16c4caae2
equal deleted inserted replaced
50825:13ad1b2ad3b4 50826:3bd013e8e024
  1424       :current: Boolean. True if it is the current branch.
  1424       :current: Boolean. True if it is the current branch.
  1425 
  1425 
  1426     Returns 0.
  1426     Returns 0.
  1427     """
  1427     """
  1428 
  1428 
  1429     opts = pycompat.byteskwargs(opts)
  1429     revs = opts.get('rev')
  1430     revs = opts.get(b'rev')
       
  1431     selectedbranches = None
  1430     selectedbranches = None
  1432     if revs:
  1431     if revs:
  1433         revs = logcmdutil.revrange(repo, revs)
  1432         revs = logcmdutil.revrange(repo, revs)
  1434         getbi = repo.revbranchcache().branchinfo
  1433         getbi = repo.revbranchcache().branchinfo
  1435         selectedbranches = {getbi(r)[0] for r in revs}
  1434         selectedbranches = {getbi(r)[0] for r in revs}
  1436 
  1435 
  1437     ui.pager(b'branches')
  1436     ui.pager(b'branches')
  1438     fm = ui.formatter(b'branches', opts)
  1437     fm = ui.formatter(b'branches', pycompat.byteskwargs(opts))
  1439     hexfunc = fm.hexfunc
  1438     hexfunc = fm.hexfunc
  1440 
  1439 
  1441     allheads = set(repo.heads())
  1440     allheads = set(repo.heads())
  1442     branches = []
  1441     branches = []
  1443     for tag, heads, tip, isclosed in repo.branchmap().iterbranches():
  1442     for tag, heads, tip, isclosed in repo.branchmap().iterbranches():