[Bug 4268] New: HG_URL Environment Variable in prechangegroup Hook Regressed in 3.0

mercurial-bugs at selenic.com mercurial-bugs at selenic.com
Tue Jun 3 07:07:42 CDT 2014


http://bz.selenic.com/show_bug.cgi?id=4268

          Priority: normal
            Bug ID: 4268
                CC: mercurial-devel at selenic.com
          Assignee: bugzilla at selenic.com
           Summary: HG_URL Environment Variable in prechangegroup Hook
                    Regressed in 3.0
          Severity: bug
    Classification: Unclassified
                OS: Linux
          Reporter: d.prince at transcendata.com
          Hardware: PC
            Status: UNCONFIRMED
           Version: 3.0
         Component: Mercurial
           Product: Mercurial

Created attachment 1772
  --> http://bz.selenic.com/attachment.cgi?id=1772&action=edit
Two repos and a hook.

Running on Ubuntu 12.04 (fully updated) with mercurial from the launchpad ppa,
which was updated to v3.0 recently.

One of our hooks stopped working, and I've narrowed it down to the following,
and suspect it's a mercurial bug/regression.

The situation is when pushing from one repo to another (both are on local
filesystems - no SSH or HTTP etc. - "hg push /l2/repo/cadfix") and the
receiving repo has a prechangegroup hook configured that uses two of the HG_
environment variables. I modified it to print them out. I've manually reverted
to version 2.9.2, wherein it still works and the expected output is:

HG_SOURCE = push
HG_URL = file:/l2/staging/cadfix

Using v3.0 (and also reproduced on the current tip (dedb68a9532c) of the stable
branch) it now says this:

HG_SOURCE = push
HG_URL = push

I can't find any refs to HG_URL changes in the release notes summaries, so I'm
guessing this wasn't and intentional change.

I've knocked up two tiny repos and a hook to easily reproduce this in the
attached tar file. Hope this helps.

12:55-dart:/home/dkp> tar xf eg.tar.bz2 
12:55-dart:/home/dkp> cd R/A
12:55-dart:/home/dkp/R/A> hg push ../B
pushing to ../B
searching for changes
HG_SOURCE = push
HG_URL = push
Error: Unexpected $HG_URL contents
abort: prechangegroup hook exited with status 1
12:55-dart:/home/dkp/R/A>

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list