3r1co / hg4j

Automatically exported from code.google.com/p/hg4j
GNU General Public License v2.0
0 stars 1 forks source link

hg4j shoul read 00changelog.i.a if HG_PENDING is set #19

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Mercurial reads 00changelog.i.a instead of changelog.i, if the environment 
variable HG_PENDING is set to the root path of the repository.

See 
https://bitbucket.org/mirror/mercurial/src/ad686c818e1c/mercurial/localrepo.py#c
l-196

I've created a fork to fix this problem: http://code.google.com/r/ssdorra-hg4j

Original issue reported on code.google.com by s.sdo...@gmail.com on 29 Nov 2011 at 8:33

GoogleCodeExporter commented 8 years ago
Thanks for the report. I'm not aware of the 00changelog.i.a file. What's the 
purpose of HG_PENDING variable and when it's set? Is there any documentation 
for that, other than source code. Quick googling didn't help too much

Original comment by tikhomir...@gmail.com on 30 Nov 2011 at 2:18

GoogleCodeExporter commented 8 years ago
The 00changelog.i.a is written before a transaction is committed. The 
HG_PENDING variable is for hooks such as pretxnchangegroup. It can be used to 
read pending changesets from an external process. I need this for my own 
project http://www.scm-manager.org/ to realize pre receive hooks.

You could test the behavior of mercurial with a pretxnchangegroup and a sleep:

hg init test
echo '[hooks]\npretxnchangegroup = sleep 500' > test/.hg/hgrc

Than push a repository to the new one and check the output of "hg log" with 
HG_PENDING and without HG_PENDING.

Original comment by s.sdo...@gmail.com on 30 Nov 2011 at 7:08

GoogleCodeExporter commented 8 years ago
I'm looking for a document that may serve as a (unofficial) specification, not 
to support anything not meant to be supported (e.g. temporary or outdated 
functionality) ;)

So far I found couple of posts that seems to prove this functionality is kind 
of 'official':

http://www.selenic.com/pipermail/mercurial-devel/2009-January/009838.html
http://www.selenic.com/pipermail/mercurial/2009-March/024396.html

However, no chances for this functionality to get into coming 1.0 release of 
Hg4J.

Original comment by tikhomir...@gmail.com on 1 Dec 2011 at 3:11