##// END OF EJS Templates
pushkey: do not exchange obsole markers if feature is disabled...
Pierre-Yves David -
r17298:59c14bf5 stable
parent child Browse files
Show More
@@ -1787,15 +1787,16 b' class localrepository(object):'
1787 # should be seen as public
1787 # should be seen as public
1788 phases.advanceboundary(self, phases.public, subset)
1788 phases.advanceboundary(self, phases.public, subset)
1789
1789
1790 self.ui.debug('fetching remote obsolete markers')
1790 if obsolete._enabled:
1791 remoteobs = remote.listkeys('obsolete')
1791 self.ui.debug('fetching remote obsolete markers')
1792 if 'dump0' in remoteobs:
1792 remoteobs = remote.listkeys('obsolete')
1793 if tr is None:
1793 if 'dump0' in remoteobs:
1794 tr = self.transaction(trname)
1794 if tr is None:
1795 for key in sorted(remoteobs, reverse=True):
1795 tr = self.transaction(trname)
1796 if key.startswith('dump'):
1796 for key in sorted(remoteobs, reverse=True):
1797 data = base85.b85decode(remoteobs[key])
1797 if key.startswith('dump'):
1798 self.obsstore.mergemarkers(tr, data)
1798 data = base85.b85decode(remoteobs[key])
1799 self.obsstore.mergemarkers(tr, data)
1799 if tr is not None:
1800 if tr is not None:
1800 tr.close()
1801 tr.close()
1801 finally:
1802 finally:
@@ -1959,7 +1960,7 b' class localrepository(object):'
1959 self.ui.warn(_('updating %s to public failed!\n')
1960 self.ui.warn(_('updating %s to public failed!\n')
1960 % newremotehead)
1961 % newremotehead)
1961 self.ui.debug('try to push obsolete markers to remote\n')
1962 self.ui.debug('try to push obsolete markers to remote\n')
1962 if (self.obsstore and
1963 if (obsolete._enabled and self.obsstore and
1963 'obsolete' in remote.listkeys('namespaces')):
1964 'obsolete' in remote.listkeys('namespaces')):
1964 rslts = []
1965 rslts = []
1965 remotedata = self.listkeys('obsolete')
1966 remotedata = self.listkeys('obsolete')
@@ -55,6 +55,10 b' import struct'
55 from mercurial import util, base85
55 from mercurial import util, base85
56 from i18n import _
56 from i18n import _
57
57
58 # the obsolete feature is not mature enought to be enabled by default.
59 # you have to rely on third party extension extension to enable this.
60 _enabled = False
61
58 _pack = struct.pack
62 _pack = struct.pack
59 _unpack = struct.unpack
63 _unpack = struct.unpack
60
64
@@ -11,6 +11,8 b' def _nslist(repo):'
11 n = {}
11 n = {}
12 for k in _namespaces:
12 for k in _namespaces:
13 n[k] = ""
13 n[k] = ""
14 if not obsolete._enabled:
15 n.pop('obsolete')
14 return n
16 return n
15
17
16 _namespaces = {"namespaces": (lambda *x: False, _nslist),
18 _namespaces = {"namespaces": (lambda *x: False, _nslist),
@@ -40,7 +40,6 b' import bookmark by name'
40 bookmarks
40 bookmarks
41 phases
41 phases
42 namespaces
42 namespaces
43 obsolete
44 $ hg debugpushkey ../a bookmarks
43 $ hg debugpushkey ../a bookmarks
45 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
44 Y 4e3505fd95835d721066b76e75dbb8cc554d7f77
46 X 4e3505fd95835d721066b76e75dbb8cc554d7f77
45 X 4e3505fd95835d721066b76e75dbb8cc554d7f77
@@ -215,7 +214,6 b' hgweb'
215 bookmarks
214 bookmarks
216 phases
215 phases
217 namespaces
216 namespaces
218 obsolete
219 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
217 $ hg debugpushkey http://localhost:$HGPORT/ bookmarks
220 Y 4efff6d98829d9c824c621afd6e3f01865f5439f
218 Y 4efff6d98829d9c824c621afd6e3f01865f5439f
221 foobar 9b140be1080824d768c5a4691a564088eede71f9
219 foobar 9b140be1080824d768c5a4691a564088eede71f9
@@ -198,7 +198,6 b' listkeys hook'
198 listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
198 listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
199 no changes found
199 no changes found
200 listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'}
200 listkeys hook: HG_NAMESPACE=phases HG_VALUES={'cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b': '1', 'publishing': 'True'}
201 listkeys hook: HG_NAMESPACE=obsolete HG_VALUES={}
202 listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
201 listkeys hook: HG_NAMESPACE=bookmarks HG_VALUES={'bar': '0000000000000000000000000000000000000000', 'foo': '0000000000000000000000000000000000000000'}
203 adding remote bookmark bar
202 adding remote bookmark bar
204 importing bookmark bar
203 importing bookmark bar
@@ -105,24 +105,20 b' do not use the proxy if it is in the no '
105 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
105 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
106 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
106 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
107 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
107 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
108 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=obsolete (glob)
109 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
108 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
110 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
109 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
111 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
110 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
112 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
111 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
113 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
112 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
114 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=obsolete (glob)
115 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
113 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
116 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
114 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
117 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
115 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
116 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
119 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
117 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
120 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=obsolete (glob)
121 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
118 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
122 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
119 * - - [*] "GET http://localhost:$HGPORT/?cmd=capabilities HTTP/1.1" - - (glob)
123 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
120 * - - [*] "GET http://localhost:$HGPORT/?cmd=batch HTTP/1.1" - - x-hgarg-1:cmds=heads+%3Bknown+nodes%3D (glob)
124 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
121 * - - [*] "GET http://localhost:$HGPORT/?cmd=getbundle HTTP/1.1" - - x-hgarg-1:common=0000000000000000000000000000000000000000&heads=83180e7845de420a1bb46896fd5fe05294f8d629 (glob)
125 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
122 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=phases (glob)
126 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=obsolete (glob)
127 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
123 * - - [*] "GET http://localhost:$HGPORT/?cmd=listkeys HTTP/1.1" - - x-hgarg-1:namespace=bookmarks (glob)
128
124
@@ -125,7 +125,6 b' clone via pull'
125 adding file changes
125 adding file changes
126 added 1 changesets with 4 changes to 4 files
126 added 1 changesets with 4 changes to 4 files
127 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
127 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
128 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
129 updating to branch default
128 updating to branch default
130 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
129 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
131 $ hg verify -R copy-pull
130 $ hg verify -R copy-pull
@@ -155,7 +154,6 b' pull without cacert'
155 added 1 changesets with 1 changes to 1 files
154 added 1 changesets with 1 changes to 1 files
156 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
155 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
157 changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=https://localhost:$HGPORT/
156 changegroup hook: HG_NODE=5fed3813f7f5e1824344fdc9cf8f63bb662c292d HG_SOURCE=pull HG_URL=https://localhost:$HGPORT/
158 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
159 (run 'hg update' to get a working copy)
157 (run 'hg update' to get a working copy)
160 $ cd ..
158 $ cd ..
161
159
@@ -184,7 +182,6 b' variables in the filename'
184 pulling from https://localhost:$HGPORT/
182 pulling from https://localhost:$HGPORT/
185 searching for changes
183 searching for changes
186 no changes found
184 no changes found
187 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
188
185
189 cacert mismatch
186 cacert mismatch
190
187
@@ -197,7 +194,6 b' cacert mismatch'
197 pulling from https://127.0.0.1:$HGPORT/
194 pulling from https://127.0.0.1:$HGPORT/
198 searching for changes
195 searching for changes
199 no changes found
196 no changes found
200 warning: 127.0.0.1 certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
201 $ hg -R copy-pull pull --config web.cacerts=pub-other.pem
197 $ hg -R copy-pull pull --config web.cacerts=pub-other.pem
202 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
198 abort: error: *:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (glob)
203 [255]
199 [255]
@@ -206,7 +202,6 b' cacert mismatch'
206 pulling from https://localhost:$HGPORT/
202 pulling from https://localhost:$HGPORT/
207 searching for changes
203 searching for changes
208 no changes found
204 no changes found
209 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
210
205
211 Test server cert which isn't valid yet
206 Test server cert which isn't valid yet
212
207
@@ -264,7 +259,6 b' Test unvalidated https through proxy'
264 pulling from https://localhost:$HGPORT/
259 pulling from https://localhost:$HGPORT/
265 searching for changes
260 searching for changes
266 no changes found
261 no changes found
267 warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
268
262
269 Test https with cacert and fingerprint through proxy
263 Test https with cacert and fingerprint through proxy
270
264
@@ -167,7 +167,6 b' test pushkeys and bookmarks'
167 bookmarks
167 bookmarks
168 phases
168 phases
169 namespaces
169 namespaces
170 obsolete
171 $ hg book foo -r 0
170 $ hg book foo -r 0
172 $ hg out -B
171 $ hg out -B
173 comparing with ssh://user@dummy/remote
172 comparing with ssh://user@dummy/remote
General Comments 0
You need to be logged in to leave comments. Login now