Page MenuHomePhabricator

Rename repo name on Gerrit from "examples" to "Examples"
Open, LowestPublic

Description

mediawiki/extensions/examples repo has undergone some refactoring and based on current recent style in which we name our repositories especially extensions, the name could be move from "examples" to "Examples".

@QChris, is this something that can be done on Gerrit directly or do we need to do it via some other approach? Thanks!

Event Timeline

Extract from IRC chat with @MarcoAurelio

12:05 hauskatze: not possible to rename repos on Gerrit afaik xSavitar
12:06 hauskatze: we should create a new repo, bare clone and --mirror it to Examples, and close the other one

As far as I know it is not possible to rename repositories in Gerrit as we lack the rename-project gerrit plugin.

An option would be to import the examples repo into a newly-created Examples one, and close the former, if we want to keep the full history and attribution.

Is it worth the work?

Ping @Paladox re rename-project.

It's still unclear to me which problem is solved by renaming. :) If there are current standards and conventions could someone link to them, please?

Thanks for the question @Aklapper. Most of our extensions are named in the format "Xyz" or "XyzAbc" etc. I've seen very few extensions using "ABC" (extension names that are acronyms like 3D, APC, AWS etc) or "xyz" naming (which I'm not sure about).

See: https://gerrit.wikimedia.org/r/admin/repos/q/filter:extensions%252F

So the reason why we want to rename the extension is so that it matches the way extensions are already named currently. But maybe me saying it's a convention or standard is wrong. In that case, should we leave the name "examples" as-is?

I'll update the description to remove the "standard/convention" part. Pardon me!

You're right, that we're trying to use CamelCase names for new extensions.
But for one reason or the other, you'll find quite a few repos where naming is inconsistent. Like all lowercase. All uppercase. Abbreviations not using consistent casing (E.g.: API vs. Api).

We're trying hard to create new repos using CamelCase. But because renaming causes quite some friction, we don't fix inconsistent naming in old repos—unless there is a reason to do so.

The examples extension is from 2012. I'd just leave the name all lowercase to avoid causing issues with users of the repo.

Aklapper changed the task status from Open to Stalled.Feb 19 2021, 9:02 AM
Aklapper triaged this task as Lowest priority.
hashar changed the task status from Stalled to Open.Feb 6 2024, 9:20 AM
hashar subscribed.

Note that for MediaWiki extensions we have been using`examples` (mediawiki/extensions/examples) but for skins we use camelcase/singular form Example (mediawiki/skins/Example). That is a bit inconsistent, then if those are really extensions/skins, MediaWiki requires the name to be unique across extensions and skins, else they can't be loaded at the same time.

If you feel we should rename it, I have finally added the Gerrit plugin to rename a repository. Then as QChris has pointed above, the renaming might break a lot of use case.