Mercurial > hg-git
comparison hggit/__init__.py @ 1137:633796ad1684
compat: drop hg < 1.4 compat code (!!)
author | Kevin Bullock <kbullock@ringworld.org> |
---|---|
date | Wed, 07 Feb 2018 22:08:14 -0600 |
parents | c4703246f350 |
children | c693541ee210 |
comparison
equal
deleted
inserted
replaced
1136:7fd9ee0f7b66 | 1137:633796ad1684 |
---|---|
213 def safebranchrevs(orig, lrepo, repo, branches, revs): | 213 def safebranchrevs(orig, lrepo, repo, branches, revs): |
214 revs, co = orig(lrepo, repo, branches, revs) | 214 revs, co = orig(lrepo, repo, branches, revs) |
215 if hgutil.safehasattr(lrepo, 'changelog') and co not in lrepo.changelog: | 215 if hgutil.safehasattr(lrepo, 'changelog') and co not in lrepo.changelog: |
216 co = None | 216 co = None |
217 return revs, co | 217 return revs, co |
218 | 218 extensions.wrapfunction(hg, 'addbranchrevs', safebranchrevs) |
219 | |
220 # COMPAT: hg 1.4 - this is no longer needed | |
221 if getattr(hg, 'addbranchrevs', False): | |
222 extensions.wrapfunction(hg, 'addbranchrevs', safebranchrevs) | |
223 | 219 |
224 | 220 |
225 def extsetup(ui): | 221 def extsetup(ui): |
226 templatekw.keywords.update({'gitnode': gitnodekw}) | 222 templatekw.keywords.update({'gitnode': gitnodekw}) |
227 revset.symbols.update({ | 223 revset.symbols.update({ |