Patchwork [5,of,5] tags: deprecated 'repo.tag'

login
register
mail settings
Submitter Pierre-Yves David
Date March 27, 2017, 4:28 p.m.
Message ID <3ffd0c52c373af0dd3cb.1490632108@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/19759/
State Accepted
Headers show

Comments

Pierre-Yves David - March 27, 2017, 4:28 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
# Date 1490623247 -7200
#      Mon Mar 27 16:00:47 2017 +0200
# Node ID 3ffd0c52c373af0dd3cb8ec758fd295367ed5680
# Parent  e321a0e656e1020b3d8f57143c5ec346e14705e7
# EXP-Topic tags
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 3ffd0c52c373
tags: deprecated 'repo.tag'

All user are gone. We can now celebrate the removal of some extra line from the
'localrepo' class.
Augie Fackler - March 27, 2017, 4:43 p.m.
On Mon, Mar 27, 2017 at 06:28:28PM +0200, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@ens-lyon.org>
> # Date 1490623247 -7200
> #      Mon Mar 27 16:00:47 2017 +0200
> # Node ID 3ffd0c52c373af0dd3cb8ec758fd295367ed5680
> # Parent  e321a0e656e1020b3d8f57143c5ec346e14705e7
> # EXP-Topic tags
> # Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
> #              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r 3ffd0c52c373
> tags: deprecated 'repo.tag'

Nice. Probably some implications for hg-git (maybe?), but a worthy cleanup. Queued.

>
> All user are gone. We can now celebrate the removal of some extra line from the
> 'localrepo' class.
>
> diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
> --- a/mercurial/localrepo.py
> +++ b/mercurial/localrepo.py
> @@ -650,6 +650,7 @@ class localrepository(object):
>          return hook.hook(self.ui, self, name, throw, **args)
>
>      def tag(self, names, node, message, local, user, date, editor=False):
> +        self.ui.deprecwarn("use 'tagsmod.tag' instead of 'repo.tag'", '4.2')
>          tagsmod.tag(self, names, node, message, local, user, date,
>                      editor=editor)
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -650,6 +650,7 @@  class localrepository(object):
         return hook.hook(self.ui, self, name, throw, **args)
 
     def tag(self, names, node, message, local, user, date, editor=False):
+        self.ui.deprecwarn("use 'tagsmod.tag' instead of 'repo.tag'", '4.2')
         tagsmod.tag(self, names, node, message, local, user, date,
                     editor=editor)