Page MenuHomePhabricator

yuja (Yuya Nishihara)
User

Projects

User Details

User Since
Jun 29 2017, 11:25 AM (116 w, 1 d)

Recent Activity

Wed, Sep 18

yuja committed rHG2c14bf83b58b: merge with stable.
merge with stable
Wed, Sep 18, 7:02 PM

Mon, Sep 16

yuja created D6859: rust-cpython: mark PySharedState as Sync so &'PySharedState can be Send (RFC).
Mon, Sep 16, 7:27 PM
yuja committed rHG06080afd0565: rust-cpython: add sanity check to PySharedState::decrease_leak_count().
rust-cpython: add sanity check to PySharedState::decrease_leak_count()
Mon, Sep 16, 1:56 PM

Mon, Sep 9

yuja committed rHGa65c4715fb5d: split: use literal syntax to build a set of one element.
split: use literal syntax to build a set of one element
Mon, Sep 9, 11:30 AM
yuja committed rHG74d67c645278: rust-cpython: remove Option<_> from interface of py_shared_iterator.
rust-cpython: remove Option<_> from interface of py_shared_iterator
Mon, Sep 9, 11:30 AM
yuja committed rHG5ccc08d02280: rust-cpython: leverage py_shared_iterator::from_inner() where appropriate.
rust-cpython: leverage py_shared_iterator::from_inner() where appropriate
Mon, Sep 9, 11:30 AM
yuja committed rHGea91a126c803: rust-cpython: rename py_shared_iterator_impl to py_shared_iterator.
rust-cpython: rename py_shared_iterator_impl to py_shared_iterator
Mon, Sep 9, 11:30 AM
yuja committed rHG67853749961b: rust-cpython: replace dyn Iterator<..> of mapping with concrete type.
rust-cpython: replace dyn Iterator<..> of mapping with concrete type
Mon, Sep 9, 11:30 AM
yuja committed rHG706104dcb2c8: rust-cpython: replace dyn Iterator<..> of sequence with concrete type.
rust-cpython: replace dyn Iterator<..> of sequence with concrete type
Mon, Sep 9, 11:30 AM
yuja committed rHG7083ac37314f: rust-dirstate: provide CopyMapIter and StateMapIter types.
rust-dirstate: provide CopyMapIter and StateMapIter types
Mon, Sep 9, 11:30 AM
yuja committed rHGa03a29462c0a: rust-dirstate: specify concrete return type of DirsMultiset::iter().
rust-dirstate: specify concrete return type of DirsMultiset::iter()
Mon, Sep 9, 11:30 AM

Thu, Sep 5

yuja added a comment to D6782: py3: use pycompat.sysargv[0] for instead of fsencode(sys.argv[0]).

@@ -245,8 +245,11 @@

    pycompat.fsencode(getattr(mainmod, '__file__', ''))) == 'hg'):
    _sethgexecutable(pycompat.fsencode(mainmod.__file__))
else:
  • exe = findexe('hg') or os.path.basename(sys.argv[0])
  • _sethgexecutable(pycompat.fsencode(exe))

+ exe = findexe('hg')
+ if exe:
+ _sethgexecutable(pycompat.fsencode(exe))
+ else:
+ _sethgexecutable(os.path.basename(pycompat.sysargv[0]))

Thu, Sep 5, 7:20 PM
yuja committed rHG64e28b891796: rust-cpython: mark unsafe functions as such.
rust-cpython: mark unsafe functions as such
Thu, Sep 5, 2:57 PM
yuja committed rHG8f549c46bc64: rust-cpython: pair leaked reference with its manager object.
rust-cpython: pair leaked reference with its manager object
Thu, Sep 5, 2:57 PM
yuja committed rHG8db8fa1de2ef: rust-cpython: introduce restricted variant of RefCell.
rust-cpython: introduce restricted variant of RefCell
Thu, Sep 5, 2:57 PM
yuja committed rHG01d3ce3281cf: rust-cpython: fix unsafe inner(py).borrow_mut() calls.
rust-cpython: fix unsafe inner(py).borrow_mut() calls
Thu, Sep 5, 2:57 PM

Sun, Sep 1

