diff options
author | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2012-09-27 14:30:31 +0100 |
---|---|---|
committer | Daniel Silverstone <daniel.silverstone@codethink.co.uk> | 2012-09-27 14:30:31 +0100 |
commit | 4b0aa73b8c69bd5b7521337809f7bc4714209a5a (patch) | |
tree | 75f4c36771caf222280249cd1ed611d5ade8bd48 /hgext/share.py | |
parent | 59a96880b5d035db83067acda8345497c75d7716 (diff) | |
parent | 921ced43c48c1d170452a7b251b94cc96ec8dd44 (diff) | |
download | mercurial-tarball-4b0aa73b8c69bd5b7521337809f7bc4714209a5a.tar.gz |
Merge remote-tracking branch 'origin/master' into baserock/morphbaserock/morph
This changes us to 1.9.3 which might stand a better chance of being
usable by Lorry.
We also undo the setup.py change because python now supports bz2
Diffstat (limited to 'hgext/share.py')
-rw-r--r-- | hgext/share.py | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/hgext/share.py b/hgext/share.py index fb11921..cc33148 100644 --- a/hgext/share.py +++ b/hgext/share.py @@ -6,9 +6,7 @@ '''share a common history between several working directories''' from mercurial.i18n import _ -from mercurial import hg, commands, util - -testedwith = 'internal' +from mercurial import hg, commands def share(ui, source, dest=None, noupdate=False): """create a new shared repository @@ -30,46 +28,11 @@ def share(ui, source, dest=None, noupdate=False): return hg.share(ui, source, dest, not noupdate) -def unshare(ui, repo): - """convert a shared repository to a normal one - - Copy the store data to the repo and remove the sharedpath data. - """ - - if repo.sharedpath == repo.path: - raise util.Abort(_("this is not a shared repo")) - - destlock = lock = None - lock = repo.lock() - try: - # we use locks here because if we race with commit, we - # can end up with extra data in the cloned revlogs that's - # not pointed to by changesets, thus causing verify to - # fail - - destlock = hg.copystore(ui, repo, repo.path) - - sharefile = repo.join('sharedpath') - util.rename(sharefile, sharefile + '.old') - - repo.requirements.discard('sharedpath') - repo._writerequirements() - finally: - destlock and destlock.release() - lock and lock.release() - - # update store, spath, sopener and sjoin of repo - repo.__init__(ui, repo.root) - cmdtable = { "share": (share, [('U', 'noupdate', None, _('do not create a working copy'))], _('[-U] SOURCE [DEST]')), - "unshare": - (unshare, - [], - ''), } commands.norepo += " share" |