mercurial/commands.py
changeset 15580 5a7733563c2e
parent 15578 db0e277bdd37
child 15585 a348739da8f0
equal deleted inserted replaced
15578:db0e277bdd37 15580:5a7733563c2e
  3261      _('identify the specified revision'), _('REV')),
  3261      _('identify the specified revision'), _('REV')),
  3262     ('n', 'num', None, _('show local revision number')),
  3262     ('n', 'num', None, _('show local revision number')),
  3263     ('i', 'id', None, _('show global revision id')),
  3263     ('i', 'id', None, _('show global revision id')),
  3264     ('b', 'branch', None, _('show branch')),
  3264     ('b', 'branch', None, _('show branch')),
  3265     ('t', 'tags', None, _('show tags')),
  3265     ('t', 'tags', None, _('show tags')),
  3266     ('B', 'bookmarks', None, _('show bookmarks'))],
  3266     ('B', 'bookmarks', None, _('show bookmarks')),
       
  3267     ] + remoteopts,
  3267     _('[-nibtB] [-r REV] [SOURCE]'))
  3268     _('[-nibtB] [-r REV] [SOURCE]'))
  3268 def identify(ui, repo, source=None, rev=None,
  3269 def identify(ui, repo, source=None, rev=None,
  3269              num=None, id=None, branch=None, tags=None, bookmarks=None):
  3270              num=None, id=None, branch=None, tags=None, bookmarks=None, **opts):
  3270     """identify the working copy or specified revision
  3271     """identify the working copy or specified revision
  3271 
  3272 
  3272     Print a summary identifying the repository state at REV using one or
  3273     Print a summary identifying the repository state at REV using one or
  3273     two parent hash identifiers, followed by a "+" if the working
  3274     two parent hash identifiers, followed by a "+" if the working
  3274     directory has uncommitted changes, the branch name (if not default),
  3275     directory has uncommitted changes, the branch name (if not default),
  3308     output = []
  3309     output = []
  3309     revs = []
  3310     revs = []
  3310 
  3311 
  3311     if source:
  3312     if source:
  3312         source, branches = hg.parseurl(ui.expandpath(source))
  3313         source, branches = hg.parseurl(ui.expandpath(source))
  3313         repo = hg.peer(ui, {}, source)
  3314         repo = hg.peer(ui, opts, source)
  3314         revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
  3315         revs, checkout = hg.addbranchrevs(repo, repo, branches, None)
  3315 
  3316 
  3316     if not repo.local():
  3317     if not repo.local():
  3317         if num or branch or tags:
  3318         if num or branch or tags:
  3318             raise util.Abort(
  3319             raise util.Abort(