[PATCH] Fixing the treatment of reposubs (according to what happens for usersubs.

Massimo Santini santini at dsi.unimi.it
Sun Feb 5 14:59:56 UTC 2012


hgext.nofity: striping spaces after splitting on ',' the config value (related to issue2603)

When reading the configuration values for reposubs and usersubs split is performed, but then strip is only applied to parts for the usersubs; this causes a difference in behavior that can confuse the user.

# HG changeset patch
# User Massimo Santini <santini at dsi.unimi.it>
# Date 1328452205 -3600
# Node ID 45111f1cf4bc23aa2a576dccce1773ac0e044feb
# Parent  8af9e08a094ff43f828085e1102b320995e0c1b2
Adding strip to repo path in reposub processing

diff -r 8af9e08a094f -r 45111f1cf4bc hgext/notify.py
--- a/hgext/notify.py	Fri Feb 03 15:45:13 2012 -0600
+++ b/hgext/notify.py	Sun Feb 05 15:30:05 2012 +0100
@@ -214,7 +214,7 @@
                 if fnmatch.fnmatch(self.repo.root, pat.strip()):
                     subs.add(self.fixmail(user))
         for pat, users in self.ui.configitems('reposubs'):
-            if fnmatch.fnmatch(self.repo.root, pat):
+            if fnmatch.fnmatch(self.repo.root, pat.strip()):
                 for user in users.split(','):
                     subs.add(self.fixmail(user))
         return [mail.addressencode(self.ui, s, self.charsets, self.test)







More information about the Mercurial-devel mailing list