mozext: remove `hg mybookmarks` (Bug 1569734) r=smacleod
authorConnor Sheehan <sheehan@mozilla.com>
Wed, 31 Jul 2019 21:08:51 +0000
changeset 7138 3e1c648aeb62d5d9bcb7be870e3fb83a46658687
parent 7137 28b74bc3450b49158fc18fbc3ef4790cd7387fa2
child 7139 e8bf67866f28265ada769fa62edd61faa9a9e19e
push id3551
push usercosheehan@mozilla.com
push dateWed, 31 Jul 2019 21:22:35 +0000
treeherderversion-control-tools@5e857d4f3091 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmacleod
bugs1569734
mozext: remove `hg mybookmarks` (Bug 1569734) r=smacleod Usually the bookmarks in a repo are either the users own, or references to the various tree heads (central, inbound, etc). If the user is using `firefoxtree`, they won't see the fxheads bookmarks in `hg bookmarks` or `hg show bookmarks` output. So this solution is older and can be removed. Differential Revision: https://phabricator.services.mozilla.com/D39957
hgext/mozext/__init__.py
--- a/hgext/mozext/__init__.py
+++ b/hgext/mozext/__init__.py
@@ -653,42 +653,16 @@ def buginfo(ui, repo, *bugs, **opts):
     # and easy.
     contexts = sorted([repo[node] for node in nodes], key=methodcaller('rev'))
 
     for ctx in contexts:
         print_changeset_pushes(ui, repo, ctx.rev(), all=opts['all'])
         ui.write('\n')
 
 
-@command('mybookmarks', [], _('hg mybookmarks'))
-def mybookmarks(ui, repo):
-    """Show bookmarks that belong to me.
-
-    A common developer workflow involves creating bookmarks to track
-    feature work. A busy repository may have bookmarks belonging to many
-    people. This command provides a mechanism to easily query for bookmarks
-    belonging to you.
-
-    A bookmark belonging to you is one whose name begins with your configured
-    IRC nick or has you as the author of the bookmark's changeset.
-    """
-    nick = get_ircnick(ui)
-    prefix = '%s/' % nick
-    me = ui.config('ui', 'username')
-
-    for bookmark, node in sorted(repo._bookmarks.items()):
-        user = repo[node].user()
-
-        if user != me and not bookmark.startswith(prefix):
-            continue
-
-        ui.write('%-50s %d:%s\n' % (
-            bookmark, repo[node].rev(), short(node)))
-
-
 def reject_repo_names_hook(ui, repo, namespace=None, key=None, old=None,
         new=None, **kwargs):
     """prepushkey hook that prevents changes to reserved names.
 
     Names that begin with the name of a repository identifier are rejected.
     """
     if key.lower().startswith(tuple(REPOS.keys())):
         ui.warn('You are not allowed to push tags or bookmarks that share '