mercurial/commands.py
changeset 9219 3f650f6aa130
parent 9198 061eeb602354
parent 9189 c2041f80f22a
child 9249 16f4cfc69e4f
equal deleted inserted replaced
9218:d3db87d68337 9219:3f650f6aa130
  1357     else:
  1357     else:
  1358         start = None
  1358         start = None
  1359     closed = opts.get('closed')
  1359     closed = opts.get('closed')
  1360     hideinactive, _heads = opts.get('active'), None
  1360     hideinactive, _heads = opts.get('active'), None
  1361     if not branchrevs:
  1361     if not branchrevs:
       
  1362         if closed:
       
  1363             raise error.Abort(_('you must specify a branch to use --closed'))
  1362         # Assume we're looking repo-wide heads if no revs were specified.
  1364         # Assume we're looking repo-wide heads if no revs were specified.
  1363         heads = repo.heads(start)
  1365         heads = repo.heads(start)
  1364     else:
  1366     else:
  1365         if hideinactive:
  1367         if hideinactive:
  1366             _heads = repo.heads(start)
  1368             _heads = repo.heads(start)
  3011     if date:
  3013     if date:
  3012         if rev:
  3014         if rev:
  3013             raise util.Abort(_("you can't specify a revision and a date"))
  3015             raise util.Abort(_("you can't specify a revision and a date"))
  3014         rev = cmdutil.finddate(ui, repo, date)
  3016         rev = cmdutil.finddate(ui, repo, date)
  3015 
  3017 
  3016     if clean:
  3018     if clean or check:
  3017         return hg.clean(repo, rev)
  3019         return hg.clean(repo, rev)
  3018     else:
  3020     else:
  3019         return hg.update(repo, rev)
  3021         return hg.update(repo, rev)
  3020 
  3022 
  3021 def verify(ui, repo):
  3023 def verify(ui, repo):
  3173     "branches":
  3175     "branches":
  3174         (branches,
  3176         (branches,
  3175          [('a', 'active', False,
  3177          [('a', 'active', False,
  3176            _('show only branches that have unmerged heads')),
  3178            _('show only branches that have unmerged heads')),
  3177           ('c', 'closed', False,
  3179           ('c', 'closed', False,
  3178            _('show normal and closed heads'))],
  3180            _('show normal and closed branches'))],
  3179          _('[-a]')),
  3181          _('[-a]')),
  3180     "bundle":
  3182     "bundle":
  3181         (bundle,
  3183         (bundle,
  3182          [('f', 'force', None,
  3184          [('f', 'force', None,
  3183            _('run even when remote repository is unrelated')),
  3185            _('run even when remote repository is unrelated')),
  3290          _('[OPTION]... PATTERN [FILE]...')),
  3292          _('[OPTION]... PATTERN [FILE]...')),
  3291     "heads":
  3293     "heads":
  3292         (heads,
  3294         (heads,
  3293          [('r', 'rev', '', _('show only heads which are descendants of REV')),
  3295          [('r', 'rev', '', _('show only heads which are descendants of REV')),
  3294           ('a', 'active', False,
  3296           ('a', 'active', False,
  3295            _('show only the active heads from open branches')),
  3297            _('show only the active branch heads from open branches')),
  3296           ('c', 'closed', False,
  3298           ('c', 'closed', False,
  3297            _('show normal and closed heads')),
  3299            _('show normal and closed branch heads')),
  3298          ] + templateopts,
  3300          ] + templateopts,
  3299          _('[-r STARTREV] [REV]...')),
  3301          _('[-r STARTREV] [REV]...')),
  3300     "help": (help_, [], _('[TOPIC]')),
  3302     "help": (help_, [], _('[TOPIC]')),
  3301     "identify|id":
  3303     "identify|id":
  3302         (identify,
  3304         (identify,