D1483: globalopts: make special flags ineffective after '--' (BC)

2017-11-22 Thread quark (Jun Wu)
quark abandoned this revision. quark added a comment. I didn't notice it's fixed in stable. Thanks! REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D1483 To: quark, #hg-reviewers, yuja Cc: yuja, lothiraldan, dlax, mercurial-devel __

D1483: globalopts: make special flags ineffective after '--' (BC)

2017-11-22 Thread yuja (Yuya Nishihara)
yuja requested changes to this revision. yuja added a comment. This revision now requires changes to proceed. A similar patch is already in stable. Can you send a follow-up if you found a problem? https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-November/107567.html REPOSIT

D1483: globalopts: make special flags ineffective after '--' (BC)

2017-11-21 Thread lothiraldan (Boris Feld)
lothiraldan added inline comments. INLINE COMMENTS > dispatch.py:706 > +>>> _earlypeekboolopt(b'--debugger', args) > +False > +""" Just for the sake of testing, could you add a doctest with `--debugger` before `--`? REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercuri

D1483: globalopts: make special flags ineffective after '--' (BC)

2017-11-21 Thread quark (Jun Wu)
quark updated this revision to Diff 3744. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1483?vs=3740&id=3744 REVISION DETAIL https://phab.mercurial-scm.org/D1483 AFFECTED FILES mercurial/dispatch.py tests/test-globalopts.t CHANGE DETAILS diff --g

D1483: globalopts: make special flags ineffective after '--' (BC)

2017-11-21 Thread quark (Jun Wu)
quark added inline comments. INLINE COMMENTS > dlax wrote in dispatch.py:715 > I find the algorithm a bit clumsy (usage of both `in` and `.index()` for the > same value), how about a for loop like that: > > for arg in args: > if arg == optname: > return True > if arg ==

D1483: globalopts: make special flags ineffective after '--' (BC)

2017-11-21 Thread dlax (Denis Laxalde)
dlax added inline comments. INLINE COMMENTS > dispatch.py:715 > +return True > +return False > + I find the algorithm a bit clumsy (usage of both `in` and `.index()` for the same value), how about a for loop like that: for arg in args: if arg == optname: retur

D1483: globalopts: make special flags ineffective after '--' (BC)

2017-11-21 Thread quark (Jun Wu)
quark updated this revision to Diff 3740. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D1483?vs=3739&id=3740 REVISION DETAIL https://phab.mercurial-scm.org/D1483 AFFECTED FILES mercurial/dispatch.py tests/test-globalopts.t CHANGE DETAILS diff --g

D1483: globalopts: make special flags ineffective after '--' (BC)

2017-11-21 Thread quark (Jun Wu)
quark created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY Flags after '--' should not be effective. That's a universal rule across common software. People should be able to hg log a file named `--debugger`. Besides, hg ..