Hi Kristis,
I found out the following:
If the valid_product_name is disabled, then the hook scripts still try
to match the regular expression to get a product name.
Have a look at the following example:
There is a slight difference compared to what I described in the
previous mail.
The regular expression in my previous mail was '([^/]+/[^/]+?)/'.
This example uses this one: '(.+?)/(?:trunk|tags|branches)/'.
Let's say I want to add ProjectY to CustomerA (see previous mail).
I created a folder containing a trunk, tags and branches folder. These
are not available yet in the repo.
mkdir -p ~/workspaces/ProjectY/trunk
mkdir -p ~/workspaces/ProjectY/tags
mkdir -p ~/workspaces/ProjectY/branches
Now when I want to import the contents of the folder to a not existing
folder in the repo using 'svn import':
cd ~/workspaces/ProjectY
svn import http://servername/somerepo/CustomerA/ProjectY \
-m "bug 234: add new project Y for customer A."
This fails because in the regular expression 'trunk', 'tags' or
'branches'.
Anyway, when I disable valid_product_name, I would expect no matching
problems. However, it seems that matching the regular expression is done
anyhow. This issue maybe located in Activity.pm where some checking is
done on the availability of product names, since the error I got was:
*******************************************
**
**
** Scmbug error 40: Unable to autodetect product name for filename
'CustomerA/ProjectY/'.
**
**
*******************************************
When valid_product_name with regular expression '([^/]+/[^/]+?)/' is
disabled, it works.
But then some other interesting stuff showed up in the bug:
Branch: Cannot_be_determined
Affected files:
---------------
NONE --> 294 CustomerA/ProjectY:CustomerA/ProjectY/
NONE --> 294 CustomerA/ProjectY:CustomerA/ProjectY/branches/
NONE --> 294 CustomerA/ProjectY:CustomerA/ProjectY/tags/
NONE --> 294 CustomerA/ProjectY:CustomerA/ProjectY/trunk/
E.g. where did the source revision go? I did not expect NONE, but at
least the revision of the root of the repo.
Why is a product name mentioned? It was supposed to disabled.....
Besides the problem described above (which has a workaround) we have not
had any issues with scmbug yet. In fact we are very pleased with ScmBug.
Keep up the good work!!!
Peter
-----Original Message-----
From: Kristis Makris [mailto:[EMAIL PROTECTED]
Sent: dinsdag 24 april 2007 20:01
To: Hofman, Peter
Cc: [email protected]
Subject: Re: [scmbug-users] Import new folders in root when scmbug
active
Hi Peter,
http://bugzilla.mkgnu.net/show_bug.cgi?id=966
On Tue, 2007-04-24 at 09:47 +0200, Hofman, Peter wrote:
> I installed scmbug (0.19.9-1) and installed the glue for several
repos.
> Scmbug is configured to use auto product recognision with a single
> regular expression, since we have very strict naming conventions. Also
> most of the policies available in scmbug are enforced.
> The problem I am facing right now is that I cannot add a new project
> to the repo, since the project (or product) is added in the root of
> the repo, and therefor scmbug cannot detect a product name.
I could have sworn I tested that, and that adding the new product did
not cause problems if it indeed matched the expected naming convention.
Perhaps you could be more specific about your configuration and what you
tried ?
Have you updated the valid_product_name value (if needed) before adding
the new project ?
> Is there a way to get around this without disabling the hook scripts?
> I already tried stopping the scmbug daemon, but that does not help,
> since the problem is in the hook scripts.
> Is there some configuration option that I overlooked?
You could disable the valid product name check be setting "enabled => 0"
as shown in:
http://files.mkgnu.net/files/scmbug/SCMBUG_RELEASE_0-19-9/manual/html-si
ngle/manual.html#VERIFICATION-CHECKS-VALID-PRODUCT-NAME
That should let you add your new project in the repository, and you can
later enable it again.
This e-mail and any attachment is for authorised use by the intended
recipient(s) only. It may contain proprietary material, confidential
information and/or be subject to legal privilege. It should not be copied,
disclosed to, retained or used by, any other party. If you are not an intended
recipient then please promptly delete this e-mail and any attachment and all
copies and inform the sender. Thank you.
_______________________________________________
scmbug-users mailing list
[email protected]
http://lists.mkgnu.net/cgi-bin/mailman/listinfo/scmbug-users