D98: revset: support reading aliases from a .hgrevsets file

2017-10-13 Thread durin42 (Augie Fackler)
durin42 abandoned this revision. durin42 added a comment. Let's reopen this if/when we return to it. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D98 To: durin42, #hg-reviewers, quark, indygreg Cc: durin42, yuja, mharbison72, quark, mercurial-devel

D98: revset: support reading aliases from a .hgrevsets file

2017-09-24 Thread indygreg (Gregory Szorc)
indygreg added a comment. There are a number of security and user control issues at play here. For security, we need to take a long hard look at what configs can be modified by in-repo files. Revsets already have a "safe" flag that controls what to expose on hgweb. We likely need more

D98: revset: support reading aliases from a .hgrevsets file

2017-08-15 Thread quark (Jun Wu)
quark added a comment. In https://phab.mercurial-scm.org/D98#6041, @mharbison72 wrote: > I thought about doing this, instead of fixing up a stripped down projrc extension. But then you have to get every developer to edit the local .hg/hgrc file for every clone they have. So even if we

D98: revset: support reading aliases from a .hgrevsets file

2017-08-15 Thread yuja (Yuya Nishihara)
yuja added a comment. > I couldn't tell from Yuya's comment if "... not add such revset functions" means I meant "don't load unsafe extensions." revsets and filesets have to be secure against malicious input because they are accessible through the Web UI. It's up to users to make a

D98: revset: support reading aliases from a .hgrevsets file

2017-08-14 Thread mharbison72 (Matt Harbison)
mharbison72 added a comment. In https://phab.mercurial-scm.org/D98#4834, @quark wrote: > It seems to me that a lot of security work (ex. knowing the "origin" when executing a revset, marking config items or sections as safe or unsafe by extensions) are required to be able to turn on

D98: revset: support reading aliases from a .hgrevsets file

2017-08-10 Thread yuja (Yuya Nishihara)
yuja added a comment. > Security-wise, the "shelling out revset" seems hard to solve cleanly. Yes, and IMHO the only reasonable solution is to not add such revset functions. revsets and filesets can be executed through the web UI. REPOSITORY rHG Mercurial REVISION DETAIL

D98: revset: support reading aliases from a .hgrevsets file

2017-08-09 Thread quark (Jun Wu)
quark added a comment. Security-wise, the "shelling out revset" seems hard to solve cleanly. By having `%include ../hgrc` in `$REPO/.hg/hgrc`, we could already read config in working copy for a trusted repo today. It seems to me that a lot of security work (ex. knowing the "origin" when

Re: D98: revset: support reading aliases from a .hgrevsets file

2017-07-20 Thread yuja (Yuya Nishihara)
yuja added a comment. > What else should we allow in here? Are there security concerns we should think through? Probably safe, but could be used for DoS attack: - `filesetalias` (not implemented) - `revsetalias` - `committemplate` - `templatealias` - `templates` Unsafe

Re: D98: revset: support reading aliases from a .hgrevsets file

2017-07-19 Thread durin42 (Augie Fackler)
durin42 added a comment. In https://phab.mercurial-scm.org/D98#2104, @yuja wrote: > Can we have a single source file for project's revset/fileset aliases and maybe templates? > I don't think it's good idea to create `.hgxxx` file per config section. > > [revsetalias] >

Re: D98: revset: support reading aliases from a .hgrevsets file

2017-07-19 Thread yuja (Yuya Nishihara)
yuja added a comment. Can we have a single source file for project's revset/fileset aliases and maybe templates? I don't think it's good idea to create `.hgxxx` file per config section. [revsetalias] filealiasall = all() [filesetalias] ... Perhaps they could be

[Differential] [Commented On] D98: revset: support reading aliases from a .hgrevsets file

2017-07-16 Thread mharbison72 (Matt Harbison)
mharbison72 added a comment. Big +1 on this functionality, and I'd be happy to experiment with it now. I couldn't quite figure it out from an extension. Also +1 on doing this for filesets. My use case is less about generic revsets (e.g.,` nudge = push -r .`), and more about defining

[Differential] [Commented On] D98: revset: support reading aliases from a .hgrevsets file

2017-07-15 Thread indygreg (Gregory Szorc)
indygreg added a comment. This should probably be considered an RFC patch, especially given how late in the cycle it is. I'm not opposed to punting this to the next cycle. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D98 EMAIL PREFERENCES

[Differential] [Request, 149 lines] D98: revset: support reading aliases from a .hgrevsets file

2017-07-15 Thread indygreg (Gregory Szorc)
indygreg created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY It is common for projects or companies to define/recommend common customizations for Mercurial. However, distributing these customizations can be difficult