Adding HG_DEST for post-clone hook
anatoly techtonik
techtonik at gmail.com
Tue Jan 8 15:33:17 UTC 2019
On Tue, Jan 8, 2019 at 4:01 AM Roger Pate <rogerpate at gmail.com> wrote:
> On Mon, Jan 7, 2019 at 9:27 AM anatoly techtonik <techtonik at gmail.com> wrote:
> > On Sun, Jan 6, 2019 at 10:05 PM Roger Pate <rogerpate at gmail.com> wrote:
> > > On Thu, Jan 3, 2019 at 8:08 AM anatoly techtonik <techtonik at gmail.com> wrote:
> > > > I need to `cd` into cloned dir to do some automatic settings,
> > > > but location of the new clone is not available.
> > > ...
> > > > Taken from https://gitlab.com/snippets/1794395
> > >
> > > What's the working directory for the post-clone hook?
> >
> > Yes. Name could be different, of course.
>
> That wasn't a yes/no question, but apparently clone hooks act
> differently than other hooks, in this regard. Looking at CWD would
> answer your question for other hooks.
It doesn't answer the question for post-clone hook - how likely it is to expect
custom params in post-clone hook?
> If you know how to guess the username you should use, how about a
> pre-commit hook which 1) does nothing if ui.username is set, 2) sets
> ui.username for the repo (if it can), or 3) prints an error message
> that ui.username is not set and cannot be guessed.
`ssh -T hg at bitbucket.org` gives me nickname. It could be better if they
could also show fullname and email. In JSON, for example. Because I
already authenticated and gained access, it makes sense to set there
params during clone.
If hosting providers can support such protocol, so that Mercurial can set
REMOTE_USER and REMOTE_EMAIL, it would lessen participation
barrier for many open source contributors.
Over the years I had to type my email and name at least 260 times
judging from amount of repository clones in my public accounts.
--
anatoly t.
More information about the Mercurial
mailing list