Closed Bug 436325 Opened 16 years ago Closed 16 years ago

Allow "Description" and "Contact" fields to be set for published mercurial clones

Categories

(mozilla.org Graveyard :: Server Operations, task)

All
Other
task
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dholbert, Assigned: aravind)

Details

The Mercurial web interface has "Description" and "Contact" fields, which are easily configurable via the hgrc file, as detailed here: 

http://www.selenic.com/mercurial/wiki/index.cgi/PublishingRepositories#head-1d897eb4ed210ac7b67e11a32df1f4d035732249

Currently, mercurial clones published on hg.mozilla.org have "unknown" for both of these fields, and there's no way to change them, AFAIK.

It'd be nice to be able to set these fields to something useful.  This could be done in (at least) two ways:

  a) as part of setting up the repository, i.e. an extra phase during the the "ssh hg.mozilla.org clone" command.  ("Enter a brief description, or press enter to skip")

  b) (preferred) via a separate interactive script that can be run at any time ("ssh hg.mozilla.org edit-details [repo-name]")
Assignee: server-ops → aravind
I am not sure if having a contact makes sense.  In most cases the code there is being worked on by a bunch of people.  And if its not, then its mostly obvious whose code that is (in a user repo, for example).

The description on the other hand makes sense.  Not sure if I should make a script to change descriptions for repos on the main page though.  That means anyone (with mercurial access) can change the description on a project.  I'd be glad to add descriptions to the projects on the main landing page.

For the user repos, I can change the clone script and add a "enter description" prompt.

Also, if someone wants to take a shot at modifying the templates so we don't show that contacts column - they are at http://hg.mozilla.org/index.cgi/hg_templates/
For user repos I think we should just set the contact == the user

For public repos, I think we should handle changing the contact/description manually through bugs.
I still don't see the value of a contact for user repos, same with public repos.
I agree that contact isn't really useful, per reasoning in comment 1.  If we can hide that column as suggested in comment 1, that'd be handy.

Description would be nice, though.
I added a new edit option to the hg script, but its not available on the general host name.  I was hoping to get some of you guys to test the new script.  To get to the new script point hg.mozilla.org to dm-hg01.mozilla.org.  The option to edit a repositories description is "edit reponame".   Since you will be editing only your repositories description, use the basename of the repository.  You don't need to mention /users/user_mail.com/reponame.  Simply call the script like this.

ssh hg.mozilla.org edit reponame

I am going to let this sit for a day or two before I make it active on the main hostname.
Aravind, I tried both editing and deletion functions and they appear to work correctly
Okay.  I am pushing this live.  I also got rid of the contact fields for the hgweb listing.  I will update the docs on wiki.m.o shortly.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Two minor suggestions for the script:

1. Add a trailing space character to the repository description prompt.

The prompt for this currently looks like this:
==
Enter a one line descripton for the repository:Here's My Repo Description
==
Note that there's no space after the ':' character there, whereas there is a space in almost all of the other prompts that I encounter in the script.  It looks prettier with a space, IMHO. :)


2. Display the repo URL before deleting a repository.

The script already displays the repo URL when I'm editing the description, with a message like this:
==
You are about to edit the description for hg.mozilla.org/users/dholbert_mozilla.com/smil-patches.
==

But when I tried *deleting* another repo, it printed an confirmation message *without the repo URL*, like this:
==
Are you sure you want to delete this repository.

This action is IRREVERSIBLE.
==
I think it'd be quite nice if we replaced "this repository" with the actual repo URL, or displayed it in some other way, to help avoid accidental deletion of the wrong repo.
Product: mozilla.org → mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.