Page MenuHomePhabricator

yuja (Yuya Nishihara)
User

Projects

User Details

User Since
Jun 29 2017, 11:25 AM (133 w, 4 d)

Recent Activity

Fri, Jan 17

yuja added a comment to D7913: cext: fix compiler warning about sign changing.

static PyObject *hashflags(line *l)
{

	char *s = l->start;
  • size_t plen = pathlen(l);

+ Py_ssize_t plen = pathlen(l);

Fri, Jan 17, 7:14 AM

Thu, Jan 16

yuja added a comment to D7903: sha1dc: avoid including the nonexistent stdint.h with Visual Studio 2008.

#ifndef SHA1DC_NO_STANDARD_INCLUDES
+#if !defined(_MSC_VER) || _MSC_VER >= 1600
#include <stdint.h>
+#else
+/* prior to Visual Studio 2010 */
+typedef unsigned int uint32_t;

Thu, Jan 16, 10:08 AM

Thu, Jan 9

yuja added a comment to D7705: phases: make the working directory consistently a draft.

@@ -252,25 +254,44 @@

    revs = set.union(*[self._phasesets[p] for p in phases])
if repo.changelog.filteredrevs:
    revs = revs - repo.changelog.filteredrevs

+

if subset is None:
    return smartset.baseset(revs)
else:

+ if wdirrev in subset and repo[None].phase() in phases:
+ # The working dir would never be in the cache, but it was
+ # in the subset being filtered for its phase, so add it to
+ # the output.
+ revs.add(wdirrev)

Thu, Jan 9, 8:54 AM

Sat, Jan 4

yuja added a comment to D7543: revlog: made C Capsule an array of function pointers.
A possibility, since we're now on this data + functions capsule would be to introduce an ABI version number in the capsule.
At least, that's the first thing that comes to mind.
Sat, Jan 4, 8:04 AM
yuja added a comment to D7543: revlog: made C Capsule an array of function pointers.

+typedef struct {
+ int (*index_parents)(PyObject *, int, int *);
+} Revlog_CAPI;

Sat, Jan 4, 4:35 AM

Dec 18 2019

yuja added a comment to D7685: rebase: use rewriteutil.precheck() instead of reimplementing it.
  • hint=_(b'use --keep to keep original changesets'),
  • )

+ if not self.keepf:
+ try:
+ rewriteutil.precheck(self.repo, rebaseset, action=b'rebase')
+ except error.Abort as e:
+ if e.hint is None:
+ e.hint = b'use --keep to keep original changesets'

Dec 18 2019, 10:11 AM
yuja added a comment to D7641: rebase: use cmdutil.check_at_most_one_arg() for --confirm/--dry-run.
  • a/mercurial/cmdutil.py

+++ b/mercurial/cmdutil.py
@@ -268,6 +268,7 @@

previous = None
for x in args:
    if opts.get(x):

+ x = x.replace(b'_', b'-')

