Open Bug 1198162 Opened 10 years ago Updated 9 years ago

'mach mercurial-setup' modifies $(HOME)/.hgrc

Categories

(Developer Services :: Mercurial: configwizard, defect)

defect
Not set
normal

Tracking

(Not tracked)

People

(Reporter: tzimmermann, Unassigned)

Details

'mach mercurial-setup' should not modify personal settings in the user's home directory (i.e., $(HOME)/.hgrc). This can interfere with other HG repositories (and is not good style in general).
This is why it prompts you to display and diff and save the file before changing everything. The extensions we install generally don't interfere with Mercurial operations on non-Mozilla repositories. I know this because I frequently interact with non-Mozilla repositories with these extensions installed. If someone wants to add support for mach mercurial-setup to not update ~/.hgrc by default, they can. But IMO it is unneeded complexity and sub-optimal for most Mozillians because they tend to manage multiple Firefox clones and having to configure .hg/hgrc files on all of them would be a PITA. Also, not touching ~/.hgrc might require changing config reading in mercurial-setup to take ~/.hgrc into consideration so we don't redundantly install options. That would be an invasive change. Do you have an actual bug to report or is this just a philosophical belief?
Flags: needinfo?(tzimmermann)
Hmm, I have a number of points. * At least it could have made a backup by default of the original file. I definitely consider this a bug. * I also have multiple repo clones and the PITA to me is indeed that it modifies .hgrc in the home directory. A command-line switch could select between the (repo-)local and the user's config. * What if the user has other hg repos that are unrelated to Mozilla?
Flags: needinfo?(tzimmermann)
(In reply to Thomas Zimmermann [:tzimmermann] [:tdz] from comment #2) > Hmm, I have a number of points. > > * At least it could have made a backup by default of the original file. I > definitely consider this a bug. This is a good idea and is doable. Although we could just as easily change the message on the "do you want to write this file" prompt to recommend backing up the file. That is more flexible than trying to guess a good backup location for the user. > * I also have multiple repo clones and the PITA to me is indeed that it > modifies .hgrc in the home directory. A command-line switch could select > between the (repo-)local and the user's config. As I said, this is somewhat complicated to do properly. > * What if the user has other hg repos that are unrelated to Mozilla? As I said, changes we make typically don't negatively impact work on other repositories. If they, I'd likely consider those bugs that should be filed separately.
Component: mach → Mercurial: configwizard
Product: Core → Developer Services
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.