Mercurial Update Breaks HG_URL Variable Usage During Push

Bug #1805146 reported by D Prince
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mercurial (Ubuntu)
New
Undecided
Unassigned

Bug Description

In the updates between version 3.7.3-1ubuntu1 and 3.7.3-1ubuntu1.1, the one word changed in the file exchange.py (installed for me at /usr/lib/python2.7/dist-packages/mercurial/exchange.py) breaks the HG_URL environment variable usage in repo hooks whilst pushing.

In fact this change more or less explicitly reverses the fix made upstream by mercurial when I reported this very same bug some years ago in 2014. Details can be found here: https://bz.mercurial-scm.org/show_bug.cgi?id=4268 including an example repo setup to reproduce the bug.

In the current update as packaged by Ubuntu, line 861 of the file has been changed from

            reply = pushop.remote.unbundle(stream, ['force'], pushop.repo.url())

to

            reply = pushop.remote.unbundle(stream, ['force'], 'push')

The HG_URL variable is supposed to contain the url as given by pushop.repo.url(). The keyword 'push' is supposed to go into the HG_SOURCE variable.

This is currently running on this OS version (although I expect it's independent of most of it)

LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
(dee xenial):/root> lsb_release -a
LSB Version: core-9.20160110ubuntu0.2-amd64:core-9.20160110ubuntu0.2-noarch:security-9.20160110ubuntu0.2-amd64:security-9.20160110ubuntu0.2-noarch
Distributor ID: Ubuntu
Description: Ubuntu 16.04.5 LTS
Release: 16.04
Codename: xenial

For reproduction and verification of this, download the example repos (in eg.tar.bz2) which are the first attachment to the previously fixed mercurial bug report liked to above and follow the instructions I posted there.

Thank you,

~D~

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.