No preoutgoing hook when cloning from local path. Bug?
Steve Borho
steve at borho.org
Tue Apr 7 12:32:43 CDT 2009
On Tue, Apr 7, 2009 at 11:01 AM, David Ripton <dripton at ripton.net> wrote:
> Running Mercurial 1.2 on Linux.
>
> I use the changegroup and preoutgoing hooks to automatically sync some
> repositories on change.
>
> We serve our repositories over https using Apache.
>
> It turns out that if I'm on box1 and I do
> "hg clone https://localhost/projects/projectname /tmp/projectname"
> or
> "hg clone https://box1/projects/projectname /tmp/projectname"
> then the preoutgoing hook that I've defined inside the project's
> .hg/hgrc runs.
>
> But if I'm on box1 and I do
> "hg clone /var/companyname/projects/projectname /tmp/projectname"
> then the preoutgoing hook does not run.
>
> (Note that the https URLs ultimately point to the exact same place as
> the filesystem path.)
>
> Now that I know what is happening, I can just have my code always use
> the https URL rather than the local filesystem path so that the hook
> always runs.
>
> But is this a bug that I should report, or is it a deliberate feature?
> If it's a feature, can someone explain why it was done this way?
I suspect that this is because the local URL uses the hardlink clone
method. If you use the local URL and add the --pull argument and
it does call your hook, that will prove this is the problem.
If it is, you should probably file a bug.
--
Steve Borho
More information about the Mercurial
mailing list