Page MenuHomePhabricator
Feed All Stories

Jan 15 2019

durin42 added a comment to D5585: histedit: fix call to _getgoal() by adding a byteskwargs() wrapper.

Yes just a py3 fix.

Jan 15 2019, 8:07 AM
kevincox added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 15 2019, 3:02 AM
martinvonz added a comment to D5585: histedit: fix call to _getgoal() by adding a byteskwargs() wrapper.

Just for my understanding, this is just a py3 thing, right? Or is it somehow broken with py2 as well?

Jan 15 2019, 12:34 AM

Jan 14 2019

durin42 created D5585: histedit: fix call to _getgoal() by adding a byteskwargs() wrapper.
Jan 14 2019, 10:20 PM
gracinet updated the diff for D5551: rust-cpython: using MissingAncestors from Python code.
Jan 14 2019, 9:15 PM
gracinet created D5584: rust: MissingAncestors.basesheads().
Jan 14 2019, 9:15 PM
gracinet created D5579: rust: factorized testing Graphs.
Jan 14 2019, 9:14 PM
gracinet created D5583: discovery: using the new basesheads().
Jan 14 2019, 9:14 PM
gracinet created D5580: rust: dagop.headrevs() Rust counterparts.
Jan 14 2019, 9:14 PM
gracinet created D5581: rust-cpython: set conversion for MissingAncestors.bases().
Jan 14 2019, 9:14 PM
gracinet created D5582: ancestor: incrementalmissingancestors.basesheads().
Jan 14 2019, 9:14 PM
gracinet created D5578: rust-cpython: moved generic conversion fn out of ancestors module.
Jan 14 2019, 9:14 PM
gracinet added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 14 2019, 8:57 PM
gracinet added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 14 2019, 7:45 PM
angel.ezquerra added a comment to D5495: revset: add "branch" positional arguments to the merge revset.
In D5495#82397, @yuja wrote:

Generally looks good.
Can you fix a couple of nits? And if possible, fold the tests from D5577
into this and the next patch. We prefer including relevant test in each
commit.

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

merge([withbranch]) as it is an optional parameter.

def merge(repo, subset, x):

  • """Changeset is a merge changeset.

+ """Changeset is a merge changeset
+
+ All merge revisions are returned by default. If a "withbranch"
+ pattern is provided only merges with (i.e. whose second parent
+ belongs to) those branches that match the pattern will be returned.
+ The simplest pattern is the name of a single branch. It is also
+ possible to specify a regular expression by starting the pattern
+ with "re:". This can be used to match more than one branch
+ (e.g. "re:branch1|branch2").

