Show More
@@ -1832,7 +1832,14 b' def debugpushkey(ui, repopath, namespace' | |||
|
1832 | 1832 | target = hg.peer(ui, {}, repopath) |
|
1833 | 1833 | if keyinfo: |
|
1834 | 1834 | key, old, new = keyinfo |
|
1835 | r = target.pushkey(namespace, key, old, new) | |
|
1835 | with target.commandexecutor() as e: | |
|
1836 | r = e.callcommand('pushkey', { | |
|
1837 | 'namespace': namespace, | |
|
1838 | 'key': key, | |
|
1839 | 'old': old, | |
|
1840 | 'new': new, | |
|
1841 | }).result() | |
|
1842 | ||
|
1836 | 1843 | ui.status(pycompat.bytestr(r) + '\n') |
|
1837 | 1844 | return not r |
|
1838 | 1845 | else: |
@@ -1212,10 +1212,14 b' def _pushsyncphase(pushop):' | |||
|
1212 | 1212 | outdated = [c for c in outdated if c.node() not in pheads] |
|
1213 | 1213 | # fallback to independent pushkey command |
|
1214 | 1214 | for newremotehead in outdated: |
|
1215 |
|
|
|
1216 | newremotehead.hex(), | |
|
1217 | ('%d' % phases.draft), | |
|
1218 | ('%d' % phases.public)) | |
|
1215 | with pushop.remote.commandexecutor() as e: | |
|
1216 | r = e.callcommand('pushkey', { | |
|
1217 | 'namespace': 'phases', | |
|
1218 | 'key': newremotehead.hex(), | |
|
1219 | 'old': '%d' % phases.draft, | |
|
1220 | 'new': '%d' % phases.public | |
|
1221 | }).result() | |
|
1222 | ||
|
1219 | 1223 | if not r: |
|
1220 | 1224 | pushop.ui.warn(_('updating %s to public failed!\n') |
|
1221 | 1225 | % newremotehead) |
@@ -1270,7 +1274,16 b' def _pushbookmark(pushop):' | |||
|
1270 | 1274 | action = 'export' |
|
1271 | 1275 | elif not new: |
|
1272 | 1276 | action = 'delete' |
|
1273 | if remote.pushkey('bookmarks', b, old, new): | |
|
1277 | ||
|
1278 | with remote.commandexecutor() as e: | |
|
1279 | r = e.callcommand('pushkey', { | |
|
1280 | 'namespace': 'bookmarks', | |
|
1281 | 'key': b, | |
|
1282 | 'old': old, | |
|
1283 | 'new': new, | |
|
1284 | }).result() | |
|
1285 | ||
|
1286 | if r: | |
|
1274 | 1287 | ui.status(bookmsgmap[action][0] % b) |
|
1275 | 1288 | else: |
|
1276 | 1289 | ui.warn(bookmsgmap[action][1] % b) |
General Comments 0
You need to be logged in to leave comments.
Login now