[PATCH hg-bfiles] Adapt to Mercurial 1.8: util.unlink() is now util.unlinkpath()

Martin Geisler mg at aragost.com
Mon Jan 31 03:44:00 CST 2011


Adrian Buehlmann <adrian at cadifra.com> writes:

> On 2011-01-30 17:23, Greg Ward wrote:
>> On Fri, Jan 28, 2011 at 4:23 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>>> # HG changeset patch
>>> # User Adrian Buehlmann <adrian at cadifra.com>
>>> # Date 1296248957 -3600
>>> # Node ID ce2b19fc5b47933d03b8ff97f671d7f893a30d3d
>>> # Parent  b7eb46bae296c5f851e169ee6a7101b94b44aac0
>>> Adapt to Mercurial 1.8: util.unlink() is now util.unlinkpath().
>> 
>> Thank you! That kind of service is above-and-beyond the call of duty,
>> and much appreciated. And the bfiles Buildbot is all green again.
>
> Glad you like it. I even tried to adapt to your style of change
> message an code. Thanks to your testsuite, I was able to test the
> change without even being a user of bfiles (I ran your tests on
> Ubuntu).
>
> I'm sorry to have to inflict such a weird API change on extension
> maintainers just to work around another Windows insanity. The new name
> 'unlinkpath' isn't that bad though. It was an idea by Matt.
>
> FWIW, the changes for 1.8 should also make Mercurial more tolerant
> against halfway decent AV scanners on Windows (includes the gratis
> Microsoft Security Essentials).
>
> I've seen other extensions being affected too: snap (maybe Martin can
> give Klaus Koch a heads-up?), pbranch (ping parren).

Sure!

Klaus: Mercurial 1.8 changes util.unlink so that it no longer removes
empty directories. Use util.unlinkpath if you want the old behavior:

See Mercurial changes:

  6052bbc7aabd  2011-01-11  reintroduces util.unlink, for POSIX and Windows.
  6bf39d88c857  2011-01-02  rename util.unlink to unlinkpath

> Maybe other extension maintainers can take this as an example how to
> adapt their extension for 1.8.
>
> And, extension authors: please subscribe to changes of the wiki page:
> http://mercurial.selenic.com/wiki/ApiChanges

-- 
Martin Geisler

aragost Trifork
Professional Mercurial support
http://aragost.com/en/services/mercurial/blog/


More information about the Mercurial-devel mailing list