yuja added a comment to D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths.
> @kevincox said "it would be good to [...] add a debug_assert! on
> creation/modification to check that everything is as expected."
> IIUC, his idea is that the `debug_assert!()` condition must always be met,
> which is the guarantee that the HgPath type provides. In order to ensure
> that, we'll have to validate all paths read from dirstate, for example,
> prior to casting to HgPath type. Otherwise `debug_assert!()` would fail,
> meaning the implementation had a bug.
> So, my question is, do we really need such strong guarantee by default?
I indeed do not think we do, for the reasons I gave in my previous comment.
Sun, Sep 1, 9:25 AM

Sat, Aug 31

yuja committed rHGce6797ef6eab: rust: apply more formatting fixes.
rust: apply more formatting fixes
Sat, Aug 31, 11:10 PM
yuja added a comment to D6756: rust-utils: add normalize_case util to mirror Python one.

+/ TODO improve handling of utf8 file names. Our overall strategy for
+
/ filenames has to be revisited anyway, since Windows is UTF-16.
+pub fn normalize_case(bytes: &[u8]) -> Vec<u8> {
+ #[cfg(windows)] // NTFS compares via upper()
+ return bytes.to_ascii_uppercase();
+ #[cfg(unix)]
+ bytes.to_ascii_lowercase()
+}

Sat, Aug 31, 11:02 PM
yuja added a comment to D6775: py3: convert hg executable path to bytes in missing case in procutil.
  • a/mercurial/utils/procutil.py

+++ b/mercurial/utils/procutil.py
@@ -246,7 +246,7 @@

    _sethgexecutable(pycompat.fsencode(mainmod.__file__))
else:
    exe = findexe('hg') or os.path.basename(sys.argv[0])
  • _sethgexecutable(exe)

+ _sethgexecutable(pycompat.fsencode(exe))

Sat, Aug 31, 11:02 PM
yuja added a comment to D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths.
> I found `std::path::Path` has a well-written inline comment about
> the unsafe pointer cast. Let's copy it so we won't introduce a
> memory issue.
I'm not 100% sure which comment you're referring to, sorry.
Sat, Aug 31, 10:17 PM
yuja committed rHGae7eb674573f: rust: apply more formatting fixes.
rust: apply more formatting fixes
Sat, Aug 31, 6:59 PM
yuja added a comment to D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths.

