hgext3rd/topic/__init__.py
changeset 4232 424b498aac00
parent 4219 a4d5dcc836ab
parent 4231 3eb78bdcdd7c
child 4236 259d57b906a4
equal deleted inserted replaced
4221:db70de7c1698 4232:424b498aac00
   650         if not rmatch or rmatch.group(0) != topic:
   650         if not rmatch or rmatch.group(0) != topic:
   651             helptxt = _("topic names can only consist of alphanumeric, '-'"
   651             helptxt = _("topic names can only consist of alphanumeric, '-'"
   652                         " '_' and '.' characters")
   652                         " '_' and '.' characters")
   653             raise error.Abort(_("invalid topic name: '%s'") % topic, hint=helptxt)
   653             raise error.Abort(_("invalid topic name: '%s'") % topic, hint=helptxt)
   654 
   654 
   655     ui.pager('topics')
       
   656 
       
   657     if list:
   655     if list:
       
   656         ui.pager('topics')
   658         if clear or rev:
   657         if clear or rev:
   659             raise error.Abort(_("cannot use --clear or --rev with --list"))
   658             raise error.Abort(_("cannot use --clear or --rev with --list"))
   660         if not topic:
   659         if not topic:
   661             topic = repo.currenttopic
   660             topic = repo.currenttopic
   662         if not topic:
   661         if not topic:
   698     if topic:
   697     if topic:
   699         if not ct:
   698         if not ct:
   700             ui.status(_('marked working directory as topic: %s\n') % topic)
   699             ui.status(_('marked working directory as topic: %s\n') % topic)
   701         return _changecurrenttopic(repo, topic)
   700         return _changecurrenttopic(repo, topic)
   702 
   701 
       
   702     ui.pager('topics')
   703     # `hg topic --current`
   703     # `hg topic --current`
   704     ret = 0
   704     ret = 0
   705     if current and not ct:
   705     if current and not ct:
   706         ui.write_err(_('no active topic\n'))
   706         ui.write_err(_('no active topic\n'))
   707         ret = 1
   707         ret = 1