yuja (Yuya Nishihara)
User

Projects

User Details

User Since
Jun 29 2017, 11:25 AM (81 w, 3 d)

Recent Activity

Today

yuja committed rHG13c23396c7fe: rust: add comment about lack of wdirrev handling.
rust: add comment about lack of wdirrev handling
Sun, Jan 20, 12:53 AM
yuja committed rHG66102f6fa10a: templatekw: fix crash on multiple latesttags resolution at wdir (issue6055).
templatekw: fix crash on multiple latesttags resolution at wdir (issue6055)
Sun, Jan 20, 12:53 AM
yuja committed rHGff1222a7d714: test-template-keywords: add test for {latesttag} of wdir() revision.
test-template-keywords: add test for {latesttag} of wdir() revision
Sun, Jan 20, 12:53 AM

Fri, Jan 18

yuja added a comment to D5594: copies: consider nullrev a common ancestor.
There are definitely repositories in the wild where p1 is nullrev (and p2 is not). It's unusual but expressable so, of course, it happened.

For that matters, there is also case with nullrev != p1 && p1 == p2.
Fri, Jan 18, 9:01 AM
yuja added a comment to D5626: scmutil: drop unreachable except clause.
socket.error is a subclass of IOError, which we catch higher up. It
Fri, Jan 18, 7:29 AM
yuja added a comment to D5594: copies: consider nullrev a common ancestor.
I've seen many bugs in the git codebase that were caused by it not
having a null revision and being forced to treat root commits
differently. Mercurial has a null revision and I think it's generally
a bug to treat it differently from other commits in graph algorithms.
Fri, Jan 18, 7:14 AM
yuja committed rHG00b314c42094: revlog: document that mmap resources are released implicitly by GC.
revlog: document that mmap resources are released implicitly by GC
Fri, Jan 18, 4:54 AM
yuja committed rHGcf8677cd7286: ui: proxy protect/restorestdio() calls to update internal flag.
ui: proxy protect/restorestdio() calls to update internal flag
Fri, Jan 18, 4:54 AM
yuja committed rHGb0e3f2d7c143: ui: move protectedstdio() context manager from procutil.
ui: move protectedstdio() context manager from procutil
Fri, Jan 18, 4:54 AM
yuja committed rHG4948b327d3b9: cext: clang-format new code coming from stable branch.
cext: clang-format new code coming from stable branch
Fri, Jan 18, 4:54 AM

Thu, Jan 17

yuja added a comment to D5496: revset: add "samebranch" keyword argument to the merge revset.
> Okay, I didn't notice that. And it's tricky to map `samebranch=False` to
>  "different branch" constraint. I would read it as "I don't care whether
>  the branches are the same or not."
>
> We can instead express it as `merge() - merge(samebranch=True)`.

Do you mean that the flag should only indicate whether you want to hide the same branch merges?
Thu, Jan 17, 9:21 AM
yuja added a comment to D5579: rust: factorized testing Graphs.
@yuja the doc you're linking is about integration tests, so it wouldn't apply to these tests which are really unitary in my mind. Usually the main difference would be the access to the private constructs that the integration tests can't perform, but it's true that most of these implementations are public anyway.
Thu, Jan 17, 9:21 AM
yuja added a comment to D5493: match: support rooted globs in hgignore.

Queued this, many thanks.

Thu, Jan 17, 8:17 AM
yuja added a comment to D5243: resolve: fix mark-check when a file was deleted on one side (issue6020).

Replaced all [[ -f ]] with [ -f ]. `[[]]` requires Bash.

Thu, Jan 17, 8:17 AM

Wed, Jan 16

yuja added a comment to D5493: match: support rooted globs in hgignore.

I haven't handled your other remark,

