Mercurial > hg-stable
comparison mercurial/pushkey.py @ 15648:79cc89de5be1
phases: add basic pushkey support
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Thu, 15 Dec 2011 11:24:26 +0100 |
parents | 689bf32b3bbd |
children | 28ed1c4511ce |
comparison
equal
deleted
inserted
replaced
15647:ce193147f492 | 15648:79cc89de5be1 |
---|---|
3 # Copyright 2010 Matt Mackall <mpm@selenic.com> | 3 # Copyright 2010 Matt Mackall <mpm@selenic.com> |
4 # | 4 # |
5 # This software may be used and distributed according to the terms of the | 5 # This software may be used and distributed according to the terms of the |
6 # GNU General Public License version 2 or any later version. | 6 # GNU General Public License version 2 or any later version. |
7 | 7 |
8 import bookmarks | 8 import bookmarks, phases |
9 | 9 |
10 def _nslist(repo): | 10 def _nslist(repo): |
11 n = {} | 11 n = {} |
12 for k in _namespaces: | 12 for k in _namespaces: |
13 n[k] = "" | 13 n[k] = "" |
14 return n | 14 return n |
15 | 15 |
16 _namespaces = {"namespaces": (lambda *x: False, _nslist), | 16 _namespaces = {"namespaces": (lambda *x: False, _nslist), |
17 "bookmarks": (bookmarks.pushbookmark, bookmarks.listbookmarks)} | 17 "bookmarks": (bookmarks.pushbookmark, bookmarks.listbookmarks), |
18 "phases": (phases.pushphase, phases.listphases), | |
19 } | |
18 | 20 |
19 def register(namespace, pushkey, listkeys): | 21 def register(namespace, pushkey, listkeys): |
20 _namespaces[namespace] = (pushkey, listkeys) | 22 _namespaces[namespace] = (pushkey, listkeys) |
21 | 23 |
22 def _get(namespace): | 24 def _get(namespace): |