Show More
@@ -5501,7 +5501,10 b' def tag(ui, repo, name1, *names, **opts)' | |||||
5501 |
|
5501 | |||
5502 | Returns 0 on success. |
|
5502 | Returns 0 on success. | |
5503 | """ |
|
5503 | """ | |
5504 |
|
5504 | wlock = lock = None | ||
|
5505 | try: | |||
|
5506 | wlock = repo.wlock() | |||
|
5507 | lock = repo.lock() | |||
5505 | rev_ = "." |
|
5508 | rev_ = "." | |
5506 | names = [t.strip() for t in (name1,) + names] |
|
5509 | names = [t.strip() for t in (name1,) + names] | |
5507 | if len(names) != len(set(names)): |
|
5510 | if len(names) != len(set(names)): | |
@@ -5510,7 +5513,8 b' def tag(ui, repo, name1, *names, **opts)' | |||||
5510 | if n in ['tip', '.', 'null']: |
|
5513 | if n in ['tip', '.', 'null']: | |
5511 | raise util.Abort(_("the name '%s' is reserved") % n) |
|
5514 | raise util.Abort(_("the name '%s' is reserved") % n) | |
5512 | if not n: |
|
5515 | if not n: | |
5513 |
raise util.Abort(_('tag names cannot consist entirely of |
|
5516 | raise util.Abort(_('tag names cannot consist entirely of ' | |
|
5517 | 'whitespace')) | |||
5514 | if opts.get('rev') and opts.get('remove'): |
|
5518 | if opts.get('rev') and opts.get('remove'): | |
5515 | raise util.Abort(_("--rev and --remove are incompatible")) |
|
5519 | raise util.Abort(_("--rev and --remove are incompatible")) | |
5516 | if opts.get('rev'): |
|
5520 | if opts.get('rev'): | |
@@ -5557,6 +5561,8 b' def tag(ui, repo, name1, *names, **opts)' | |||||
5557 | message = ui.edit(message, ui.username()) |
|
5561 | message = ui.edit(message, ui.username()) | |
5558 |
|
5562 | |||
5559 | repo.tag(names, r, message, opts.get('local'), opts.get('user'), date) |
|
5563 | repo.tag(names, r, message, opts.get('local'), opts.get('user'), date) | |
|
5564 | finally: | |||
|
5565 | release(lock, wlock) | |||
5560 |
|
5566 | |||
5561 | @command('tags', [], '') |
|
5567 | @command('tags', [], '') | |
5562 | def tags(ui, repo): |
|
5568 | def tags(ui, repo): |
@@ -320,9 +320,6 b'' | |||||
320 | > except: |
|
320 | > except: | |
321 | warning: naked except clause |
|
321 | warning: naked except clause | |
322 | mercurial/commands.py:0: |
|
322 | mercurial/commands.py:0: | |
323 | > raise util.Abort(_('tag names cannot consist entirely of whitespace')) |
|
|||
324 | warning: line over 80 characters |
|
|||
325 | mercurial/commands.py:0: |
|
|||
326 | > ui.status(_("(run 'hg heads .' to see heads, 'hg merge' to merge)\n")) |
|
323 | > ui.status(_("(run 'hg heads .' to see heads, 'hg merge' to merge)\n")) | |
327 | warning: line over 80 characters |
|
324 | warning: line over 80 characters | |
328 | mercurial/commands.py:0: |
|
325 | mercurial/commands.py:0: |
General Comments 0
You need to be logged in to leave comments.
Login now