Mercurial > hgsubversion
comparison hgsubversion/__init__.py @ 1595:74c5fd9c3e76
hgsubversion: drop some compat code for hg < 3.3
hg 3.3 is very old and also not supported by current hgsubversion. So let's drop
some compat code.
| author | Pulkit Goyal <pulkit@yandex-team.ru> |
|---|---|
| date | Tue, 13 Nov 2018 19:15:59 +0300 |
| parents | 39e2f8f8f205 |
| children | 394007c5efea |
comparison
equal
deleted
inserted
replaced
| 1594:41c6b3e39a03 | 1595:74c5fd9c3e76 |
|---|---|
| 19 | 19 |
| 20 import inspect | 20 import inspect |
| 21 import os | 21 import os |
| 22 | 22 |
| 23 from mercurial import commands | 23 from mercurial import commands |
| 24 try: | 24 from mercurial import exchange |
| 25 from mercurial import exchange | |
| 26 exchange.push # existed in first iteration of this file | |
| 27 except ImportError: | |
| 28 # We only *use* the exchange module in hg 3.2+, so this is safe | |
| 29 pass | |
| 30 from mercurial import error as hgerror | 25 from mercurial import error as hgerror |
| 31 from mercurial import extensions | 26 from mercurial import extensions |
| 32 from mercurial import help | 27 from mercurial import help |
| 33 from mercurial import hg | 28 from mercurial import hg |
| 34 from mercurial import localrepo | 29 from mercurial import localrepo |
| 155 entry = extensions.wrapcommand(rebase.cmdtable, 'rebase', wrappers.rebase) | 150 entry = extensions.wrapcommand(rebase.cmdtable, 'rebase', wrappers.rebase) |
| 156 entry[1].append(('', 'svn', None, 'automatic svn rebase')) | 151 entry[1].append(('', 'svn', None, 'automatic svn rebase')) |
| 157 except: | 152 except: |
| 158 pass | 153 pass |
| 159 | 154 |
| 160 if not hgutil.safehasattr(localrepo.localrepository, 'push'): | 155 extensions.wrapfunction(exchange, 'push', wrappers.exchangepush) |
| 161 # Mercurial >= 3.2 | 156 extensions.wrapfunction(exchange, 'pull', wrappers.exchangepull) |
| 162 extensions.wrapfunction(exchange, 'push', wrappers.exchangepush) | |
| 163 if not hgutil.safehasattr(localrepo.localrepository, 'pull'): | |
| 164 # Mercurial >= 3.2 | |
| 165 extensions.wrapfunction(exchange, 'pull', wrappers.exchangepull) | |
| 166 | 157 |
| 167 helpdir = os.path.join(os.path.dirname(__file__), 'help') | 158 helpdir = os.path.join(os.path.dirname(__file__), 'help') |
| 168 | 159 |
| 169 entries = ( | 160 entries = ( |
| 170 (['subversion'], | 161 (['subversion'], |