(resend to get around Phabricator's bad email processing)

Sat, Aug 31, 8:20 AM
yuja added a comment to D6773: rust-hgpath: add HgPath and HgPathBuf structs to encapsulate handling of paths.

+#[derive(Eq, Ord, PartialEq, PartialOrd, Debug, Hash)]
+pub struct HgPath {
+ inner: [u8],
+}

Sat, Aug 31, 8:20 AM

Fri, Aug 30

yuja committed rHG10841b9a80c3: merge with stable.
merge with stable
Fri, Aug 30, 10:57 PM

Sun, Aug 25

yuja added a comment to D6704: config: add defaultvalue template keyword.
`hg config -T '{defaultvalue}'` shows a bunch of entries like `<object object at 0x7fc4295c00f0>`, which is clearly not something we want to show the user. Also `hg config -T json` crashes for a similar reason (`mercurial.error.ProgrammingError: cannot encode <object object at 0x7fdd1a6a20f0>`).
Sun, Aug 25, 7:38 PM

Aug 21 2019

yuja committed rHG8ab1ae7f1cf4: rust-dirstate: remove test case for DirsMultiset::new(Manifest, Some).
rust-dirstate: remove test case for DirsMultiset::new(Manifest, Some)
Aug 21 2019, 10:18 AM
yuja committed rHG2e1f74cc3350: rust-dirstate: split DirsMultiset constructor per input type.
rust-dirstate: split DirsMultiset constructor per input type
Aug 21 2019, 10:18 AM
yuja committed rHG1a535313ad1b: rust-dirstate: remove excessive clone() of parameter and return value.
rust-dirstate: remove excessive clone() of parameter and return value
Aug 21 2019, 10:18 AM
yuja committed rHG79561843729a: rust-dirstate: handle invalid length of p1/p2 parameters.
rust-dirstate: handle invalid length of p1/p2 parameters
Aug 21 2019, 10:18 AM
yuja committed rHG5399532510ae: rust: simply use TryInto to convert slice to array.
rust: simply use TryInto to convert slice to array
Aug 21 2019, 10:18 AM
yuja committed rHG99dff4264524: rust-dirstate: use PARENT_SIZE constant where appropriate.
rust-dirstate: use PARENT_SIZE constant where appropriate
Aug 21 2019, 10:18 AM
yuja committed rHG8f0881193946: rust-dirstate: remove repetition in array literal.
rust-dirstate: remove repetition in array literal
Aug 21 2019, 10:18 AM
yuja committed rHG1faa2bed47c6: rust-dirstate: rename NULL_REVISION to NULL_ID which isn't a revision number.
rust-dirstate: rename NULL_REVISION to NULL_ID which isn't a revision number
Aug 21 2019, 10:18 AM
yuja committed rHG8d2d5dfa07f5: rust-dirstate: remove too abstracted way of getting &[u8].
rust-dirstate: remove too abstracted way of getting &[u8]
Aug 21 2019, 10:18 AM
yuja committed rHGcc424cc16704: rust-dirstate: remove unneeded "ref".
rust-dirstate: remove unneeded "ref"
Aug 21 2019, 10:18 AM
yuja committed rHG98901eb12245: rust-parsers: fix unboxing of PyInt on Python 3.
rust-parsers: fix unboxing of PyInt on Python 3
Aug 21 2019, 10:18 AM

Aug 20 2019

yuja committed rHGe94c8f584ee2: py3: do not convert rust module/attribute names to bytes.
py3: do not convert rust module/attribute names to bytes
Aug 20 2019, 12:01 PM
yuja committed rHG0770e221d24b: transplant: unnest --stop case.
transplant: unnest --stop case
Aug 20 2019, 12:01 PM
yuja committed rHG04c3b76fa7a3: rust-discovery: remove useless extern crate.
rust-discovery: remove useless extern crate
Aug 20 2019, 12:01 PM
yuja committed rHG798b7d4b463e: rust-discovery: use while loop instead of match + break.
rust-discovery: use while loop instead of match + break
Aug 20 2019, 12:01 PM

Aug 17 2019

yuja committed rHG9c589dde075f: py3: do not convert rust module/attribute names to bytes.
py3: do not convert rust module/attribute names to bytes
Aug 17 2019, 9:53 AM
yuja committed rHG8c3bbf6f54a0: transplant: unnest --stop case.
transplant: unnest --stop case
Aug 17 2019, 9:53 AM
yuja added a comment to D6631: rust-cpython: add macro for sharing references.

+impl PySharedState {
+ pub fn borrow_mut<'a, T>(
+ &'a self,
+ py: Python<'a>,
+ pyrefmut: RefMut<'a, T>,
+ ) -> PyResult<PyRefMut<'a, T>> {
+ if self.mutably_borrowed.get() {
+ return Err(AlreadyBorrowed::new(
+ py,
+ "Cannot borrow mutably while there exists another \
+ mutable reference in a Python object",
+ ));
+ }
+ match self.leak_count.get() {
+ 0 => {
+ self.mutably_borrowed.replace(true);
+ Ok(PyRefMut::new(py, pyrefmut, self))
+ }
+ TODO
+
For now, this works differently than Python references
+ in the case of iterators.
+
Python does not complain when the data an iterator
+ points to is modified if the iterator is never used
+
afterwards.
+ Here, we are stricter than this by refusing to give a
+
mutable reference if it is already borrowed.
+ While the additional safety might be argued for, it
+
breaks valid programming patterns in Python and we need
+ to fix this issue down the line.
+ _ => Err(AlreadyBorrowed::new(
+ py,
+ "Cannot borrow mutably while there are \
+ immutable references in Python objects",
+ )),
+ }
+ }
+
+
/ Return a reference to the wrapped data with an artificial static
+ / lifetime.
+
/ We need to be protected by the GIL for thread-safety.
+ pub fn leak_immutable<T>(
+ &self,
+ py: Python,
+ data: &RefCell<T>,
+ ) -> PyResult<&'static T> {
+ if self.mutably_borrowed.get() {
+ return Err(AlreadyBorrowed::new(
+ py,
+ "Cannot borrow immutably while there is a \
+ mutable reference in Python objects",
+ ));
+ }
+ let ptr = data.as_ptr();
+ self.leak_count.replace(self.leak_count.get() + 1);
+ unsafe { Ok(&*ptr) }
+ }

Aug 17 2019, 4:43 AM
yuja added a comment to D6632: rust-dirstate: rust implementation of dirstatemap.