"""
# i18n: "merge" is a keyword
  • getargs(x, 0, 0, _("merge takes no arguments"))

+ args = getargsdict(x, 'merge', 'withbranch')
+ withbranch = ''
+ if 'withbranch' in args:
+ withbranch = getstring(args['withbranch'],
+ _('withbranch argument must be a string'))
+ kind, branchname, branchmatcher = stringutil.stringmatcher(withbranch)

Can you merge this with the next if withbranch: block to reduce the number
of conditionally defined variables referenced later?

cl = repo.changelog
  • return subset.filter(lambda r: cl.parentrevs(r)[1] != -1,
  • condrepr='<merge>')

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

Nit: these comments seem a bit verbose. It's documented in stringmatcher().

+ if kind == 'literal':
+ matchfn = 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()))

If we don't have anything special about the literal kind, we can always use
the branchmatcher(). if kind == 'literal' isn't needed.

Jan 14 2019, 6:36 PM
angel.ezquerra updated the diff for D5495: revset: add "branch" positional arguments to the merge revset.
Jan 14 2019, 6:27 PM
angel.ezquerra updated the diff for D5496: revset: add "samebranch" keyword argument to the merge revset.
Jan 14 2019, 6:27 PM
kevincox added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 14 2019, 6:16 PM
durin42 committed rHG6242a19004ca: merge with stable.
merge with stable
Jan 14 2019, 5:47 PM
gracinet added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 14 2019, 1:16 PM
gracinet added a comment to D5551: rust-cpython: using MissingAncestors from Python code.

@yuja I talked with @lothiraldan about this today. It turns out that it'd be better to provide a basesheads returning a set directly from the MissingAncestors object (I do have a Rust implementation for heads).

Jan 14 2019, 11:27 AM
Mathiasdm updated the diff for D5571: packaging: allow running packaging with custom uid+gid for CentOS.
Jan 14 2019, 10:12 AM
Mathiasdm updated the diff for D5570: hg-docker: fix Python 3.4 compatibility (for CentOS 7).
Jan 14 2019, 10:12 AM
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))` ?
Jan 14 2019, 8:30 AM
taapas1128 added a comment to D5577: tests: replaced mockmakedate function in test-amend.t.

@lothiraldan I am not sure but my aim is to supply mock values to dateutil.makedate() everytime is it called but I will go through what devel.default-date does .

Jan 14 2019, 7:50 AM
taapas1128 added a comment to D5577: tests: replaced mockmakedate function in test-amend.t.
Jan 14 2019, 7:28 AM
lothiraldan 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)) ?

Jan 14 2019, 7:21 AM
lothiraldan added a comment to D5577: tests: replaced mockmakedate function in test-amend.t.

@taapas1128 You can also set the option devel.default-date that should do the trick

Jan 14 2019, 3:03 AM
Mathiasdm added a comment to D5570: hg-docker: fix Python 3.4 compatibility (for CentOS 7).
In D5570#82332, @yuja wrote:

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

Can you change the exception type? test-check-code.t complains about it.

Jan 14 2019, 12:49 AM

Jan 13 2019

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?
Jan 13 2019, 10:58 PM
yuja added a comment to D5495: revset: add "branch" positional arguments to the merge revset.

Generally looks good.

Jan 13 2019, 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

Jan 13 2019, 10:11 PM
taapas1128 closed D5577: tests: replaced mockmakedate function in test-amend.t.
Jan 13 2019, 9:38 PM
taapas1128 committed rHG8633c716f908: tests: replace mockmakedate function in test-amend.t.
tests: replace mockmakedate function in test-amend.t
Jan 13 2019, 9:38 PM
angel.ezquerra updated the diff for D5497: revset: add tests for the new merge() arguments (withbranch and samebranch).
Jan 13 2019, 5:45 PM
angel.ezquerra updated the diff for D5496: revset: add "samebranch" keyword argument to the merge revset.
Jan 13 2019, 5:45 PM
angel.ezquerra updated the diff for D5495: revset: add "branch" positional arguments to the merge revset.
Jan 13 2019, 5:45 PM
taapas1128 updated subscribers of D5577: tests: replaced mockmakedate function in test-amend.t.

@yuja please review this.

Jan 13 2019, 10:38 AM
navaneeth.suresh 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 f37a69ec3f47. 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.

Jan 13 2019, 9:31 AM
taapas1128 added a comment to D5554: histedit: added rewrite.update-timestamp to fold and mess.

@yuja thanks for the edits and queuing .

Jan 13 2019, 7:39 AM
taapas1128 updated the summary of D5577: tests: replaced mockmakedate function in test-amend.t.
Jan 13 2019, 7:31 AM
taapas1128 created D5577: tests: replaced mockmakedate function in test-amend.t.
Jan 13 2019, 7:29 AM
taapas1128 committed rHG704a3aa3dc0a: histedit: add rewrite.update-timestamp support to fold and mess.
histedit: add rewrite.update-timestamp support to fold and mess
Jan 13 2019, 7:19 AM
taapas1128 closed D5554: histedit: added rewrite.update-timestamp to fold and mess.
Jan 13 2019, 7:14 AM
taapas1128 committed rHG6459797090ea: histedit: add rewrite.update-timestamp support to fold and mess.
histedit: add rewrite.update-timestamp support to fold and mess
Jan 13 2019, 7:14 AM
yuja added a comment to D5554: histedit: added rewrite.update-timestamp to fold and mess.

Queued with minor modifications, thanks.

Jan 13 2019, 7:14 AM
yuja committed rHG240f8e49a7bd: histedit: remove trailing space from warning message.
histedit: remove trailing space from warning message
Jan 13 2019, 2:53 AM
yuja committed rHG57bece69d7be: histedit: fix weird indent of i18n text.
histedit: fix weird indent of i18n text
Jan 13 2019, 2:53 AM
taapas1128 updated the summary of D5554: histedit: added rewrite.update-timestamp to fold and mess.
Jan 13 2019, 2:52 AM
yuja committed rHGb223fc1c6b4c: progress: change _updatebar() to take parameters as arguments.
progress: change _updatebar() to take parameters as arguments
Jan 13 2019, 2:50 AM
yuja committed rHG929999d963b8: progress: specify updatebar() function by constructor argument.
progress: specify updatebar() function by constructor argument
Jan 13 2019, 2:50 AM
yuja committed rHGd9eda1c6dfca: archival: construct progress helper through ui.makeprogress().
archival: construct progress helper through ui.makeprogress()
Jan 13 2019, 2:50 AM
taapas1128 updated the diff for D5554: histedit: added rewrite.update-timestamp to fold and mess.
Jan 13 2019, 2:49 AM
taapas1128 updated the summary of D5554: histedit: added rewrite.update-timestamp to fold and mess.
Jan 13 2019, 2:46 AM
yuja committed rHG25cec00b333c: help: document rewrite.backup-bundle option.
help: document rewrite.backup-bundle option
Jan 13 2019, 2:42 AM
yuja committed rHG6acbe86c6490: repair: move ui.history-editing-backup to [rewrite] section.
repair: move ui.history-editing-backup to [rewrite] section
Jan 13 2019, 2:42 AM
taapas1128 updated the summary of D5554: histedit: added rewrite.update-timestamp to fold and mess.
Jan 13 2019, 2:42 AM
taapas1128 added a comment to D5554: histedit: added rewrite.update-timestamp to fold and mess.

I have extracted mockdate function as tests/mockdate.py and dealt with the commas and spaces.

def commiteditor(self):
    """The editor to be used to edit the commit message."""

@@ -800,6 +804,8 @@

  1. date if self.firstdate(): commitopts['date'] = ctx.date()

+ elif ui.configbool('rewrite','update-timestamp'):
+ commitopts['date'] = dateutil.makedate()

else:
    commitopts['date'] = max(ctx.date(), oldctx.date())

Yes this is not right time should be updated everytime update-timestamp is True . I have corrected it. @yuja please review.

Jan 13 2019, 2:38 AM
taapas1128 updated the diff for D5554: histedit: added rewrite.update-timestamp to fold and mess.
Jan 13 2019, 2:35 AM
taapas1128 updated the diff for D5554: histedit: added rewrite.update-timestamp to fold and mess.
Jan 13 2019, 2:11 AM
taapas1128 updated the diff for D5554: histedit: added rewrite.update-timestamp to fold and mess.
Jan 13 2019, 1:51 AM
taapas1128 updated the diff for D5554: histedit: added rewrite.update-timestamp to fold and mess.
Jan 13 2019, 1:48 AM

Jan 12 2019

indygreg closed D5561: revlog: always enable generaldelta on version 2 revlogs.
Jan 12 2019, 10:28 PM
indygreg closed D5564: revlog: use separate variables to track version flags.
Jan 12 2019, 10:28 PM
indygreg closed D5563: revlog: inline opener options logic into _loadindex().
Jan 12 2019, 10:28 PM
indygreg committed rHG3f807237dc94: revlog: use separate variables to track version flags.
revlog: use separate variables to track version flags
Jan 12 2019, 10:27 PM
indygreg committed rHGe3cfe0702eac: revlog: inline opener options logic into _loadindex().
revlog: inline opener options logic into _loadindex()
Jan 12 2019, 10:27 PM
indygreg closed D5562: revlog: store mmaplargeindex as an instance attribute.
Jan 12 2019, 10:27 PM
indygreg committed rHGe7a2cc84dbc0: revlog: always enable generaldelta on version 2 revlogs.
revlog: always enable generaldelta on version 2 revlogs
Jan 12 2019, 10:27 PM
indygreg committed rHGd0de4fdd87aa: revlog: store mmaplargeindex as an instance attribute.
revlog: store mmaplargeindex as an instance attribute
Jan 12 2019, 10:27 PM
indygreg closed D5560: revlog: rename v to versionflags.
Jan 12 2019, 10:27 PM
indygreg closed D5559: revlog: always process opener options.
Jan 12 2019, 10:27 PM
indygreg committed rHG6439cefaeb64: revlog: rename v to versionflags.
revlog: rename v to versionflags
Jan 12 2019, 10:27 PM
indygreg committed rHGcecf3f8bccd3: revlog: always process opener options.
revlog: always process opener options
Jan 12 2019, 10:27 PM
indygreg committed rHGd8fe67db5234: internals: minor rewriting of revlogs documentation.
internals: minor rewriting of revlogs documentation
Jan 12 2019, 10:27 PM
indygreg closed D5558: internals: minor rewriting of revlogs documentation.
Jan 12 2019, 10:27 PM
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.
Jan 12 2019, 10:25 PM
yuja added a comment to D5564: revlog: use separate variables to track version flags.

Queued up to this, thanks.

Jan 12 2019, 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.

Jan 12 2019, 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.
Jan 12 2019, 9:10 PM
spectral closed D5569: tests: make HGCATAPULTSERVERPIPE imply HGTESTCATAPULTSERVERPIPE.
Jan 12 2019, 9:08 PM
navaneeth.suresh closed D5552: tests: add test for warning on histedit with tagged commits.
Jan 12 2019, 9:08 PM
spectral committed rHG4f0ae5c64c1b: tests: make HGCATAPULTSERVERPIPE imply HGTESTCATAPULTSERVERPIPE.
tests: make HGCATAPULTSERVERPIPE imply HGTESTCATAPULTSERVERPIPE
Jan 12 2019, 9:08 PM
navaneeth.suresh committed rHG172296c6db91: tests: add test for warning on histedit with tagged commits.
tests: add test for warning on histedit with tagged commits
Jan 12 2019, 9:08 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))

Jan 12 2019, 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)

Jan 12 2019, 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

Jan 12 2019, 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.

Jan 12 2019, 8:55 PM
kevincox added inline comments to D5550: rust-cpython: bindings for MissingAncestors.
Jan 12 2019, 6:30 AM
ludovicchabant committed rHG4f675c12d083: extdiff: move external tool command line building into separate function.
extdiff: move external tool command line building into separate function
Jan 12 2019, 1:39 AM

Jan 11 2019

lothiraldan committed rHGc339a01acd9a: test: explicit a rebase source in test-rebase-collapse.t.
test: explicit a rebase source in test-rebase-collapse.t
Jan 11 2019, 11:02 PM
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()

Jan 11 2019, 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.

Jan 11 2019, 10:05 PM
martinvonz closed D5576: remotefilelog: fix {file_copies} template keyword.
Jan 11 2019, 9:31 PM
martinvonz closed D5574: tags: join string that's unnecessarily split across lines.
Jan 11 2019, 9:31 PM
martinvonz closed D5573: dispatch: add newline after ui.log "ui blocked ms" message.
Jan 11 2019, 9:31 PM
martinvonz committed rHG4c5864dad8b0: tags: join string that's unnecessarily split across lines.
tags: join string that's unnecessarily split across lines
Jan 11 2019, 9:31 PM
martinvonz committed rHGdd97354b8891: dispatch: add newline after ui.log "ui blocked ms" message.
dispatch: add newline after ui.log "ui blocked ms" message
Jan 11 2019, 9:31 PM
martinvonz committed rHG2338eab5f8b7: remotefilelog: fix {file_copies} template keyword.
remotefilelog: fix {file_copies} template keyword
Jan 11 2019, 9:31 PM
martinvonz closed D5575: tests: demonstrate broken {file_copies} template with remotefilelog.
Jan 11 2019, 9:31 PM