Because git repo creation will be triggered on project creation (and this is the only way new project repos will be created), rather than having the project owner map to a CVS directory via the UI, and moving the repos once created is potentially dicey (it's probably fine...but why take the risk?), it would be prudent to impose the restriction that the system/short name of projects is unchangeable after creation. Shouldn't be much more than a form_alter somewhere...the widget description should also be updated to indicate that this is a non-changeable choice.

On a related note, we may need to tighten up character restrictions on the shortname. Not sure, depends on what they are right now.

Comments

sdboyer’s picture

Also, we need to generate a list of modules/themes that don't map 1:1 in this way right now and decide on a way to rectify it. My vote is that we move them to a new shortname+URL that corresponds exactly to the entry in CVS, mark both the old and new shortname namespaces as occupied, then put a 301 redirect on the old project URL to the new one. I _think_ that would be the least destructive for projects running the items that get their names switched around.

On the bright side, this should be one less piece of complexity to be sorted out in updates...

mikey_p’s picture

Okay, this is going to need to be sorted out in the initial port to vcs_git and that is probably where the form_alter should live as well.

mikey_p’s picture

Actually thought some more about the mapping and naming, and I think that we may need to make a list of projects that don't map, and let the module maintainer choose whether they'd like to keep their cvs directory name, or the project's shortname, as they may have their actual module or namespace used within their module based on either. I don't think the actual mapping of occupied namespaces needs to have anything to do with this, as there is a project_info module in the works that could handle that, but you'd have to ask dww for the details.

damien tournoud’s picture

In case there is a mismatch, it is better to keep the project short name:

1. It is used as a key for several external things: update module, testing, packages, etc.
2. We can change the repository name easily during the conversion process

mikey_p’s picture

Damien raises some excellent points here, since among all repos (which in cvs are broken out so that modules, themes, profiles all get their own namespace) the short name on d.o is the closest thing we have to a global namespace for all d.o projects. This also avoids linkrot or redirects on d.o.

The next question is where should this could live, vc_git, vc_project, or drupalorg?

marvil07’s picture

IMHO using the project shortname is the best option, for the points mentioned in #4

I think this hook_form_alter could live in:
- project, as a global configuration flag "let modify project-shortname", or if not accepted on
- versioncontrol_project, since this is not an specific git change

mikey_p’s picture

Assigned: Unassigned » mikey_p

Okay, I'll try to roll a patch for project that adds this.

mikey_p’s picture

Project: Drupal.org infrastructure » Project
Version: » 6.x-1.x-dev
Component: Git » Projects
Status: Active » Needs review
StatusFileSize
new953 bytes
hunmonk’s picture

hunmonk’s picture

StatusFileSize
new1.72 KB

changes in this patch

  1. moves this from form_alter to the project node form itself
  2. since the HTML spec doesn't pass #disabled elements in $_POST (boo...), we have to pass uri as a #value when it's locked. so, i also added a dummy form item for display in this case.
  3. cleaned up a spacing issue, and a better check for a new node
damien tournoud’s picture

You should be able to add #input => TRUE to the element for its value to be processed in the $form_state['values'].

hunmonk’s picture

StatusFileSize
new1.51 KB

damz's approach seems to be a bit cleaner, so i went with it. note that you also have to explicitly pass #value for type 'item' -- i guess #default_value won't work.

attached has been well tested and seems to work perfectly.

mikey_p’s picture

Status: Needs review » Reviewed & tested by the community

Looks RTBC to me, testing this with editing existing, and creating a new project, each with the setting enabled and disabled. The only thought I had was that it might be nice to include the explanation text when editing and locked, so that the user knows why the item is still appearing, but they can't edit.

hunmonk’s picture

Title: sysname/short name of projects may have to be made permanent » option to lock project short name
Status: Reviewed & tested by the community » Fixed

The only thought I had was that it might be nice to include the explanation text when editing and locked, so that the user knows why the item is still appearing, but they can't edit

i had that thought as well, but decided that since it's not a form field, it's pretty obvious that it's not editable, plus they got the explanation the first time ;) i say save the screen real estate on that -- we can add it if it becomes a UI issue.

committed to 6.x-1.x-dev, and deployed on drupal.org

mikey_p’s picture

Status: Fixed » Needs review
StatusFileSize
new913 bytes

Here's a super short test for this.

dww’s picture

Status: Needs review » Fixed

Automatically closed -- issue fixed for 2 weeks with no activity.