+ if let Some(ref mut file_fold_map) = self.file_fold_map {
+ file_fold_map
+ .remove::<Vec<u8>>(filename.to_ascii_uppercase().as_ref());

Aug 17 2019, 3:50 AM
yuja committed rHG88d6a6f7e837: rust-discovery: use while loop instead of match + break.
rust-discovery: use while loop instead of match + break
Aug 17 2019, 2:50 AM
yuja committed rHG2e9b29fa3e80: rust-discovery: remove useless extern crate.
rust-discovery: remove useless extern crate
Aug 17 2019, 2:50 AM
yuja added a comment to D6633: rust-dirstate: rust-cpython bridge for dirstatemap.

+ def getdirs(&self) -> PyResult<Dirs> {
+ TODO don't copy, share the reference
+ self.inner(py).borrow_mut().set_dirs();
+ Dirs::from_inner(
+ py,
+ DirsMultiset::new(
+ DirsIterable::Dirstate(&self.inner(py).borrow()),
+ Some(EntryState::Removed),
+ ),
+ )
+ }
+ def getalldirs(&self) -> PyResult<Dirs> {
+
TODO don't copy, share the reference
+ self.inner(py).borrow_mut().set_all_dirs();
+ Dirs::from_inner(
+ py,
+ DirsMultiset::new(
+ DirsIterable::Dirstate(&self.inner(py).borrow()),
+ None,
+ ),
+ )
+ }

Aug 17 2019, 2:49 AM

Aug 16 2019

yuja committed rHG0e3364c4d306: rust-discovery: use while loop instead of match + break.
rust-discovery: use while loop instead of match + break
Aug 16 2019, 5:16 PM
yuja committed rHGa585cbff23b0: rust-discovery: remove useless extern crate.
rust-discovery: remove useless extern crate
Aug 16 2019, 5:16 PM

Aug 13 2019

yuja committed rHG7013c7ce987f: merge with stable.
merge with stable
Aug 13 2019, 8:46 PM

Aug 7 2019

yuja added a comment to D6712: config: remove pycompat.bytestr() for defaultvalue.

The pycompat.bytestr() was there for py3 compatibility,

Aug 7 2019, 7:46 PM

Aug 4 2019

yuja committed rHG863e9e7f8850: merge with stable.
merge with stable
Aug 4 2019, 8:21 AM

Aug 2 2019

yuja added a comment to D6704: config: add defaultvalue template keyword.

+ def configdefault(self, section, name):
+ """returns the default value of the config item"""
+ item = self._knownconfig.get(section, {}).get(name)
+ itemdefault = None
+ if item is not None:
+ if callable(item.default):
+ itemdefault = item.default()
+ else:
+ itemdefault = item.default
+ return itemdefault

Aug 2 2019, 9:37 AM

Jul 29 2019

yuja added a comment to D6679: unshelve: store information about interactive mode in shelvedstate.

@@ -936,7 +942,7 @@

if opts.get("name"):
    shelved.append(opts["name"])
  • if abortf or continuef and not interactive:

+ if abortf or continuef:

Jul 29 2019, 9:21 AM
yuja committed rHG701341f57ceb: curses: do not setlocale() at import time (issue5261).
curses: do not setlocale() at import time (issue5261)
Jul 29 2019, 6:30 AM

Jul 25 2019

yuja added a comment to D6670: relnotes: empty to prepare for next release.

Might be better to rename next to 5.1, and recreate new next file.
The old next file in stable branch could theoretically be edited and
merged back to default.

Jul 25 2019, 7:28 PM

Jul 22 2019

yuja committed rHG12addcc7956c: rust-filepatterns: unescape comment character property.
rust-filepatterns: unescape comment character property
Jul 22 2019, 2:28 PM
yuja committed rHG0247601869ba: rust-filepatterns: fix type of warnings tuple to (bytes, bytes).
rust-filepatterns: fix type of warnings tuple to (bytes, bytes)
Jul 22 2019, 2:28 PM
yuja committed rHG30f8e786868c: rust-filepatterns: use literal b'#' instead of cast.
rust-filepatterns: use literal b'#' instead of cast
Jul 22 2019, 2:28 PM
yuja committed rHGf78f305454fd: hgignore: add escape syntax test for glob patterns.
hgignore: add escape syntax test for glob patterns
Jul 22 2019, 2:27 PM
yuja committed rHGc67e3f966867: hgignore: add a few more weird patterns to test case.
hgignore: add a few more weird patterns to test case
Jul 22 2019, 2:27 PM
yuja committed rHG24f0023bb8b1: hgignore: update \-escape test to reflect actual behavior.
hgignore: update \-escape test to reflect actual behavior
Jul 22 2019, 2:27 PM

Jul 20 2019

yuja added a comment to D6655: continue: added support for graft.

It looks like pretty much this entire function is copies commands.graft()
and then all this code is left dead here (since cont = True above).
I'd prefer to de-queue this commit and let you clean this up and then
submit a new patch

Jul 20 2019, 3:36 AM

Jul 18 2019

yuja added a comment to D6651: rust-utils: remove buggy assertion.
While this assertion had good intentions, it broke existing behavior with a
nasty panic.
Jul 18 2019, 9:45 AM
yuja added a comment to D6597: rust-2018: switch hg-core and hg-cpython to rust 2018 edition.
I fixed the renames. The amended changeset is available at, bitbucket.org/octobus/mercurial-devel, rev d4bbf54624e14ac2913d452a8a7cb32823227c16. If you want me to send you the patch some other way, please tell me.
Jul 18 2019, 8:51 AM

Jul 17 2019

yuja added a comment to D6597: rust-2018: switch hg-core and hg-cpython to rust 2018 edition.

diff --git a/rust/hg-core/src/utils/mod.rs b/rust/hg-core/src/utils/mod.rs
deleted file mode 100644

Jul 17 2019, 7:32 PM

Jul 15 2019

yuja added a comment to D6641: py3: source-transform only call-sites of iteritems(), not definitions.
  • a/mercurial/__init__.py

+++ b/mercurial/__init__.py
@@ -225,7 +225,9 @@

    1. It changes iteritems/values to items/values as they are not
    2. present in Python 3 world.
  • elif fn in ('iteritems', 'itervalues'):

+ elif (fn in ('iteritems', 'itervalues') and
+ not (tokens[i - 1].type == token.NAME and
+ tokens[i - 1].string == 'def')):

Jul 15 2019, 7:39 PM

Jul 11 2019

yuja added a comment to D6604: copies: follow copies across merge base without source file (issue6163).
We trace copies from the 'modify x' commit to commit 4 by going via
the merge base (commit 0). When tracing file 'y' (_tracefile()) in the
first case, we immediately find the rename from 'x'. We check to see
if 'x' exists in the merge base, which it does, so we consider it a
valid copy. In the second case, 'x' does not exist in the merge base,
so it's not considered a valid copy. As a workaround, this patch makes
it so we also attempt the check in mergecopies's base commit (commit 1
in the second case). That feels pretty ugly to me, but I don't have
any better ideas.
Jul 11 2019, 8:15 PM

