D3673: grep: enables passing wdir as a revision in grep

2018-06-02 Thread sangeet259 (Sangeet Kumar Mishra)
This revision was automatically updated to reflect the committed changes. Closed by commit rHG16f93a3b8b05: grep: enable passing wdir as a revision (authored by sangeet259, committed by ). CHANGED PRIOR TO COMMIT https://phab.mercurial-scm.org/D3673?vs=8951=8954#toc REPOSITORY rHG Mercurial

D3673: grep: enables passing wdir as a revision in grep

2018-06-02 Thread yuja (Yuya Nishihara)
yuja added a comment. > +if ctx.rev() is None : > +rev = scmutil.intrev(ctx) Moved this to top and queued, thanks. REPOSITORY rHG Mercurial REVISION DETAIL https://phab.mercurial-scm.org/D3673 To: sangeet259, #hg-reviewers Cc: yuja, mercurial-devel

Re: D3673: grep: enables passing wdir as a revision in grep

2018-06-02 Thread Yuya Nishihara
> +if ctx.rev() is None : > +rev = scmutil.intrev(ctx) Moved this to top and queued, thanks. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

D3673: grep: enables passing wdir as a revision in grep

2018-06-02 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 updated this revision to Diff 8951. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D3673?vs=8930=8951 REVISION DETAIL https://phab.mercurial-scm.org/D3673 AFFECTED FILES mercurial/commands.py tests/test-grep.t CHANGE DETAILS diff --git

Re: D3673: grep: enables passing wdir as a revision in grep

2018-05-31 Thread Yuya Nishihara
> --- a/mercurial/commands.py > +++ b/mercurial/commands.py > @@ -2513,19 +2513,27 @@ > @util.cachefunc > def binary(): > flog = getfile(fn) > -return stringutil.binary(flog.read(ctx.filenode(fn))) > +try: > +content =

D3673: grep: enables passing wdir as a revision in grep

2018-05-31 Thread yuja (Yuya Nishihara)
yuja added a comment. > - a/mercurial/commands.py +++ b/mercurial/commands.py @@ -2513,19 +2513,27 @@ @util.cachefunc def binary(): flog = getfile(fn) > - return stringutil.binary(flog.read(ctx.filenode(fn))) +try: + content = flog.read(ctx.filenode(fn)) +

D3673: grep: enables passing wdir as a revision in grep

2018-05-30 Thread sangeet259 (Sangeet Kumar Mishra)
sangeet259 created this revision. Herald added a subscriber: mercurial-devel. Herald added a reviewer: hg-reviewers. REVISION SUMMARY When you pass wdir() to the -r flag, it catches the WdirUnsupported error and fall back to and alternate path REPOSITORY rHG Mercurial REVISION DETAIL