diff --git a/HISTORY.txt b/HISTORY.txt index fc144a88e9049ac6e5f9d359ccbe834c2ed53901_SElTVE9SWS50eHQ=..0b5287519bcafc0d9bb00536f923f32debe4c89d_SElTVE9SWS50eHQ= 100644 --- a/HISTORY.txt +++ b/HISTORY.txt @@ -1,3 +1,3 @@ -1.3.4 +1.3.5 ~~~~~~~~~~~~~ @@ -2,6 +2,6 @@ ~~~~~~~~~~~~~ -Tested with hg 4.5 and 4.6 +Tested with hg 4.5 and 4.6, small 4.6-related fixes (error handling) 1.3.3 ~~~~~~~~~~~~~ diff --git a/mercurial_path_pattern.py b/mercurial_path_pattern.py index fc144a88e9049ac6e5f9d359ccbe834c2ed53901_bWVyY3VyaWFsX3BhdGhfcGF0dGVybi5weQ==..0b5287519bcafc0d9bb00536f923f32debe4c89d_bWVyY3VyaWFsX3BhdGhfcGF0dGVybi5weQ== 100644 --- a/mercurial_path_pattern.py +++ b/mercurial_path_pattern.py @@ -68,7 +68,7 @@ http://bitbucket.org/Mekk/mercurial-path_pattern/ """ -from mercurial import commands, util +from mercurial import commands, util, error from mercurial.i18n import _ import os import sys @@ -93,7 +93,7 @@ try: import mercurial_extension_utils except ImportError: - raise util.Abort(_("""Can not import mercurial_extension_utils. + raise error.Abort(_("""Can not import mercurial_extension_utils. Please install this module in Python path. See Installation chapter in https://bitbucket.org/Mekk/mercurial-dynamic_username/ for details (and for info about TortoiseHG on Windows, or other bundled Python).""")) @@ -347,6 +347,6 @@ known_paths.append(key) # Failing helpfully if known_paths: - raise util.Abort(_("Unknown alias: %s. Defined path aliases: %s") % ( + raise error.Abort(_("Unknown alias: %s. Defined path aliases: %s") % ( path_alias, ", ".join(known_paths))) else: @@ -351,6 +351,6 @@ path_alias, ", ".join(known_paths))) else: - raise util.Abort(_("Uknown alias: %s. No paths defined, consider creating some paths or path_patterns") % path_alias) + raise error.Abort(_("Uknown alias: %s. No paths defined, consider creating some paths or path_patterns") % path_alias) ############################################################ # Extension setup diff --git a/tests/basic.t b/tests/basic.t index fc144a88e9049ac6e5f9d359ccbe834c2ed53901_dGVzdHMvYmFzaWMudA==..0b5287519bcafc0d9bb00536f923f32debe4c89d_dGVzdHMvYmFzaWMudA== 100644 --- a/tests/basic.t +++ b/tests/basic.t @@ -171,3 +171,8 @@ local: /tmp/cramtests-*/basic.t/work/tree1/{repo} (glob) remote: /tmp/cramtests-*/basic.t/work/sub/tree2/{repo} (glob) +Error reactions + + $ hg --cwd $T1/bbb/sub_b/repo_b3 cloneto niematakiegorepo + abort: Unknown alias: niematakiegorepo. Defined path aliases: flat, symm + [255] \ No newline at end of file