Jul 10 2019

yuja committed rHGcad3dde7a573: rust-dirstate: add helper to iterate ancestor paths.
rust-dirstate: add helper to iterate ancestor paths
Jul 10 2019, 9:30 AM

Jul 9 2019

yuja added a comment to D6616: extdata: avoid crashing inside subprocess when we get a revset parse error.
if proc:
  • proc.communicate()

+ try:
+ proc.communicate()
+ except ValueError:
+ # This happens if we started iterating src and then
+ # get a parse error on a line. It should be safe to ignore.
+ pass

Jul 9 2019, 8:18 PM
yuja added a comment to D6556: cleanup: use named constants for second arg to .seek().

@@ -16,6 +16,7 @@
import collections
import contextlib
import errno
+import io
import os
import struct
import zlib
@@ -2306,7 +2307,7 @@

try:
    with self._datafp() as f:
  • f.seek(0, 2)

+ f.seek(0, io.SEEK_END)

Jul 9 2019, 8:10 PM

Jul 8 2019

yuja added a comment to D6594: [ABANDONED] RFC dirstatemap.
> I heard boxing a PyObject has measurable cost,
Do you have a link to any benchmarks? I'd be interested.
Jul 8 2019, 10:16 AM

Jul 7 2019

yuja added a comment to D6594: [ABANDONED] RFC dirstatemap.

sharing references between Rust and Python:
https://raphaelgomes.dev/blog/articles/2019-07-01-sharing-references-between-python-and-rust.html.

Jul 7 2019, 9:52 AM

Jul 5 2019

yuja added a comment to D6593: rust-minor-fixes: remove Deref in favor of explicit methods.
Using `keys()` will change the behavior, as I actually need to expose an `Iter<Vec<u8>, u32>`. Is your issue with the naming?
Jul 5 2019, 10:23 AM
yuja added a comment to D6593: rust-minor-fixes: remove Deref in favor of explicit methods.

