[PATCH] hgwatchman: new experimental extension

Wez Furlong wez at fb.com
Tue Feb 23 16:33:50 EST 2016


Re: hgwatchman vs. watchman: the hg prefix does feel redundant to me too, but I have no strong feelings about keeping it or not.

> On Feb 23, 2016, at 11:52 AM, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
> 
> 

Something about pywatchman that I snipped:

FWIW, the source of truth for pywatchman continues to be in the watchman repo.  We will occasionally sync that back to mercurial; for instance, I recently pushed a change that improves named pipe support there.

With that in mind, it's probably not a bad idea to upstream the pywatchman portions of this independently of the watchman extension portions of this.


> +    if not clock:
>> +        if self._watchmanstate.crawl_on_invalidate:
>> +            return bail()
>> +        clock = 'c:0:0'
> 
> Do we have anything explaining what this clock format means anywhere?

It's supposed to be opaque to us.  Official docs are at:
https://facebook.github.io/watchman/docs/clockspec.html
I should just write that you can use this "NULL clock" as a way to get all known info into those docs.

>> 
>> +++ b/hgext/hgwatchman/pywatchman/__init__.py
>> @@ -0,0 +1,538 @@
>> +# Copyright 2014 Facebook, Inc.
>> +# All rights reserved.
>> +#
>> +# Redistribution and use in source and binary forms, with or without
>> +# modification, are permitted provided that the following conditions are met:
>> +#
>> +#  * Redistributions of source code must retain the above copyright notice,
>> +#    this list of conditions and the following disclaimer.
>> +#
>> +#  * Redistributions in binary form must reproduce the above copyright notice,
>> +#    this list of conditions and the following disclaimer in the documentation
>> +#    and/or other materials provided with the distribution.
>> +#
>> +#  * Neither the name Facebook nor the names of its contributors may be used to
>> +#    endorse or promote products derived from this software without specific
>> +#    prior written permission.
>> +#
>> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
>> +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
>> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
>> +# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
>> +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
>> +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
>> +# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
>> +# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
>> +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
>> +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
> 
> Mercurial is GPL2+, What is this code licence? I'm unclear it is GPL2 compabible, can we get relicenced to GPL2 as part of the upstreaming.

Our legal folks told us to use this BSDish license specifically because it would be compatible with the GPL2 instead of our usual Apache style license.

We can follow up internally on this bit.

--Wez



More information about the Mercurial-devel mailing list