##// END OF EJS Templates
global: mass rewrite to use modern exception syntax...
global: mass rewrite to use modern exception syntax Python 2.6 introduced the "except type as instance" syntax, replacing the "except type, instance" syntax that came before. Python 3 dropped support for the latter syntax. Since we no longer support Python 2.4 or 2.5, we have no need to continue supporting the "except type, instance". This patch mass rewrites the exception syntax to be Python 2.6+ and Python 3 compatible. This patch was produced by running `2to3 -f except -w -n .`.

File last commit:

r16939:fa91ddfc default
r25660:328739ea default
Show More
test-trusted.py.out
179 lines | 4.1 KiB | text/plain | TextLexer
/ tests / test-trusted.py.out
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 # same user, same group
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# same user, different group
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# different user, same group
Martin Geisler
ui: lowercase "not trusting file" warning message
r16939 not trusting file .hg/hgrc from untrusted user abc, group bar
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# different user, same group, but we trust the group
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# different user, different group
Martin Geisler
ui: lowercase "not trusting file" warning message
r16939 not trusting file .hg/hgrc from untrusted user abc, group def
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# different user, different group, but we trust the user
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# different user, different group, but we trust the group
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# different user, different group, but we trust the user and the group
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# we trust all users
# different user, different group
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# we trust all groups
# different user, different group
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# we trust all users and groups
# different user, different group
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# we don't get confused by users and groups with the same name
# different user, different group
Martin Geisler
ui: lowercase "not trusting file" warning message
r16939 not trusting file .hg/hgrc from untrusted user abc, group def
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# list of user names
# different user, different group, but we trust the user
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# list of group names
# different user, different group, but we trust the group
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
# Can't figure out the name of the user running this process
# different user, different group
Martin Geisler
ui: lowercase "not trusting file" warning message
r16939 not trusting file .hg/hgrc from untrusted user abc, group def
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551 global = /some/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 untrusted
. . global = /some/path
. . local = /another/path
Alexis S. L. Carvalho
Only read .hg/hgrc files from trusted users/groups...
r3551
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 # prints debug warnings
# different user, different group
Martin Geisler
ui: lowercase "not trusting file" warning message
r16939 not trusting file .hg/hgrc from untrusted user abc, group def
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted
Matt Mackall
ui: report_untrusted fixes...
r8204 ignoring untrusted configuration option paths.local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 global = /some/path
untrusted
. . global = /some/path
Matt Mackall
ui: report_untrusted fixes...
r8204 .ignoring untrusted configuration option paths.local = /another/path
. local = /another/path
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552
Ry4an Brase
ui: always report untrusted hgrc files when debug enabled...
r13493 # report_untrusted enabled without debug hides warnings
# different user, different group
trusted
global = /some/path
untrusted
. . global = /some/path
. . local = /another/path
# report_untrusted enabled with debug shows warnings
# different user, different group
Martin Geisler
ui: lowercase "not trusting file" warning message
r16939 not trusting file .hg/hgrc from untrusted user abc, group def
Ry4an Brase
ui: always report untrusted hgrc files when debug enabled...
r13493 trusted
ignoring untrusted configuration option paths.local = /another/path
global = /some/path
untrusted
. . global = /some/path
.ignoring untrusted configuration option paths.local = /another/path
. local = /another/path
Matt Mackall
ui: fold readsections into readconfig...
r8142 # ui.readconfig sections
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 quux
# read trusted, untrusted, new ui, trusted
Martin Geisler
ui: lowercase "not trusting file" warning message
r16939 not trusting file foobar from untrusted user abc, group def
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 trusted:
Matt Mackall
ui: report_untrusted fixes...
r8204 ignoring untrusted configuration option foobar.baz = quux
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 None
untrusted:
quux
# error handling
# file doesn't exist
# same user, same group
# different user, different group
# parse error
# different user, different group
Martin Geisler
ui: lowercase "not trusting file" warning message
r16939 not trusting file .hg/hgrc from untrusted user abc, group def
Matt Mackall
error: update test-trusted.py
r11291 ('foo', '.hg/hgrc:1')
Alexis S. L. Carvalho
save settings from untrusted config files in a separate configparser...
r3552 # same user, same group
Matt Mackall
error: update test-trusted.py
r11291 ('foo', '.hg/hgrc:1')