+ pub fn contains_key(&self, key: &[u8]) -> bool {
+ self.inner.contains_key(key)
+ }
+
+ pub fn iter(&self) -> Iter<Vec<u8>, u32> {
+ self.inner.iter()
+ }

Jul 5 2019, 8:51 AM

Jul 4 2019

yuja added a comment to D6593: rust-minor-fixes: remove Deref in favor of explicit methods.

impl DirsMultiset {

/// Initializes the multiset from a dirstate or a manifest.
///

@@ -132,6 +123,22 @@

    Ok(())
}

+
+ pub fn contains_key(&self, key: &[u8]) -> bool {
+ self.inner.contains_key(key)
+ }
+
+ pub fn iter(&self) -> Iter<Vec<u8>, u32> {
+ self.inner.iter()
+ }
+
+ pub fn len(&self) -> usize {
+ self.inner.len()
+ }
+
+ pub fn get(&self, key: &[u8]) -> Option<&u32> {
+ self.inner.get(key)
+ }

Jul 4 2019, 8:13 PM
yuja added a comment to D6394: rust-dirstate: add "dirs" rust-cpython binding.
To my eyes, the point of `Deref` is to make the `struct` act as a "fat pointer" from the outer interface code, but maybe this does not really help that much?
Jul 4 2019, 10:48 AM

Jun 30 2019

yuja committed rHG904e0da2e195: merge with stable.
merge with stable
Jun 30 2019, 2:23 AM
yuja added a comment to D6553: shelve: move shelve extension to core.

Need to update extensions._builtin so the shelve "extension" is silently
ignored.

Jun 30 2019, 12:07 AM

Jun 29 2019

yuja added a comment to D6395: rust-dirstate: call new "dirs" rust implementation from Python.
  • a/rust/hg-core/src/dirstate/dirs_multiset.rs

+++ b/rust/hg-core/src/dirstate/dirs_multiset.rs
@@ -118,7 +118,9 @@

    entry.remove();
}
Entry::Vacant(_) => {
  • return Err(DirstateMapError::PathNotFound(path.to_owned()))

+ return Err(DirstateMapError::PathNotFound(
+ path.to_owned(),
+ ))

    }
};
Jun 29 2019, 11:41 PM
yuja added a comment to D6394: rust-dirstate: add "dirs" rust-cpython binding.

