Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/localrepo.py @ 17075:28ed1c4511ce
obsolete: exchange obsolete marker over pushkey
For a version of the exchange, all markers are exchange. This won't
scale and we will need a better protocol later.
author | Pierre-Yves.David@ens-lyon.org |
---|---|
date | Thu, 07 Jun 2012 19:21:59 +0200 |
parents | ad0d6c2b3279 |
children | f1b7683f3f95 b090601a80d1 |
comparison
equal
deleted
inserted
replaced
17074:178a2e85d426 | 17075:28ed1c4511ce |
---|---|
2 # | 2 # |
3 # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> | 3 # Copyright 2005-2007 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 | |
8 from node import bin, hex, nullid, nullrev, short | 7 from node import bin, hex, nullid, nullrev, short |
9 from i18n import _ | 8 from i18n import _ |
10 import repo, changegroup, subrepo, discovery, pushkey, obsolete | 9 import repo, changegroup, subrepo, discovery, pushkey, obsolete |
11 import changelog, dirstate, filelog, manifest, context, bookmarks, phases | 10 import changelog, dirstate, filelog, manifest, context, bookmarks, phases |
12 import lock, transaction, store, encoding | 11 import lock, transaction, store, encoding, base85 |
13 import scmutil, util, extensions, hook, error, revset | 12 import scmutil, util, extensions, hook, error, revset |
14 import match as matchmod | 13 import match as matchmod |
15 import merge as mergemod | 14 import merge as mergemod |
16 import tags as tagsmod | 15 import tags as tagsmod |
17 from lock import release | 16 from lock import release |
1672 phases.advanceboundary(self, phases.draft, subset) | 1671 phases.advanceboundary(self, phases.draft, subset) |
1673 else: | 1672 else: |
1674 # Remote is old or publishing all common changesets | 1673 # Remote is old or publishing all common changesets |
1675 # should be seen as public | 1674 # should be seen as public |
1676 phases.advanceboundary(self, phases.public, subset) | 1675 phases.advanceboundary(self, phases.public, subset) |
1676 | |
1677 remoteobs = remote.listkeys('obsolete') | |
1678 if 'dump' in remoteobs: | |
1679 data = base85.b85decode(remoteobs['dump']) | |
1680 self.obsstore.mergemarkers(data) | |
1677 finally: | 1681 finally: |
1678 lock.release() | 1682 lock.release() |
1679 | 1683 |
1680 return result | 1684 return result |
1681 | 1685 |
1812 str(phases.draft), | 1816 str(phases.draft), |
1813 str(phases.public)) | 1817 str(phases.public)) |
1814 if not r: | 1818 if not r: |
1815 self.ui.warn(_('updating %s to public failed!\n') | 1819 self.ui.warn(_('updating %s to public failed!\n') |
1816 % newremotehead) | 1820 % newremotehead) |
1821 if 'obsolete' in self.listkeys('namespaces') and self.obsstore: | |
1822 data = self.obsstore._writemarkers() | |
1823 r = remote.pushkey('obsolete', 'dump', '', | |
1824 base85.b85encode(data)) | |
1825 if not r: | |
1826 self.ui.warn(_('failed to push obsolete markers!\n')) | |
1817 finally: | 1827 finally: |
1818 if lock is not None: | 1828 if lock is not None: |
1819 lock.release() | 1829 lock.release() |
1820 finally: | 1830 finally: |
1821 locallock.release() | 1831 locallock.release() |