##// END OF EJS Templates
cleanup: avoid local vars shadowing imports...
Mads Kiilerich -
r22200:b27c3bea default
parent child Browse files
Show More
@@ -392,5 +392,5 b' class hgweb(object):'
392 }
392 }
393
393
394 def check_perm(self, req, op):
394 def check_perm(self, req, op):
395 for hook in permhooks:
395 for permhook in permhooks:
396 hook(self, req, op)
396 permhook(self, req, op)
@@ -10,7 +10,7 b' import struct'
10 from node import nullid, nullrev, hex, bin
10 from node import nullid, nullrev, hex, bin
11 from i18n import _
11 from i18n import _
12 from mercurial import obsolete
12 from mercurial import obsolete
13 import error, util, filemerge, copies, subrepo, worker, dicthelpers
13 import error as errormod, util, filemerge, copies, subrepo, worker, dicthelpers
14 import errno, os, shutil
14 import errno, os, shutil
15
15
16 _pack = struct.pack
16 _pack = struct.pack
@@ -1011,7 +1011,7 b' def update(repo, node, branchmerge, forc'
1011 # but currently we are only checking the branch tips.
1011 # but currently we are only checking the branch tips.
1012 try:
1012 try:
1013 node = repo.branchtip(wc.branch())
1013 node = repo.branchtip(wc.branch())
1014 except error.RepoLookupError:
1014 except errormod.RepoLookupError:
1015 if wc.branch() == "default": # no default branch!
1015 if wc.branch() == "default": # no default branch!
1016 node = repo.lookup("tip") # update to tip
1016 node = repo.lookup("tip") # update to tip
1017 else:
1017 else:
@@ -748,8 +748,8 b' def _computeobsoleteset(repo):'
748 obs = set()
748 obs = set()
749 getrev = repo.changelog.nodemap.get
749 getrev = repo.changelog.nodemap.get
750 getphase = repo._phasecache.phase
750 getphase = repo._phasecache.phase
751 for node in repo.obsstore.successors:
751 for n in repo.obsstore.successors:
752 rev = getrev(node)
752 rev = getrev(n)
753 if rev is not None and getphase(repo, rev):
753 if rev is not None and getphase(repo, rev):
754 obs.add(rev)
754 obs.add(rev)
755 return obs
755 return obs
@@ -71,7 +71,7 b''
71 # - put blocks whose nodes come all from p2 first
71 # - put blocks whose nodes come all from p2 first
72 # - write the tag blocks in the sorted order
72 # - write the tag blocks in the sorted order
73
73
74 import tags
74 import tags as tagsmod
75 import util
75 import util
76 from node import nullid, hex
76 from node import nullid, hex
77 from i18n import _
77 from i18n import _
@@ -85,8 +85,8 b' def readtagsformerge(ui, repo, lines, fn'
85 with each tag. Rhis is done because only the line numbers of the first
85 with each tag. Rhis is done because only the line numbers of the first
86 parent are useful for merging
86 parent are useful for merging
87 '''
87 '''
88 filetags = tags._readtaghist(ui, repo, lines, fn=fn, recode=None,
88 filetags = tagsmod._readtaghist(ui, repo, lines, fn=fn, recode=None,
89 calcnodelines=True)[1]
89 calcnodelines=True)[1]
90 for tagname, taginfo in filetags.items():
90 for tagname, taginfo in filetags.items():
91 if not keeplinenums:
91 if not keeplinenums:
92 for el in taginfo:
92 for el in taginfo:
General Comments 0
You need to be logged in to leave comments. Login now