annotate rhodecode/lib/vcs/utils/hgcompat.py @ 3944:d18500a8840c beta

Patch demandimport.enable because of bug introduced in mercurial 2.5.0. Demand import is always enabled after importing hooks. .Rhodecode doesn't work with it.
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 04 Jun 2013 12:50:46 +0200
parents 3208aaefc9ca
children 42bca6fa923b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2199
31ebf7010566 various fixes for git and mercurial with InMemoryCommit backend and non-ascii files
Marcin Kuzminski <marcin@python-works.com>
parents: 2007
diff changeset
1 """
31ebf7010566 various fixes for git and mercurial with InMemoryCommit backend and non-ascii files
Marcin Kuzminski <marcin@python-works.com>
parents: 2007
diff changeset
2 Mercurial libs compatibility
31ebf7010566 various fixes for git and mercurial with InMemoryCommit backend and non-ascii files
Marcin Kuzminski <marcin@python-works.com>
parents: 2007
diff changeset
3 """
2007
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4
3941
3208aaefc9ca Moved all Mercurial imports into hgcompat from vcs
Marcin Kuzminski <marcin@python-works.com>
parents: 3877
diff changeset
5 import mercurial
3944
d18500a8840c Patch demandimport.enable because of bug introduced
Marcin Kuzminski <marcin@python-works.com>
parents: 3941
diff changeset
6 import mercurial.demandimport
d18500a8840c Patch demandimport.enable because of bug introduced
Marcin Kuzminski <marcin@python-works.com>
parents: 3941
diff changeset
7 ## patch demandimport, due to bug in mercurial when it allways triggers demandimport.enable()
d18500a8840c Patch demandimport.enable because of bug introduced
Marcin Kuzminski <marcin@python-works.com>
parents: 3941
diff changeset
8 mercurial.demandimport.enable = lambda *args, **kwargs: 1
2007
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 from mercurial import archival, merge as hg_merge, patch, ui
3941
3208aaefc9ca Moved all Mercurial imports into hgcompat from vcs
Marcin Kuzminski <marcin@python-works.com>
parents: 3877
diff changeset
10 from mercurial import discovery
3208aaefc9ca Moved all Mercurial imports into hgcompat from vcs
Marcin Kuzminski <marcin@python-works.com>
parents: 3877
diff changeset
11 from mercurial import localrepo
3208aaefc9ca Moved all Mercurial imports into hgcompat from vcs
Marcin Kuzminski <marcin@python-works.com>
parents: 3877
diff changeset
12 from mercurial import scmutil
3208aaefc9ca Moved all Mercurial imports into hgcompat from vcs
Marcin Kuzminski <marcin@python-works.com>
parents: 3877
diff changeset
13 from mercurial import config
2007
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 from mercurial.commands import clone, nullid, pull
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 from mercurial.context import memctx, memfilectx
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 from mercurial.error import RepoError, RepoLookupError, Abort
3941
3208aaefc9ca Moved all Mercurial imports into hgcompat from vcs
Marcin Kuzminski <marcin@python-works.com>
parents: 3877
diff changeset
17 from mercurial.hgweb import hgweb_mod
2007
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 from mercurial.hgweb.common import get_contact
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 from mercurial.localrepo import localrepository
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 from mercurial.match import match
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 from mercurial.mdiff import diffopts
324ac367a4da Added VCS into rhodecode core for faster and easier deployments of new versions
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 from mercurial.node import hex
2207
17ff5693566b white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2199
diff changeset
23 from mercurial.encoding import tolocal
2815
acc05c33cc0c White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2801
diff changeset
24 from mercurial.discovery import findcommonoutgoing
3877
5070c840dc23 Use lower level API from mercurial when doing a pull
Marcin Kuzminski <marcin@python-works.com>
parents: 3797
diff changeset
25 from mercurial.hg import peer
3941
3208aaefc9ca Moved all Mercurial imports into hgcompat from vcs
Marcin Kuzminski <marcin@python-works.com>
parents: 3877
diff changeset
26 from mercurial.httppeer import httppeer
3797
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2815
diff changeset
27 from mercurial.util import url as hg_url
3941
3208aaefc9ca Moved all Mercurial imports into hgcompat from vcs
Marcin Kuzminski <marcin@python-works.com>
parents: 3877
diff changeset
28 from mercurial.scmutil import revrange
3208aaefc9ca Moved all Mercurial imports into hgcompat from vcs
Marcin Kuzminski <marcin@python-works.com>
parents: 3877
diff changeset
29 from mercurial.node import nullrev
3797
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2815
diff changeset
30
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2815
diff changeset
31 # those authnadlers are patched for python 2.6.5 bug an
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2815
diff changeset
32 # infinit looping when given invalid resources
d7488551578e synced vcs with upstream
Marcin Kuzminski <marcin@python-works.com>
parents: 2815
diff changeset
33 from mercurial.url import httpbasicauthhandler, httpdigestauthhandler