if previous:
    raise error.Abort(
        _(b'cannot specify both --%s and --%s') % (previous, x)
Dec 18 2019, 7:53 AM

Dec 17 2019

yuja added a comment to D7641: rebase: use cmdutil.check_at_most_one_arg() for --confirm/--dry-run.

Spotted in a later patch, need to replace _ back to - before printing output.

Strings are immutable in Python, so it wasn't actually replaced, right? Or do I misunderstand your concern?

Dec 17 2019, 10:32 AM

Dec 14 2019

yuja added a comment to D7570: match: resolve filesets against the passed `cwd`, not the current one.
In D7570#112206 <https://phab.mercurial-scm.org/D7570#112206>, @yuja wrote:
Good catch.  I don't see the meaning of b'' in this context defined anywhere.  But since `subinclude:` uses it to define the matcher, I'm assuming that's all of the adjustment we need?
Dec 14 2019, 4:28 AM

Dec 13 2019

yuja closed D7614: rust-cpython: do not convert warning pattern to utf-8 bytes.
Dec 13 2019, 1:18 PM
yuja closed D7613: rust-cpython: import utils::files::* function at module level.
Dec 13 2019, 1:18 PM
yuja committed rHGb06cf2809ec3: rust-cpython: do not convert warning pattern to utf-8 bytes.
rust-cpython: do not convert warning pattern to utf-8 bytes
Dec 13 2019, 1:17 PM
yuja committed rHG4f1cddd1939e: rust-cpython: import utils::files::* function at module level.
rust-cpython: import utils::files::* function at module level
Dec 13 2019, 1:17 PM

Dec 12 2019

yuja added a comment to D7570: match: resolve filesets against the passed `cwd`, not the current one.
> In D7570#111892 <https://phab.mercurial-scm.org/D7570#111892>, @durin42 wrote:
>
>> I'm happy with this, but didn't spend time figuring out if all concerns have been addressed (I'm mostly doing a fast triage path).
>
> I *think* they're addressed, but we there's no rush to get this in so let's give Yuya a chance to comment, because I'm not sure if the issue with subrepos is an existing or new issue.
@yuja, what do you think?
Dec 12 2019, 7:20 PM
yuja added a comment to D7550: chg: fix chg to work with py3.7+ "coercing" the locale.
> Sigh. Can we work around this weird behavior by making chg do
> `putenv("PYTHONCOERCECLOCALE=0")`? I think it's simple and more desired
> behavior than the default of Python 3.
I had considered that and was concerned it would create an observable, surprising/confusing difference between chg and non-chg: if chg sets PYTHONCOERCECLOCALE=0, hg won't have LC_CTYPE in the environment, and it WILL have PYTHONCOERCECLOCALE in the environment. When it starts external tools (like merge tools), this may change behavior in some observable fashion, and if the user stops using chg and uses just plain hg, it will have LC_CTYPE in the environment.
Dec 12 2019, 9:07 AM

Dec 6 2019

yuja added a comment to D7570: match: resolve filesets against the passed `cwd`, not the current one.
if listsubrepos:
    for subpath in ctx.substate:
  • sm = ctx.sub(subpath).matchfileset(pat, badfn=badfn)

+ sm = ctx.sub(subpath).matchfileset(
+ pat, badfn=badfn, cwd=cwd
+ )

Dec 6 2019, 11:56 PM
yuja added a comment to D7550: chg: fix chg to work with py3.7+ "coercing" the locale.
When the environment is empty (specifically: it doesn't contain LC_ALL,
LC_CTYPE, or LANG), Python will "coerce" the locale environment variables to be
a UTF-8 capable one. It sets LC_CTYPE in the environment, and this breaks chg,
since chg operates by:
- start hg, using whatever environment the user has when chg starts
- hg stores a hash of this "original" environment, but python has already set LC_CTYPE even though the user doesn't have it in their environment
- chg calls setenv over the commandserver. This clears the environment inside of hg and sets it to be exactly what the environment in chg is (without LC_CTYPE).
- chg calls validate to ensure that the environment hg is using (after the setenv call) is the one that the chg process has - if not, it is assumed the user changed their environment and we should use a different server. This will *never* be true in this situation because LC_CTYPE was removed.
Dec 6 2019, 10:57 PM

Dec 3 2019

yuja committed rHGb5f183eedd98: status: fix default value of status struct.
status: fix default value of status struct
Dec 3 2019, 10:59 AM
yuja committed rHGfaa8a59f4a06: graphlog: change state dict to attr struct.
graphlog: change state dict to attr struct
Dec 3 2019, 10:59 AM
yuja committed rHG064c9a4ced4a: typing: fix return type of logcmdutil.getrevs().
typing: fix return type of logcmdutil.getrevs()
Dec 3 2019, 10:59 AM
yuja committed rHGf79377f24487: rust-cpython: import utils::files::* function at module level.
rust-cpython: import utils::files::* function at module level
Dec 3 2019, 10:59 AM
yuja committed rHGee3872c14ab3: rust-cpython: do not convert warning pattern to utf-8 bytes.
rust-cpython: do not convert warning pattern to utf-8 bytes
Dec 3 2019, 10:59 AM
yuja committed rHG7b14d649af1b: typing: consolidate "if not globals():" trick.
typing: consolidate "if not globals():" trick
Dec 3 2019, 10:59 AM
yuja added a comment to D7542: mail: don't complain about a multi-word email.method.

+ command = procutil.shellsplit(method)
+ if not (command and procutil.findexe(command[0])):

Dec 3 2019, 7:56 AM

Nov 29 2019

yuja added a comment to D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix.
I am fine with not having all test passing from the start. However here we have a test that used to pass that is now failing, so we regressed here. I would rather not regress in test coverage here. Without this, all mercurial test pass with the Rust code, I would like to keep it that way.
Nov 29 2019, 10:15 AM
yuja added a comment to D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix.
>>   > Okay, then using non-debug `assert!()` seems more appropriate. If we prefer
>>   > being stricter, "checked" HgPath type can be introduced.
>>   > ...
>>   > Actually I tried to suppress these warnings by propagating Result upwards,
>>   > and I got a feeling that we're doing wrong.
>>   I sent a followup as D7522 <https://phab.mercurial-scm.org/D7522> because that gets rid of the warnings. As explained in the commit message, I am unhappy about this change, as you seem to be.
>
> Thanks. Given Rust impl is still unstable, I think it's better to back out
> the changes in Rust and leave the test failure until we find a right solution.
I am -1 for this. Having the test broken is a big overhead for people actually using Rust and testing it. The rust support is experimental but not "unstable". We use it in production in a couple of places. Keeping the test suite
Nov 29 2019, 9:57 AM

Nov 28 2019

yuja added a comment to D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix.
> Okay, then using non-debug `assert!()` seems more appropriate. If we prefer
> being stricter, "checked" HgPath type can be introduced.
> ...
> Actually I tried to suppress these warnings by propagating Result upwards,
> and I got a feeling that we're doing wrong.
I sent a followup as D7522 <https://phab.mercurial-scm.org/D7522> because that gets rid of the warnings. As explained in the commit message, I am unhappy about this change, as you seem to be.
Nov 28 2019, 8:14 AM

Nov 27 2019

yuja added a comment to D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix.
> I generally prefer adding safety checks at ABI boundary. If malicious input
> makes Rust code crash or exhaust CPU/memory resource, I would add sanity
> check to rust-cpython layer.
Sure, that makes sense in our configuration, but we need to consider `hg-core` as its own standalone library when making decisions like this.
Nov 27 2019, 8:30 AM

Nov 26 2019

yuja added a comment to D7512: exchange: guard against method invocation on `b2caps=None` args.
>>   """add a changegroup part to the requested bundle"""
>>
>> - if not kwargs.get('cg', True):
>>
>> +    if not kwargs.get('cg', True) or not b2caps:
>>
>>   return
>
> Is it valid to call these functions with `b2caps=None`? I suspect it would
> be a bug or a data corruption.
The only caller I can find[1] will indeed pass something, even if it is `{}`.  I can change these to asserts if you want.
[1] https://www.mercurial-scm.org/repo/hg/file/tip/mercurial/exchange.py#l2448
Nov 26 2019, 8:09 AM

Nov 25 2019

yuja committed rHG7d237fd3b207: status: fix default value of status struct.
status: fix default value of status struct
Nov 25 2019, 10:28 AM
yuja committed rHGe006f09e77de: graphlog: change state dict to attr struct.
graphlog: change state dict to attr struct
Nov 25 2019, 10:28 AM
yuja committed rHG47b8ca03c518: typing: consolidate "if not globals():" trick.
typing: consolidate "if not globals():" trick
Nov 25 2019, 10:28 AM
yuja committed rHGf892089b19a0: typing: fix return type of logcmdutil.getrevs().
typing: fix return type of logcmdutil.getrevs()
Nov 25 2019, 10:28 AM
yuja committed rHG3078f9a48546: rust-cpython: do not convert warning pattern to utf-8 bytes.
rust-cpython: do not convert warning pattern to utf-8 bytes
Nov 25 2019, 10:28 AM
yuja committed rHGba95d137deb6: rust-cpython: import utils::files::* function at module level.
rust-cpython: import utils::files::* function at module level
Nov 25 2019, 10:28 AM
yuja added a comment to D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix.
> Might be better to do `path.check_state()` in cpython layer, and insert
> `debug_assert` to hg-core.
That would be cleaner for the current purposes, but using `debug_assert` in `hg-core` indicates to me that we want the Rust code to not worry about checking for consecutive slashes in `dirs`, because we would have the `pathauditor`. Am I correct?
Nov 25 2019, 8:47 AM

Nov 24 2019

yuja added a comment to D7516: webutil: add missing argument to join().
It could be, since I didn’t see any callers either (but wasn’t sure if there was templater magic in play here).  It also might be a WIP, given the comment in `join()`.  @yuja?
Nov 24 2019, 10:07 AM
yuja added a comment to D7512: exchange: guard against method invocation on `b2caps=None` args.
"""add a changegroup part to the requested bundle"""
  • if not kwargs.get('cg', True):

+ if not kwargs.get('cg', True) or not b2caps:

return
Nov 24 2019, 12:16 AM
yuja added a comment to D7511: exchange: eliminate some bytes.format() calls.
if invalid_includes:
    raise error.Abort(
  • _(b"The following includes are not accessible for {}: {}").format(
  • username, invalid_includes
  • )

+ _(b"The following includes are not accessible for %s: %s")
+ % (username, invalid_includes)

Nov 24 2019, 12:16 AM

Nov 23 2019

yuja added a comment to D7481: localrepo: recognize trivial "null" queries in `anyrev`.

+ if specs == [b'null']:
+ return revset.baseset([nullrev])

Nov 23 2019, 11:57 PM
yuja added a comment to D7503: rust-dirs: address failing tests for `dirs` impl with a temporary fix.

Many unhandled results:

Nov 23 2019, 1:13 AM

Nov 22 2019

yuja committed rHG7eb701e355bd: merge with stable.
merge with stable
Nov 22 2019, 7:52 AM

Nov 16 2019

yuja committed rHGda925257a39e: typing: add pseudo localstr.__init__() to help pytype.
typing: add pseudo localstr.__init__() to help pytype
Nov 16 2019, 2:46 PM
yuja committed rHG009c115eba95: typing: fix argument type of encoding.localstr().
typing: fix argument type of encoding.localstr()
Nov 16 2019, 2:46 PM
yuja committed rHG7f51bc36194d: typing: suppress error of py2 encoding.strtolocal() and .strfromlocal().
typing: suppress error of py2 encoding.strtolocal() and .strfromlocal()
Nov 16 2019, 2:46 PM
yuja committed rHG83a349aaeba3: typing: constrain argument/return types of encoding.toutf8b().
typing: constrain argument/return types of encoding.toutf8b()
Nov 16 2019, 2:46 PM
yuja committed rHGb65fcccd9100: typing: fix argument type of encoding.tolocal() and .fromutf8b().
typing: fix argument type of encoding.tolocal() and .fromutf8b()
Nov 16 2019, 2:46 PM
yuja committed rHG3364a15f61f0: typing: fix forward reference in _Tlocalstr type bound.
typing: fix forward reference in _Tlocalstr type bound
Nov 16 2019, 2:46 PM
yuja committed rHG7cf332318f62: encoding: make getcols() raise exception explicitly.
encoding: make getcols() raise exception explicitly
Nov 16 2019, 2:46 PM
yuja committed rHGd2c40c759e8c: typing: add pseudo localstr.__init__() to help pytype.
typing: add pseudo localstr.__init__() to help pytype
Nov 16 2019, 2:36 PM
yuja committed rHGb544f89f027e: typing: fix argument type of encoding.localstr().
typing: fix argument type of encoding.localstr()
Nov 16 2019, 2:36 PM
yuja committed rHGbc1d94d01264: typing: constrain argument/return types of encoding.toutf8b().
typing: constrain argument/return types of encoding.toutf8b()
Nov 16 2019, 2:36 PM
yuja committed rHG7c9b0c3dbc10: typing: suppress error of py2 encoding.strtolocal() and .strfromlocal().
typing: suppress error of py2 encoding.strtolocal() and .strfromlocal()
Nov 16 2019, 2:36 PM
yuja committed rHGead7708e6d2f: typing: fix forward reference in _Tlocalstr type bound.
typing: fix forward reference in _Tlocalstr type bound
Nov 16 2019, 2:36 PM
yuja committed rHGa16531574e12: typing: fix argument type of encoding.tolocal() and .fromutf8b().
typing: fix argument type of encoding.tolocal() and .fromutf8b()
Nov 16 2019, 2:36 PM
yuja committed rHG98a4447cdcb8: encoding: make getcols() raise exception explicitly.
encoding: make getcols() raise exception explicitly
Nov 16 2019, 2:36 PM

Nov 15 2019

yuja committed rHG32048206e7be: merge with stable.
merge with stable
Nov 15 2019, 8:24 AM

Nov 14 2019

yuja added a comment to D7380: encoding: define per-use identity functions only in typechecking mode.

# type: Callable[[str], bytes] might work. pytype complained
# type: ... -> ... is an invalid type comment.

Nov 14 2019, 9:31 AM
yuja added a comment to D7256: repoview: define filteredchangelog as a top-level (non-local) class.
> And we might need a class cache like _filteredrepotypes to work around
> leaks of dynamically-created types.
It seems like there's some caching in `_clcache` already. Maybe that's enough?
Nov 14 2019, 8:51 AM

Nov 11 2019

yuja committed rHGa80d5ddecc2d: bookmarks: accept explicit -r 'wdir()' when adding new bookmarks (issue6218).
bookmarks: accept explicit -r 'wdir()' when adding new bookmarks (issue6218)
Nov 11 2019, 11:12 AM
yuja committed rHGfe2e0d100187: bookmarks: use changectx instead of remembering hex of hidden revision.
bookmarks: use changectx instead of remembering hex of hidden revision
Nov 11 2019, 11:12 AM
yuja committed rHG1c91576b88bb: bookmarks: resolve target revision out of the bookmarks loop.
bookmarks: resolve target revision out of the bookmarks loop
Nov 11 2019, 11:12 AM
yuja committed rHG2a8cd7edf409: bookmarks: fix handling of multiple bookmarks with one to be deactivated.
bookmarks: fix handling of multiple bookmarks with one to be deactivated
Nov 11 2019, 11:12 AM
yuja committed rHG0ad5d6c4bfad: import-checker: allow 'from typing import ...'.
import-checker: allow 'from typing import ...'
Nov 11 2019, 11:12 AM

Nov 10 2019

yuja added a comment to D7312: revlog: introduce an explicit NodeMap class for pure code.

+class NodeMap(dict):
+ def missing(self, x):
+ raise error.RevlogError('unknown node: %s' % x)

Nov 10 2019, 4:45 AM
yuja added a comment to D7313: revlog: move the nodemap into the index object (for pure).

@@ -662,29 +665,10 @@

except TypeError:
    raise
except error.RevlogError:
  • if not isinstance(self._nodecache, revlogutils.NodeMap):
  • # parsers.c radix tree lookup failed
  • if node == wdirid or node in wdirfilenodeids:
  • raise error.WdirUnsupported
  • raise error.LookupError(node, self.indexfile, _(b'no node'))
  • else:
  • # pure python cache lookup failed
  • n = self._nodecache
  • i = self.index
  • p = self._nodepos
  • if p is None:
  • p = len(i) - 1
  • else:
  • assert p < len(i)
  • for r in pycompat.xrange(p, -1, -1):
  • v = i[r][7]
  • n[v] = r
  • if v == node:
  • self._nodepos = r - 1
  • return r
  • if node == wdirid or node in wdirfilenodeids:
  • raise error.WdirUnsupported
  • raise error.LookupError(node, self.indexfile, _(b'no node'))

+ # parsers.c radix tree lookup failed
+ if node == wdirid or node in wdirfilenodeids:
+ raise error.WdirUnsupported
+ raise error.LookupError(node, self.indexfile, _(b'no node'))

Nov 10 2019, 4:36 AM

Nov 8 2019

yuja added a comment to D7258: makefile: use Python 3 by default outside of Windows (BC).
ifeq ($(shell uname -o), Msys)
PYTHON?=py -2
else
PYTHON?=python3
endif
Nov 8 2019, 9:54 AM
yuja committed rHGdaade078f1f0: merge with stable.
merge with stable
Nov 8 2019, 9:40 AM
yuja added a comment to D7256: repoview: define filteredchangelog as a top-level (non-local) class.

Nit: maybe this can be just class filteredchangelog(...): pass since
we don't name the type dynamically.

Nov 8 2019, 9:31 AM
yuja added a comment to D7267: encoding: define local identify functions with explicit type comments.
  • a/mercurial/encoding.py

+++ b/mercurial/encoding.py
@@ -241,8 +241,15 @@

strfromlocal = unifromlocal
strmethod = unimethod

else:

  • strtolocal = pycompat.identity
  • strfromlocal = pycompat.identity

+
+ def strtolocal(s):
+ # type: (str) -> bytes
+ return s
+
+ def strfromlocal(s):
+ # type: (bytes) -> str
+ return s

Nov 8 2019, 9:11 AM

Nov 6 2019

yuja added a comment to D7178: [RFC] rust-matchers: add `Matcher` trait and implement `AlwaysMatcher`.

+pub trait Matcher {
+ /// Explicitly listed files
+ fn file_set(&self) -> HashSet<&HgPath>;

Nov 6 2019, 7:16 AM

Nov 5 2019

yuja committed rHGca3dca416f8d: py3: add inline comment about encoding issue of str(Abort()).
py3: add inline comment about encoding issue of str(Abort())
Nov 5 2019, 11:22 AM
yuja committed rHG822202e72f69: py3: do not reimplement Abort.__str__() on Python 2.
py3: do not reimplement Abort.__str__() on Python 2
Nov 5 2019, 11:22 AM

Nov 1 2019

yuja added a comment to D7183: py3: render message about conflicts in chistedit code.
if len(conflicts) > 0:
  • conflictstr = b','.join(map(lambda r: str(r.ctx), conflicts))

+ conflictstr = b','.join(map(lambda r: r.ctx.hex(), conflicts))

Nov 1 2019, 10:41 PM
yuja added a comment to D7181: py3: make chistedit render.

+ return b"#%s %s %d:%s %s" % ((b'%d' % self.origpos).ljust(2),
+ action.ljust(6), r, h, desc)
+
+ bytes = str

Nov 1 2019, 9:35 AM

Oct 30 2019

yuja committed rHG1a0d419ec763: py3: fix patchbomb to accept non-ASCII header value for email preview.
py3: fix patchbomb to accept non-ASCII header value for email preview
Oct 30 2019, 4:21 PM
yuja committed rHGa71578ec6257: config: add support for defaultvalue of list of printable elements.
config: add support for defaultvalue of list of printable elements
Oct 30 2019, 4:21 PM
yuja committed rHG7e20b705da5b: formatter: fix handling of None value in templater mapping.
formatter: fix handling of None value in templater mapping
Oct 30 2019, 4:21 PM
yuja committed rHG242ad45b60b3: config: fix -Tjson to not crash due to unsupported defaultvalue types.
config: fix -Tjson to not crash due to unsupported defaultvalue types
Oct 30 2019, 4:21 PM
yuja committed rHG91c746a77fa3: py3: leverage pycompat.long.
py3: leverage pycompat.long
Oct 30 2019, 4:21 PM

Oct 21 2019

yuja committed rHG21a1b2094649: rust-cpython: run cargo fmt.
rust-cpython: run cargo fmt
Oct 21 2019, 12:14 PM
yuja committed rHG8418b77132c1: rust-cpython: remove useless PyResult<> from leak_immutable().
rust-cpython: remove useless PyResult<> from leak_immutable()
Oct 21 2019, 12:14 PM
yuja committed rHG8d5489b048b7: py3: enable legacy fs encoding to fix filename compatibility on Windows.
py3: enable legacy fs encoding to fix filename compatibility on Windows
Oct 21 2019, 12:14 PM
yuja committed rHG75b4eb98ad97: rust-cpython: remove useless PyRefMut wrapper.
rust-cpython: remove useless PyRefMut wrapper
Oct 21 2019, 12:14 PM
yuja committed rHGb7ab3a0a9e57: rust-cpython: leverage RefCell::borrow() to guarantee there's no mutable ref.
rust-cpython: leverage RefCell::borrow() to guarantee there's no mutable ref
Oct 21 2019, 12:14 PM
yuja committed rHG6c0e47874217: rust-cpython: drop manual management of mutably_borrowed.
rust-cpython: drop manual management of mutably_borrowed
Oct 21 2019, 12:14 PM
yuja committed rHG6f9f15a476a4: rust-cpython: remove useless Option<$leaked> from py_shared_iterator.
rust-cpython: remove useless Option<$leaked> from py_shared_iterator
Oct 21 2019, 12:14 PM
yuja committed rHGed50f2c31a4c: rust-cpython: allow mutation unless leaked reference is borrowed.
rust-cpython: allow mutation unless leaked reference is borrowed
Oct 21 2019, 12:14 PM
yuja committed rHG0836efe4967b: rust-cpython: add generation counter to leaked reference.
rust-cpython: add generation counter to leaked reference
Oct 21 2019, 12:13 PM
yuja committed rHG945d4dba5e78: rust-cpython: add stub wrapper that'll prevent leaked data from being mutated.
rust-cpython: add stub wrapper that'll prevent leaked data from being mutated
Oct 21 2019, 12:13 PM
yuja committed rHGb9f791090211: rust-cpython: rename PyLeakedRef to PyLeaked.
rust-cpython: rename PyLeakedRef to PyLeaked
Oct 21 2019, 12:13 PM

Oct 19 2019

yuja added a comment to D7135: copies: filter out file already in parent in duplicatecopies().
  • a/tests/test-issue1175.t

+++ b/tests/test-issue1175.t
@@ -82,7 +82,6 @@

continue: hg graft --continue
$ hg graft --continue
grafting 1:5974126fad84 "b1"
  • warning: can't find ancestor for 'b' copied from 'a'! $ hg log -f b -T 'changeset: {rev}:{node|short}\nsummary: {desc}\n\n' changeset: 3:376d30ccffc0 summary: b1
Oct 19 2019, 1:09 AM

Oct 18 2019

yuja committed rHG8d432d3a2d7c: rust-cpython: prepare for writing tests that require libpython.
rust-cpython: prepare for writing tests that require libpython
Oct 18 2019, 2:36 PM
yuja committed rHG434d7a3e92e3: rust-cpython: make inner functions and structs of ref_sharing private.
rust-cpython: make inner functions and structs of ref_sharing private
Oct 18 2019, 2:36 PM
yuja committed rHG0df8312463ae: rust-cpython: keep Python<'a> token in PyRefMut.
rust-cpython: keep Python<'a> token in PyRefMut
Oct 18 2019, 2:36 PM
yuja committed rHGf8c114f20d2d: rust-cpython: require GIL to borrow immutable reference from PySharedRefCell.
rust-cpython: require GIL to borrow immutable reference from PySharedRefCell
Oct 18 2019, 2:36 PM
yuja committed rHGffc1fbd7d1f5: rust-cpython: make PyLeakedRef operations relatively safe.
rust-cpython: make PyLeakedRef operations relatively safe
Oct 18 2019, 2:36 PM
yuja committed rHGce6dd1cee4c8: rust-cpython: put leaked reference in PyLeakedRef.
rust-cpython: put leaked reference in PyLeakedRef
Oct 18 2019, 2:36 PM
yuja added a comment to D7133: run-tests: make code coverage work on Python 3.

Fixed some os.environb and queued, thanks.

Oct 18 2019, 8:40 AM
yuja added a comment to D7118: rust-dirstatemap: remove additional lookups in traverse.
>> +++ b/mercurial/dirstate.py
>> @@ -919,6 +919,9 @@
>>
>>   matchalways = match.always()
>>   matchtdir = match.traversedir
>>   dmap = self._map
>>
>> +        if rustmod is not None:
>> +            dmap = self._map._rustmap
>
> If it's the same trick, can't it be abstracted away? `if rustmod` seems weird.
The main issue I faced is that Python classes built from `rust-cpython` cannot be subclassed, so we have to resort to an additional level of indirection. IIRC, the main reason was that there was no way of enforcing a subclass to call `super()` which would result in the Rust class not being initialized properly. Or maybe I'm missing the point?
Oct 18 2019, 8:40 AM