+ def contains(&self, item: PyObject) -> PyResult<bool> {
+ Ok(self
+ .dirs_map(py)
+ .borrow()
+ .get(&item.extract::<PyBytes>(py)?.data(py).to_owned())
+ .is_some())

Jun 29 2019, 11:41 PM
yuja added a comment to D6393: rust-dirstate: add "dirs" Rust implementation.

+impl DirsMultiset {
+ / Initializes the multiset from a dirstate or a manifest.
+
/
+ / If skip_state is provided, skips dirstate entries with equal state.
+ pub fn new(iterable: DirsIterable, skip_state: Option<i8>) -> Self {
+ let mut multiset = DirsMultiset {
+ inner: HashMap::new(),
+ };
+
+ match iterable {
+ DirsIterable::Dirstate(vec) => {
+ for (ref filename, DirstateEntry { state, .. }) in vec {
+
This if is optimized out of the loop
+ if let Some(skip) = skip_state {
+ if skip != state {
+ multiset.add_path(filename);
+ }
+ } else {
+ multiset.add_path(filename);
+ }
+ }
+ }
+ DirsIterable::Manifest(vec) => {
+ for ref filename in vec {
+ multiset.add_path(filename);
+ }
+ }
+ }
+
+ multiset
+ }

Jun 29 2019, 11:40 PM

Jun 25 2019

yuja added a comment to D6561: copies: simplify merging of copy dicts on merge commits.
while work:
  • r, i1, copies1 = heapq.heappop(work)

+ r, i1, copies = heapq.heappop(work)

if work and work[0][0] == r:
    # We are tracing copies from both parents
    r, i2, copies2 = heapq.heappop(work)
  • copies = {}
  • allcopies = set(copies1) | set(copies2)
  • for dst in allcopies:

+ for dst, src in copies2.items():

    1. Unlike when copies are stored in the filelog, we consider
    2. it a copy even if the destination already existed on the
    3. other branch. It's simply too expensive to check if the
    4. file existed in the manifest.
  • if dst in copies1:
  • # If it was copied on the p1 side, mark it as copied from

+ if dst not in copies:
+ # If it was copied on the p1 side, leave it as copied from

    1. that side, even if it was also copied on the p2 side.
  • copies[dst] = copies1[dst]
  • else: copies[dst] = copies2[dst]
Jun 25 2019, 7:28 PM

Jun 17 2019

yuja committed rHGa4a468b00d44: rust-filepatterns: silence warning of non_upper_case_globals.
rust-filepatterns: silence warning of non_upper_case_globals
Jun 17 2019, 1:30 PM
yuja committed rHGf305f1d7d559: rust-filepatterns: add comment about Windows path handling.
rust-filepatterns: add comment about Windows path handling
Jun 17 2019, 1:30 PM
yuja committed rHGcc4db4478467: rust: update Cargo.lock to include @generated comment.
rust: update Cargo.lock to include @generated comment
Jun 17 2019, 1:30 PM
yuja committed rHGb6387a65851d: cborutil: fix streamencode() to handle subtypes.
cborutil: fix streamencode() to handle subtypes
Jun 17 2019, 1:30 PM

Jun 11 2019

yuja committed rHGd279e4f453c4: revset: use nullrev constant in merge().
revset: use nullrev constant in merge()
Jun 11 2019, 10:11 AM
yuja committed rHG43c8f72184f4: revset: fix merge() to fall back to changectx API if wdir specified.
revset: fix merge() to fall back to changectx API if wdir specified
Jun 11 2019, 10:11 AM

Jun 8 2019

yuja added a comment to D6499: phabricator: make `hg debugcallconduit` work outside a hg repo.

-@vcrcommand(b'debugcallconduit', [], _(b'METHOD'))
-def debugcallconduit(ui, repo, name):
+@vcrcommand(b'debugcallconduit', [], _(b'METHOD'), norepo=True)
+def debugcallconduit(ui, name):

Jun 8 2019, 9:51 PM

Jun 6 2019

yuja added a comment to D6389: rust-dirstate: create dirstate submodule.

Amended this to reproduce the copy history. No content change.

Jun 6 2019, 7:26 PM

Jun 5 2019

yuja committed rHG69883775b27d: root: add template variables pointing to repository directories.
root: add template variables pointing to repository directories
Jun 5 2019, 8:26 AM
yuja committed rHG9803323048b6: root: add support for -Tformatter option.
root: add support for -Tformatter option
Jun 5 2019, 8:26 AM

May 28 2019

yuja added a comment to D6417: context: get filesadded() and filesremoved() from changeset if configured.
> I can't really comment on the storage format. I'm not keen on using extras
>  for this kind of stuff (including copies), but that seems be okay for
>  experiment.
Do we have a better place for it?
May 28 2019, 7:44 PM

May 26 2019

yuja added a comment to D6369: templatekw: make {file_*} compare to both merge parents (issue4292).

Test failures:

May 26 2019, 7:31 PM
yuja updated subscribers of D6417: context: get filesadded() and filesremoved() from changeset if configured.

I can't really comment on the storage format. I'm not keen on using extras
for this kind of stuff (including copies), but that seems be okay for
experiment.

May 26 2019, 7:31 PM

May 24 2019

yuja added a comment to D6432: match: de-flake test-doctest.py by not depending on util.dirs() order.
> > @@ -1384,26 +1384,26 @@
> > 
> >   >>> _rootsdirsandparents(
> >   ...     [(b'glob', b'g/h/*', b''), (b'glob', b'g/h', b''),
> >   ...      (b'glob', b'g*', b'')])
> > 
> > - (['g/h', 'g/h', ''], [], ['', 'g']) +    (['g/h', 'g/h', ''], [], set(['', 'g']))
>
> Perhaps, this would break py3 doctests. The repr syntax changed.
Good point. However, it turns out they were already broken (b'' prefixes), so I'll leave it for the py3 folks to clean up.
May 24 2019, 8:28 AM

May 22 2019

yuja added a comment to D6432: match: de-flake test-doctest.py by not depending on util.dirs() order.

Perhaps, this would break py3 doctests. The repr syntax changed.

May 22 2019, 7:26 PM

May 20 2019

yuja committed rHGde65ae32b82d: templatekw: change default value of 'requires' to ().
templatekw: change default value of 'requires' to ()
May 20 2019, 11:48 AM