Return-Path: X-Original-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-allura-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 923F7F7FD for ; Tue, 7 May 2013 22:27:40 +0000 (UTC) Received: (qmail 48657 invoked by uid 500); 7 May 2013 22:27:40 -0000 Delivered-To: apmail-incubator-allura-commits-archive@incubator.apache.org Received: (qmail 48630 invoked by uid 500); 7 May 2013 22:27:40 -0000 Mailing-List: contact allura-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: allura-dev@incubator.apache.org Delivered-To: mailing list allura-commits@incubator.apache.org Received: (qmail 48612 invoked by uid 99); 7 May 2013 22:27:40 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 May 2013 22:27:40 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 436E3889037; Tue, 7 May 2013 22:27:40 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tvansteenburgh@apache.org To: allura-commits@incubator.apache.org Date: Tue, 07 May 2013 22:27:45 -0000 Message-Id: <1e8b999033ab4c83831f01677a8fe862@git.apache.org> In-Reply-To: <0f4136990d7349e581c3d2581c5ca1c6@git.apache.org> References: <0f4136990d7349e581c3d2581c5ca1c6@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [07/50] [abbrv] git commit: [#6179] don't change 'shortname' var [#6179] don't change 'shortname' var Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/3d3f1997 Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/3d3f1997 Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/3d3f1997 Branch: refs/heads/tv/3854 Commit: 3d3f199782450d1c497a8146528dfe17b2f8c62f Parents: f746109 Author: Dave Brondsema Authored: Tue Apr 30 18:30:58 2013 +0000 Committer: Dave Brondsema Committed: Tue Apr 30 18:30:58 2013 +0000 ---------------------------------------------------------------------- Allura/allura/lib/plugin.py | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/3d3f1997/Allura/allura/lib/plugin.py ---------------------------------------------------------------------- diff --git a/Allura/allura/lib/plugin.py b/Allura/allura/lib/plugin.py index 02aae3a..3bb1655 100644 --- a/Allura/allura/lib/plugin.py +++ b/Allura/allura/lib/plugin.py @@ -465,8 +465,10 @@ class ProjectRegistrationProvider(object): self.rate_limit(user, neighborhood) if user_project and shortname.startswith('u/'): - shortname = shortname.replace('u/', '', 1) - if not h.re_project_name.match(shortname): + check_shortname = shortname.replace('u/', '', 1) + else: + check_shortname = shortname + if not h.re_project_name.match(check_shortname): raise ValueError('Invalid project shortname: %s' % shortname) p = M.Project.query.get(shortname=shortname, neighborhood_id=neighborhood._id)