Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 22200:b27c3beaaf30
cleanup: avoid local vars shadowing imports
This will mute some pyflakes "import ... shadowed by loop variable" warnings.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Fri, 15 Aug 2014 16:20:47 +0200 |
parents | bde505f47141 |
children | 8dda6f6ff564 |
comparison
equal
deleted
inserted
replaced
22199:b3e51675f98e | 22200:b27c3beaaf30 |
---|---|
8 import struct | 8 import struct |
9 | 9 |
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 |
17 _unpack = struct.unpack | 17 _unpack = struct.unpack |
18 | 18 |
1009 # Here is where we should consider bookmarks, divergent bookmarks, | 1009 # Here is where we should consider bookmarks, divergent bookmarks, |
1010 # foreground changesets (successors), and tip of current branch; | 1010 # foreground changesets (successors), and tip of current branch; |
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: |
1018 raise util.Abort(_("branch %s not found") % wc.branch()) | 1018 raise util.Abort(_("branch %s not found") % wc.branch()) |
1019 | 1019 |