Wed, Jan 16, 8:24 AM
yuja added a comment to D5496: revset: add "samebranch" keyword argument to the merge revset.
> `[, samebranch]` or [, samebranch=False]`.

I guess that means:

@predicate('merge([withbranch [, samebranch=None]])', safe=True)

Right? (I realized that it is incorrect to say that samebranch's default value is False).
Wed, Jan 16, 8:10 AM
yuja added a comment to D5579: rust: factorized testing Graphs.

Queued the series, thanks.

Wed, Jan 16, 7:42 AM
yuja added a comment to D5510: narrow: reuse narrowspec.updateworkingcopy() when widening.

Fixed pyflakes warnings in flight.

Wed, Jan 16, 7:42 AM

Mon, Jan 14

yuja added a comment to D5495: revset: add "branch" positional arguments to the merge revset.
What about making the argument a revset instead of a branch name. You can get the same result `merge(branch("foo")` but have a more expressive result `merge(only(4.8, 4.7))` ?
Mon, Jan 14, 8:30 AM

Sun, Jan 13

yuja added a comment to D5490: commit: remove ignore whitespace option on --interactive (issue6042).
> `_performrevert()` would be in the same boat, but it was explicitly flagged on
>  at https://phab.mercurial-scm.org/rHGf37a69ec3f4717fdb4f00699ca06c225f106696c. This implies that the `diff.ignorews` option would be used
>  in practice to exclude whitespace changes while interactive commit/revert.
>  So disabling any whitespace options would break someone's workflow.

I'm confused after this comment. How do you want me to move forward?
Sun, Jan 13, 10:58 PM
yuja added a comment to D5495: revset: add "branch" positional arguments to the merge revset.

Generally looks good.

Sun, Jan 13, 10:11 PM
yuja added a comment to D5496: revset: add "samebranch" keyword argument to the merge revset.
withbranch = ''
if 'withbranch' in args:
    withbranch = getstring(args['withbranch'],
                           _('withbranch argument must be a string'))
    kind, branchname, branchmatcher = stringutil.stringmatcher(withbranch)

+ samebranch = None
+ if 'samebranch' in args:
+ # i18n: "samebranch" is a keyword
+ samebranch = getboolean(args['samebranch'],
+ _('samebranch argument must be a True or False'))

cl = repo.changelog
# create the function that will be used to filter the subset
if withbranch:
    # matchfn is a function that returns true when a revision
    # is a merge and the second parent belongs to a branch that
    # matches the withbranch pattern (which can be a literal or a regex)
    if kind == 'literal':
  • matchfn = lambda r: (cl.parentrevs(r)[1] != -1
  • and repo[r].p2().branch() == withbranch) + basematchfn = lambda r: (cl.parentrevs(r)[1] != -1 + and repo[r].p2().branch() == withbranch) else:
  • matchfn = lambda r: (cl.parentrevs(r)[1] != -1
  • and branchmatcher(repo[r].p2().branch()))
  • else:
  • # matchfn is a function that returns true when a revision is a merge
  • matchfn = lambda r: cl.parentrevs(r)[1] != -1 + basematchfn = lambda r: (cl.parentrevs(r)[1] != -1 + and branchmatcher(repo[r].p2().branch())) + else: + basematchfn = lambda r: cl.parentrevs(r)[1] != -1 + if samebranch is None: + matchfn = basematchfn + else: + # if samebranch was specified, build a new match function + # that on top of basematch checks if the parents belong (or not) + # to the same branch (depending on the value of samebranch) + def matchfn(r): + c = repo[r] + if not basematchfn(r): + return False + issamebranchmerge = c.p1().branch() == c.p2().branch() + return issamebranchmerge if samebranch else not issamebranchmerge
Sun, Jan 13, 10:11 PM
yuja added a comment to D5554: histedit: added rewrite.update-timestamp to fold and mess.

Queued with minor modifications, thanks.

Sun, Jan 13, 7:14 AM
yuja committed rHG240f8e49a7bd: histedit: remove trailing space from warning message.
histedit: remove trailing space from warning message
Sun, Jan 13, 2:53 AM
yuja committed rHG57bece69d7be: histedit: fix weird indent of i18n text.
histedit: fix weird indent of i18n text
Sun, Jan 13, 2:53 AM
yuja committed rHGb223fc1c6b4c: progress: change _updatebar() to take parameters as arguments.
progress: change _updatebar() to take parameters as arguments
Sun, Jan 13, 2:50 AM
yuja committed rHG929999d963b8: progress: specify updatebar() function by constructor argument.
progress: specify updatebar() function by constructor argument
Sun, Jan 13, 2:50 AM
yuja committed rHGd9eda1c6dfca: archival: construct progress helper through ui.makeprogress().
archival: construct progress helper through ui.makeprogress()
Sun, Jan 13, 2:50 AM
yuja committed rHG25cec00b333c: help: document rewrite.backup-bundle option.
help: document rewrite.backup-bundle option
Sun, Jan 13, 2:42 AM
yuja committed rHG6acbe86c6490: repair: move ui.history-editing-backup to [rewrite] section.
repair: move ui.history-editing-backup to [rewrite] section
Sun, Jan 13, 2:42 AM

Sat, Jan 12

yuja added a comment to D5559: revlog: always process opener options.
I'm not sure when ``opener.options`` would ever be explicitly
set to None. It is definitely not possible to construct a repo
this way because ``localrepo.resolvestorevfsoptions()`` always
returns a dict and ``localrepo.makelocalrepository()`` always
sets ``opener.options`` to this value.

Because we always execute this code now, if options are empty
we defaulted to creating version 0 revlogs. So we had to change
the code slightly to fall back to the default revlog version
and flags.

As astute reader will note that it is not possible to create
version 0 revlogs now. However, I don't think it was possible
before, as this required ``opener.options`` being unset, which
I don't think was possible. I suspect this means our test
coverage for version 0 revlog repositories is possibly
non-existent! Since I don't see a config option to disable
revlog v1, I'm not even sure if we had a way to create new
repos with version 0 revlogs! Who knows.
Sat, Jan 12, 10:25 PM
yuja added a comment to D5564: revlog: use separate variables to track version flags.

Queued up to this, thanks.

Sat, Jan 12, 10:24 PM
yuja added a comment to D5561: revlog: always enable generaldelta on version 2 revlogs.
  • if self._initempty:
  • # changelogs don't benefit from generaldelta + if self._initempty and (self.version & 0xFFFF == revlog.REVLOGV1): + # changelogs don't benefit from generaldelta.
Sat, Jan 12, 10:24 PM
yuja added a comment to D5490: commit: remove ignore whitespace option on --interactive (issue6042).
> It was intentionally added by https://phab.mercurial-scm.org/rHG3f1dccea9510c122cf9ab0e7a5a19ceed3600a7f (with no tests.)

Do you want me to add tests for that?  If yes, please mention the things I need to take care of on
 writing those tests.
Sat, Jan 12, 9:10 PM
yuja added a comment to D5570: hg-docker: fix Python 3.4 compatibility (for CentOS 7).

+ if p.returncode:
+ raise Exception('failed to build docker image: %s %s' % (p.stdout, p.stderr))

Sat, Jan 12, 8:56 PM
yuja added a comment to D5490: commit: remove ignore whitespace option on --interactive (issue6042).
  • a/mercurial/cmdutil.py +++ b/mercurial/cmdutil.py @@ -237,6 +237,7 @@ def dorecord(ui, repo, commitfunc, cmdsuggest, backupall, filterfn, *pats, **opts): opts = pycompat.byteskwargs(opts) + ignorews = opts.get('ignorews', False)
Sat, Jan 12, 8:55 PM
yuja added a comment to D5554: histedit: added rewrite.update-timestamp to fold and mess.

+ $ cat >> testmocks.py << EOF
+ > # mock out util.makedate() to supply testable values
+ > import os
+ > from mercurial import pycompat, util
+ > from mercurial.utils import dateutil
+ >
+ > def mockmakedate():
+ > filename = os.path.join(os.environ['TESTTMP'], 'testtime')
+ > try:
+ > with open(filename, 'rb') as timef:
+ > time = float(timef.read()) + 1
+ > except IOError:
+ > time = 0.0
+ > with open(filename, 'wb') as timef:
+ > timef.write(pycompat.bytestr(time))
+ > return (time, 0)
+ >
+ > dateutil.makedate = mockmakedate
+ > EOF

Sat, Jan 12, 8:55 PM
yuja added a comment to D5552: tests: add test for warning on histedit with tagged commits.

Removed these lines. The extension is enabled at the beginning.

Sat, Jan 12, 8:55 PM

Fri, Jan 11

yuja added a comment to D5480: tests: show that debugrebuilddirstate is broken with narrow+sparse.

+ $ hg debugrebuilddirstate
+ unknown exception encountered, please report by visiting
+
https://mercurial-scm.org/wiki/BugTracker
+ Python 2.7.12 (default, Nov 12 2018, 14:36:49) [GCC 5.4.0 20160609]
+
Mercurial Distributed SCM (version 4.8.1+588-479a5ea51ccc+20181224)
+ ** Extensions loaded: narrow, sparse
+ Traceback (most recent call last):
+ File "/place/vartmp/hgtests.zMelCK/install/bin/hg", line 43, in <module>
+ dispatch.run()

Fri, Jan 11, 10:05 PM
yuja added a comment to D5532: context: schedule file prefetch before comparing for cleanliness.

Perhaps scmutil.matchfiles() can be used instead of the low-level constructor.

Fri, Jan 11, 10:05 PM
yuja added a comment to D5495: revset: add "branch" positional arguments to the merge revset.
This would not make it possible to select multiple "merged with" branches by doing: hg log -r "merge(feature1, feature2)"
Instead I guess you are proposing that for that use case we force the user to do: hg log -r "merge('re:(feature1|feature2)')

Did I understand you correctly?
Fri, Jan 11, 9:23 PM
yuja updated subscribers of D5551: rust-cpython: using MissingAncestors from Python code.

+ bases = self._common.bases
+ if callable(bases):
+ # This happens for Rust exported object, and we don't know
+ # at the moment how to make an equivalent of property for them
+ bases = bases()
+

    1. The presence of nullrev will confuse heads(). So filter it out. return set(self._repo.revs('heads(%ld)',
  • self._common.bases - {nullrev})) + (r for r in bases if r != nullrev)))
Fri, Jan 11, 9:10 AM
yuja added a comment to D5550: rust-cpython: bindings for MissingAncestors.

Queued up to this patch, thanks.

Fri, Jan 11, 9:10 AM
yuja added a comment to D5490: commit: remove ignore whitespace option on --interactive (issue6042).

Sorry for late, but doesn't it break hg record --ignore-all-space, etc.?
It was intentionally added by 3f1dccea9510 (with no tests.)

Fri, Jan 11, 7:51 AM

Thu, Jan 10

yuja committed rHG08dd462ea782: graft: abort if --date/user specified with --currentdate/currentuser (BC).
graft: abort if --date/user specified with --currentdate/currentuser (BC)
Thu, Jan 10, 9:24 AM
yuja committed rHG4145fd3569c3: amend: turn currentdate into tri-state bool so config option can be negated.
amend: turn currentdate into tri-state bool so config option can be negated
Thu, Jan 10, 9:24 AM
yuja added a comment to D5495: revset: add "branch" positional arguments to the merge revset.
I think it would be a good idea to make the "branch" arguments more flexible. One option could be to use a stringmatcher to add support for regular expressions as you suggest. I can look into that. However there may be some other options worth exploring. The one you suggest is very interesting although I find the syntax a bit complicated for the common use cases that I want to enable which are:

1. Ignore merges from the same branch, which in a named-branch based branching strategy are usually irrelevant
2. Look into merges with a specific branch (e.g. which branches have been merged with the default branch)?

In my experience those two are the ones that are the most common and I think we should try to make the easy to use. That is, I think that even if mercurial had a filter function like the one you propose I would still want to be able to express those 2 common merge properties in a simple way.
Thu, Jan 10, 8:16 AM
yuja added a comment to D5543: histedit: crashing with a more useful error message on empty defaultrev.

Queued for stable, thanks.

Thu, Jan 10, 6:23 AM

Wed, Jan 9

yuja added a comment to D5503: vfs: add support for repo names with `$` when using with env vars (issue5739).
> This is logically incorrect. The problem is that we're doing variable
>  expansion at too lower layer. `vfs(expand(user_specified_path))` makes
>  some sense, but `vfs(expand(getcwd()))` is clearly wrong. And the vfs class
>  can't know where the `base` comes from.

If I add a condition for expanding env var if present in `hgrc`, can this work as a fix?
Wed, Jan 9, 9:12 AM
yuja updated subscribers of D5493: match: support rooted globs in hgignore.
The code already supports this but there is no syntax to make use of
it, so it seems reasonable to create such syntax. I create a new
hgignore syntax "rootedglob". There might be a better name, but
"rooted" is the terminology in use in user-facing documentation.
Wed, Jan 9, 8:50 AM

Mon, Jan 7

yuja committed rHG17a195676472: rust-ancestors: adjust branches and inline comments per previous change.
rust-ancestors: adjust branches and inline comments per previous change
Mon, Jan 7, 9:16 PM
yuja committed rHGa1b3800c8a19: rust-ancestors: remove unreachable conditions from missing_ancestors().
rust-ancestors: remove unreachable conditions from missing_ancestors()
Mon, Jan 7, 9:16 PM
yuja committed rHG55dc1da8df2f: rust-ancestors: duplicate loop that visits parents of revs/bases.
rust-ancestors: duplicate loop that visits parents of revs/bases
Mon, Jan 7, 9:16 PM
yuja committed rHG486908e691be: rust-ancestors: adjust indent level to make next change easier to follow.
rust-ancestors: adjust indent level to make next change easier to follow
Mon, Jan 7, 9:16 PM
yuja committed rHGd43719bd01f0: rust-cpython: remove invalid __package__ attribute.
rust-cpython: remove invalid __package__ attribute
Mon, Jan 7, 9:16 PM
yuja committed rHG126101284e04: amend: add -D/--currentdate option.
amend: add -D/--currentdate option
Mon, Jan 7, 9:33 AM
yuja committed rHGcffa8e0ba77a: amend: add boolean to ignore date-only change.
amend: add boolean to ignore date-only change
Mon, Jan 7, 9:33 AM
yuja committed rHGb153a4aa06f8: amend: refactor commit date handling.
amend: refactor commit date handling
Mon, Jan 7, 9:33 AM
yuja committed rHG14271b524d76: test-amend: remove uninteresting fields from log output to deduplicate tests.
test-amend: remove uninteresting fields from log output to deduplicate tests
Mon, Jan 7, 9:33 AM
yuja added a comment to D5495: revset: add "branch" positional arguments to the merge revset.

+@predicate('merge(*withbranch)', safe=True)

def merge(repo, subset, x):
  • """Changeset is a merge changeset. + """Changeset is a merge changeset + + All merge revisions are returned by default. If one or more "withbranch" + names are provided only merges with those branches (i.e. whose + second parent belongs to one of those branches) will be returned.
Mon, Jan 7, 9:17 AM
yuja added a comment to D5503: vfs: add support for repo names with `$` when using with env vars (issue5739).
def __init__(self, base, audit=True, cacheaudited=False, expandpath=False,
             realpath=False):

+ if '$' in base and os.path.isdir(base):
+ # when there exists a repo '$foo' and an env var foo=bar, stop
+ # expanding path. refer issue5739.
+ expandpath = False

Mon, Jan 7, 8:32 AM

Sat, Jan 5

yuja added a comment to D5489: histedit: add warning message on editing tagged commits (issue4017).

> mharbison72 wrote in histedit.py:1707
> Out of curiosity, why the sleep?

Otherwise, the user won't be able to see the warning as the editor opens for histedit.

Sat, Jan 5, 9:14 PM
yuja committed rHG481249481392: match: fix assertion for fileset with no context (issue6046).
match: fix assertion for fileset with no context (issue6046)
Sat, Jan 5, 4:04 AM

Thu, Jan 3

yuja committed rHG3e2c02836420: transaction: do not overwrite atomic-temp files on error.
transaction: do not overwrite atomic-temp files on error
Thu, Jan 3, 6:16 PM
yuja closed D5451: rust: use 'impl Trait' in method argument of AncestorsIterator.
Thu, Jan 3, 5:54 PM
yuja committed rHG35ee590b1892: rust: use 'impl Trait' in method argument of AncestorsIterator.
rust: use 'impl Trait' in method argument of AncestorsIterator
Thu, Jan 3, 5:53 PM
yuja closed D5450: rust: use .rev() for reverse range.
Thu, Jan 3, 5:53 PM
yuja committed rHG247f51cfc668: rust: use .rev() for reverse range.
rust: use .rev() for reverse range
Thu, Jan 3, 5:53 PM
yuja committed rHGfbd5e2f0bba7: update: do not pass in user revspec as default destination (issue6044).
update: do not pass in user revspec as default destination (issue6044)
Thu, Jan 3, 5:55 AM
yuja added a comment to D5485: log: fixes line wrap on diffstat (issue5800).
def diffordiffstat(ui, repo, diffopts, node1, node2, match,
  • changes=None, stat=False, fp=None, prefix='',
  • root='', listsubrepos=False, hunksfilterfn=None): + changes=None, stat=False, graphwidth=0, fp=None,
Thu, Jan 3, 4:27 AM

Tue, Jan 1

yuja added a comment to D5485: log: fixes line wrap on diffstat (issue5800).

Looks generally good.

Tue, Jan 1, 10:52 PM

Sun, Dec 30

yuja added a comment to D5485: log: fixes line wrap on diffstat (issue5800).
  • return max(i * graphwidth maxtotal, int(bool(i))) + return max(i * graphwidth max(diffstatsum(stats)), int(bool(i)))
Sun, Dec 30, 3:58 AM
yuja committed rHG46e0563c67db: merge with stable.
merge with stable
Sun, Dec 30, 3:51 AM

Fri, Dec 28

yuja added a comment to D5441: rust-cpython: binding for LazyAncestors.
> Does the class name actually matter? Personally I don't care if
>  lazyancestors() function returns a LazyAncestors object. We'll anyway
>  need a wrapper function to make pure ancestors and rustext ancestors
>  compatible.

Yes, that's in line with your other comments, whereas I was pursuing the
goal of putting the whole `ancestor` module under responsibility of
`policy.importmod` : in that case, it would have been necessary to have
the same name.
Fri, Dec 28, 12:46 AM

Thu, Dec 27

yuja added a comment to D5477: branches: add -r option to show branch name(s) of a given rev (issue5948).
We like the UX of `hg branch --rev R XXX` for changing the branch of a commit, it's the same UX than bookmark and topic. It's also easier than `hg branch --force XXX; hg amend`.
Thu, Dec 27, 8:46 AM
yuja added a comment to D5484: pull: use opts.get('bookmark') instead of opts['bookmark'].

@@ -4438,7 +4438,7 @@

remotebookmarks = fremotebookmarks.result()
remotebookmarks = bookmarks.unhexlifybookmarks(remotebookmarks)
pullopargs['remotebookmarks'] = remotebookmarks
  • for b in opts['bookmark']: + for b in opts.get('bookmark'):
Thu, Dec 27, 8:17 AM
yuja added a comment to D5484: pull: use opts.get('bookmark') instead of opts['bookmark'].

> commands.py:4441
> pullopargs['remotebookmarks'] = remotebookmarks
> for b in opts['bookmark']:
> b = repo._bookmarks.expandname(b)

@yuja this one?

Thu, Dec 27, 7:41 AM
yuja added a comment to D5477: branches: add -r option to show branch name(s) of a given rev (issue5948).

I tried to queue this, but the patch doesn't include any metadata (e.g. author
and date.) Please check your configuration.

Thu, Dec 27, 7:13 AM
yuja added a comment to D5483: amend:added config option to update time to current in hg amend(issue5828).

+$ hg amend --config rewrite.updatetimestamp=True
+$ hg log --limit 2
+changeset: 40473:e64479cbaf37

Thu, Dec 27, 7:12 AM
yuja added a comment to D5484: pull: use opts.get('bookmark') instead of opts['bookmark'].
nodes = None
  • if opts['bookmark'] or revs: + if opts.get('bookmark') or revs:
Thu, Dec 27, 7:12 AM

Wed, Dec 26

yuja added a comment to D5483: amend:added config option to update time to current in hg amend(issue5828).

+#if updatetime option is turned on
+ $ hg amend --date '1997-1-1 0:1'

Wed, Dec 26, 8:02 AM
yuja added a comment to D5477: branches: add -r option to show branch name(s) of a given rev (issue5948).

Looks mostly good.

Wed, Dec 26, 8:02 AM

Tue, Dec 25

yuja added a comment to D5477: branches: add -r option to show branch name(s) of a given rev (issue5948).
> ctx points to the tipmost branch head. so `rev not in revs` doesn't mean any
>  of the `revs` do not belong to the branch.

Is there any possibility of workaround within this iteration itself @yuja? I can do outside the current loop by creating a branches list and map it by iterating over scmutil.revrange() as suggested by you. But, that won't fetch all details. Just changeset and corresponding branch. We need to keep the same output format, right?
Tue, Dec 25, 7:17 AM
yuja added a comment to D5482: wireproto: in batch queries, support queries with immediate responses.

Nice, thanks!

Tue, Dec 25, 6:53 AM

Mon, Dec 24

yuja added a comment to D5477: branches: add -r option to show branch name(s) of a given rev (issue5948).
0. I move metaedit command to core
1. I move branch changing functionality to metaedit
Mon, Dec 24, 7:58 AM
yuja added a comment to D5477: branches: add -r option to show branch name(s) of a given rev (issue5948).
fm.startitem()

+ rev = ctx.rev()
+ if opts.get('rev') and rev not in revs:
+ continue

Mon, Dec 24, 7:58 AM
yuja added a comment to D5438: rust-cpython: implementing Graph using C parents function.

+/ # TODO find a solution to make it GIL safe again.
+
/
+/ This is non trivial, and can wait until we have a clearer picture with
+
/ more Rust Mercurial constructs.
+/
+
/ One possibility would be to a GILProtectedIndex wrapper enclosing
+/ a Python<'p> marker and have it be the one implementing the
+
/ Graph trait, but this would mean the Graph implementor would become
+/ likely to change between subsequent method invocations of the hg-core
+
/ objects (a serious change of the hg-core API):
+/ either exposing ways to mutate the Graph, or making it a non persistent
+
/ parameter in the relevant methods that need one.

Mon, Dec 24, 5:31 AM
yuja added a comment to D5449: pull: fix inconsistent view of bookmarks during pull (issue4700).
> IIRC, listkeys is a newer command than lookup. If the peer doesn't support listkeys, I suspect this batch query would fail. In that case, maybe listkeys has to be skipped if the peer doesn't support it and if --bookmark is not specified.

listkeys shouldn't need compatibility check in the caller, because it's defined like this in wireprotov1peer.py (https://www.mercurial-scm.org/repo/hg-committed/file/tip/mercurial/wireprotov1peer.py#l381):

   @batchable
   def listkeys(self, namespace):
       if not self.capable('pushkey'):
           yield {}, None
Mon, Dec 24, 3:54 AM

Sun, Dec 23

yuja added a comment to D5441: rust-cpython: binding for LazyAncestors.

+/ The purpose of this module is to hide identifiers from other Rust users
+
/
+/ Some of the identifiers we are defining are meant for consumption
+
/ from Python with other naming conventions. For instance, py_class!
+/ does not let us make a distinction between the Python and the Rust name,
+
/ and that name ends up in particular in the __class__ attribute, so that
+/ renaming it inside its Python module is not enough.
+
/
+/ For Rust consumers, we will reexport these definitions, following the
+
/ appropriate naming convention.
+mod concealed_detail {
+ use super::*;
+
+ py_class!(pub class lazyancestors |py| {

Sun, Dec 23, 11:57 PM
yuja added a comment to D5442: rust-cpython: using the new bindings from Python.

+try:
+ from . import rustext

Sun, Dec 23, 11:57 PM
yuja added a comment to D5475: branch:Added option to show branch name of a given rev (Issue5948).
Thanks for the info @yuja. I'm thinking to move --rev/-r to branches command and replacing --show/-s that I've made to --rev/-r in the branch command itself.
Sun, Dec 23, 10:22 PM
yuja added a comment to D5449: pull: fix inconsistent view of bookmarks during pull (issue4700).

I have a concern about compatibility with ancient Mercurial. Can you check it
and send a follow-up as needed?

Sun, Dec 23, 10:08 PM
yuja added a comment to D5473: config: register evolution.stackaliases as a config option.

No stackaliases found in core. Maybe it's an extension-specific config?

Sun, Dec 23, 10:08 PM
yuja updated subscribers of D5475: branch:Added option to show branch name of a given rev (Issue5948).
_('set branch name even if it shadows an existing branch')),
('C', 'clean', None, _('reset branch name to parent branch name')),
('r', 'rev', [], _('change branches of the given revs (EXPERIMENTAL)')),

+ ('s', 'show', None, _('show branch name of the given rev'))

],
_('[-fC] [NAME]'),
helpcategory=command.CATEGORY_CHANGE_ORGANIZATION)

@@ -1097,6 +1098,11 @@

ui.write("%s\n" % repo.dirstate.branch())
return

+ elif opts.get('show') and label:
+ ctx = scmutil.revsingle(repo, label)
+ ui.write("%s\n" % ctx.branch())
+ return

Sun, Dec 23, 9:01 AM

Sat, Dec 22

yuja added a comment to D5443: ancestor: uniformity of calling lazyancestors classes.
@yuja I'm not sure by what you consider exactly to be internals here. If that's the `[5]` and [6]`, maybe a `parents(revision)` method on the index would be better ? The obvious drawback would be to write more C code.

Given that my ultimate goal here is to delegate the whole `ancestors` module to `policy.importmod`, where would we have the factory function you're thinking of ?
Sat, Dec 22, 9:23 PM
yuja added a comment to D5276: tests: add test for narrow+share.

+ $ find main/d* -type f
+ main/d1/f
+ main/d3/g
+ main/d3/f
+ main/d5/f
+ main/d7/f

Sat, Dec 22, 9:23 PM
yuja added a comment to D5278: narrow: detect if narrowspec was changed in a different share.

+def copytoworkingcopy(repo, tr):
+ if tr:
+ def write(file):
+ spec = repo.svfs.read(FILENAME)
+ file.write(spec)
+ file.close()
+ tr.addfilegenerator('narrowspec', (DIRSTATE_FILENAME,), write,
+ location='plain')
+ else:
+ spec = repo.svfs.read(FILENAME)
+ repo.vfs.write(DIRSTATE_FILENAME, spec)

Sat, Dec 22, 9:23 PM
yuja added a comment to D5278: narrow: detect if narrowspec was changed in a different share.
This is ready for review again, thanks
Sat, Dec 22, 2:17 AM

Dec 20 2018

yuja added a comment to D5449: pull: fix inconsistent view of bookmarks during pull (issue4700).
AFAIK, the protocol is never stateful (not sure how that'd work with http), so you can't rely on a notion of session-level state on the server to guarantee consistency.
Dec 20 2018, 9:12 AM
yuja added a comment to D5447: test: adding test of issue4700.

Queued this, thanks.

Dec 20 2018, 8:24 AM