[ANN] MacHg 0.9.6 released

Jason Harris jason at jasonfharris.com
Fri Jun 4 12:25:10 UTC 2010


Thanks,

I of course have debated about this but there are several reasons not to use the standard system hg.

1. You need to bundle Mercurial so users can (i) download this application, (ii)uncompress it, (iii) move it wherever they want, (iv) then run it... Experience. Having to install stuff with some root password required is sub-optimal in the whole user experience of get up and running quickly...

2. There are possible issues to do with someones ~/.hgrc which might reference something or has some setting which is incompatible with what MacHg does. Maybe they have some default set somewhere. HGPLAIN might cover this or might not. Much better to have a complete environment which MacHg controls which doesn't step on the system settings, and is not stepped on by the system settings. Ie self contained.

3. Mercurial itself has to currently be modified (once inotiify and other things are working maybe I can get around this.)   Currently the number one "issue" which I have to work around is the status issue described below.  I publish those modifications to Mercurial on bitbucket in a fork of the Mercurial sources. (I had one fork up but it disappeared.) I have forked it again and am in the process of modifying 1.5.4 with the changes.

Basically the changes are at present:

[Bolt:/Development/MacHgDev/MacHgUpdateHg] MacHgUpdateHg 237(237) ⌘ hg diff --rev 232:233 LocalMercurial/mercurial/util.py
diff --git a/LocalMercurial/mercurial/util.py b/LocalMercurial/mercurial/util.py
--- a/LocalMercurial/mercurial/util.py
+++ b/LocalMercurial/mercurial/util.py
@@ -666,7 +666,7 @@
 
     try:
         EXECFLAGS = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH
-        fh, fn = tempfile.mkstemp(dir=path, prefix='hg-checkexec-')
+        fh, fn = tempfile.mkstemp(dir=None, prefix='hg-checkexec-')
         try:
             os.close(fh)
             m = os.stat(fn).st_mode & 0777
@@ -684,7 +684,7 @@
     """check whether the given path is on a symlink-capable filesystem"""
     # mktemp is not racy because symlink creation will fail if the
     # file already exists
-    name = tempfile.mktemp(dir=path, prefix='hg-checklink-')
+    name = tempfile.mktemp(dir=None, prefix='hg-checklink-')
     try:
         os.symlink(".", name)
         os.unlink(name)

This gets around that race condition to do with doing a status -> creates a temp check file -> which causes notification that directory changed -> which does a status to find changes -> which creates a temp check file -> which causes notification that directory changed -> which does a status.... and so on, that I have talked about.

4. Additions of features. Right now I really want to have multiple undo and redo. You might have seen my previous comment about this entitled: Re: Data loss and Undo (again). In order to do this I have added a HGDIRNAME environment variable and I have done this in 1.4.2 and was testing it when I decided to move to 1.5.4.  In fact this is a big enough point that I will send in a separate email.

Cheers,
  Jas



On Jun 4, 2010, at 10:36 AM, Martin Geisler wrote:

> Jason Harris <jason at jasonfharris.com> writes:
> 
>> On Jun 2, 2010, at 5:19 PM, Martin Geisler wrote:
>> 
>>> Which version of Mercurial is included with this release?
>> 
>> Still the old one. 1.4.2. With the new 1.5.4 I will let it sit with
>> people for say a week and then if it fixes that 20% speed degradation
>> (I believe it should:) ) then I will bump MacHg to use Mercurial
>> 1.5.4. I am testing setting my own HGRCPATH so the users ~/.hgrc isn't
>> used or messed with.
> 
> Would it not be nicer if MacHg exposed its bundled Mercurial on the
> commandline and let it use the settings from my ~/.hgrc file. That way
> there would only be one Mercurial on the system and it would work the
> same way it does on other platforms.
> 
> -- 
> Martin Geisler
> 
> aragost Trifork
> Professional Mercurial support
> http://aragost.com/mercurial/




More information about the Mercurial mailing list