mercurial/commands.py
changeset 4593 2937d0dbfab0
parent 4592 5243cece3d97
child 4601 e69da61e467e
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1522,7 +1522,7 @@ def import_(ui, repo, patch1, *patches, 
                         repo.dirstate.setparents(p1, p2)
                 except hg.RepoError:
                     pass
-            if opts.get('exact') or opts.get('import-branch'):
+            if opts.get('exact') or opts.get('import_branch'):
                 repo.dirstate.setbranch(branch or 'default')
 
             files = {}