Page MenuHomePhabricator

yuja (Yuya Nishihara)
User

Projects

User Details

User Since
Jun 29 2017, 11:25 AM (128 w, 19 h)

Recent Activity

Yesterday

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?
Thu, Dec 12, 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.
Thu, Dec 12, 9:07 AM

Fri, Dec 6

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
+ )

Fri, Dec 6, 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.
Fri, Dec 6, 10:57 PM

Tue, Dec 3

yuja committed rHGb5f183eedd98: status: fix default value of status struct.
status: fix default value of status struct
Tue, Dec 3, 10:59 AM
yuja committed rHGfaa8a59f4a06: graphlog: change state dict to attr struct.
graphlog: change state dict to attr struct
Tue, Dec 3, 10:59 AM
yuja committed rHG064c9a4ced4a: typing: fix return type of logcmdutil.getrevs().
typing: fix return type of logcmdutil.getrevs()
Tue, Dec 3, 10:59 AM
yuja committed rHGf79377f24487: rust-cpython: import utils::files::* function at module level.
rust-cpython: import utils::files::* function at module level
Tue, Dec 3, 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
Tue, Dec 3, 10:59 AM
yuja committed rHG7b14d649af1b: typing: consolidate "if not globals():" trick.
typing: consolidate "if not globals():" trick
Tue, Dec 3, 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])):

Tue, Dec 3, 7:56 AM

Fri, Nov 29

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.
Fri, Nov 29, 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
Fri, Nov 29, 9:57 AM

Thu, Nov 28

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.
Thu, Nov 28, 8:14 AM

Wed, Nov 27

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.
Wed, Nov 27, 8:30 AM

Tue, Nov 26

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
Tue, Nov 26, 8:09 AM

Mon, Nov 25

yuja committed rHG7d237fd3b207: status: fix default value of status struct.
status: fix default value of status struct
Mon, Nov 25, 10:28 AM
yuja committed rHGe006f09e77de: graphlog: change state dict to attr struct.
graphlog: change state dict to attr struct
Mon, Nov 25, 10:28 AM
yuja committed rHG47b8ca03c518: typing: consolidate "if not globals():" trick.
typing: consolidate "if not globals():" trick
Mon, Nov 25, 10:28 AM
yuja committed rHGf892089b19a0: typing: fix return type of logcmdutil.getrevs().
typing: fix return type of logcmdutil.getrevs()
Mon, Nov 25, 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
Mon, Nov 25, 10:28 AM
yuja committed rHGba95d137deb6: rust-cpython: import utils::files::* function at module level.
rust-cpython: import utils::files::* function at module level
Mon, Nov 25, 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?
Mon, Nov 25, 8:47 AM

Sun, Nov 24

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?
Sun, Nov 24, 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
Sun, Nov 24, 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)

Sun, Nov 24, 12:16 AM

Sat, Nov 23

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

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

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

Many unhandled results:

Sat, Nov 23, 1:13 AM

Fri, Nov 22

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

Sat, Nov 16

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

Fri, Nov 15

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

Thu, Nov 14

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.

Thu, Nov 14, 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?
Thu, Nov 14, 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
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

Oct 18 2019, 6:47 AM

Oct 17 2019

yuja added a comment to D7105: dirs: reject consecutive slashes in paths.
TBH I'm not sure what's going on there. Perhaps a bad byte/newline sequence in the file?
Oct 17 2019, 7:30 PM

Oct 16 2019

yuja added a comment to D7105: dirs: reject consecutive slashes in paths.

diff --git a/mercurial/cext/dirs.c b/mercurial/cext/dirs.c

  • a/mercurial/cext/dirs.c

+++ b/mercurial/cext/dirs.c
@@ -52,6 +52,7 @@
{

	const char *cpath = PyBytes_AS_STRING(path);
	Py_ssize_t pos = PyBytes_GET_SIZE(path);

+ Py_ssize_t prev_pos = -1;

	PyObject *key = NULL;
	int ret = -1;

@@ -64,6 +65,13 @@

  • locations, the references are known so these violations should go
  • unnoticed. */ while ((pos = _finddir(cpath, pos - 1)) != -1) {

+ if (pos && prev_pos == pos + 1) {

Oct 16 2019, 8:25 AM

Oct 15 2019

yuja committed rHG9fa941faef94: dirs: remove mutable string optimization at all.
dirs: remove mutable string optimization at all
Oct 15 2019, 10:19 AM

Oct 14 2019

yuja added a comment to D7058: rust-dirstate-status: add first Rust implementation of `dirstate.status`.

Just quickly scanned. Not reviewed the core logic.

Oct 14 2019, 11:21 AM
yuja committed rHG649a9601b9e2: rust-cpython: drop direct dependency on python(27|3)_sys.
rust-cpython: drop direct dependency on python(27|3)_sys
Oct 14 2019, 2:35 AM
yuja committed rHG0246bbe1045d: rust-cpython: leverage upstreamed py_capsule_fn!() macro.
rust-cpython: leverage upstreamed py_capsule_fn!() macro
Oct 14 2019, 2:35 AM
yuja committed rHG9bbe08abaf48: rust-cpython: bump cpython crates to 0.3.
rust-cpython: bump cpython crates to 0.3
Oct 14 2019, 2:35 AM
yuja committed rHG88a9930e92e4: rust-cpython: turn inline comments into non-doc comments.
rust-cpython: turn inline comments into non-doc comments
Oct 14 2019, 2:35 AM
yuja committed rHG3fec5244aff1: rust-cpython: fix signature of make_dirstate_tuple().
rust-cpython: fix signature of make_dirstate_tuple()
Oct 14 2019, 2:35 AM
yuja committed rHG1ca3823aeefd: rust-cpython: add wrapper around decapsule_make_dirstate_tuple().
rust-cpython: add wrapper around decapsule_make_dirstate_tuple()
Oct 14 2019, 2:35 AM
yuja committed rHG8b355cbef16d: rust-cpython: mark capsule function as unsafe.
rust-cpython: mark capsule function as unsafe
Oct 14 2019, 2:35 AM
yuja committed rHGf676fc754eb1: rust-cpython: drop direct dependency on python(27|3)_sys.
rust-cpython: drop direct dependency on python(27|3)_sys
Oct 14 2019, 1:55 AM