Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 2024 19:35:36 -0700
From:      Warner Losh <imp@bsdimp.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Warner Losh <imp@freebsd.org>, src-committers <src-committers@freebsd.org>,  "<dev-commits-src-all@freebsd.org>" <dev-commits-src-all@freebsd.org>,  "<dev-commits-src-main@freebsd.org>" <dev-commits-src-main@freebsd.org>
Subject:   Re: git: df834e06bbc7 - main - git-arc: Just strip escape sequences form arc log
Message-ID:  <CANCZdfpSQhtWmn1_SC6-3D0ReTJh_J2Fu4JCVORMK5SubrgGuA@mail.gmail.com>
In-Reply-To: <046cef05-668a-4ee9-a72a-09d7de303a46@FreeBSD.org>
References:  <202401150224.40F2OSBS093537@gitrepo.freebsd.org> <de314243-7cac-4f1c-b013-5c6c8cadd0bc@FreeBSD.org> <CANCZdfoNWuX%2BG6gTjGPRugyCxNkGH=wZ1kUF4z93mEQ1qmXxmw@mail.gmail.com> <CANCZdfqdv-e7UsWEV99p0hLuxesPpmOyfs4WyJ9QekiaVzc=ew@mail.gmail.com> <046cef05-668a-4ee9-a72a-09d7de303a46@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000f759f2060f06fc9f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Mon, Jan 15, 2024, 4:39=E2=80=AFPM John Baldwin <jhb@freebsd.org> wrote:

> On 1/15/24 9:02 AM, Warner Losh wrote:
> > Hey John,
> >
> > On Mon, Jan 15, 2024 at 9:37=E2=80=AFAM Warner Losh <imp@bsdimp.com> wr=
ote:
> >
> >>
> >>
> >> On Mon, Jan 15, 2024 at 9:30=E2=80=AFAM John Baldwin <jhb@freebsd.org>=
 wrote:
> >>
> >>> On 1/14/24 6:24 PM, Warner Losh wrote:
> >>>> The branch main has been updated by imp:
> >>>>
> >>>> URL:
> >>>
> https://cgit.FreeBSD.org/src/commit/?id=3Ddf834e06bbc78c03cb6b35f074ae436=
73c9ce463
> >>>>
> >>>> commit df834e06bbc78c03cb6b35f074ae43673c9ce463
> >>>> Author:     Warner Losh <imp@FreeBSD.org>
> >>>> AuthorDate: 2024-01-15 02:22:04 +0000
> >>>> Commit:     Warner Losh <imp@FreeBSD.org>
> >>>> CommitDate: 2024-01-15 02:23:45 +0000
> >>>>
> >>>>       git-arc: Just strip escape sequences form arc log
> >>>>
> >>>>       Just strip escape sequences and Warning: lines from 'arc list'
> >>> output. I
> >>>>       upgraded and they changed and git arc list broke. This restore=
s
> its
> >>>>       functionality.
> >>>>
> >>>>       Note: jhb didn't like this, so if others object, I'll fix...
> >>>>
> >>>>       Sponsored by:           Netflix
> >>>>       Reviewed by:            markj
> >>>>       Differential Revision:  https://reviews.freebsd.org/D36553
> >>>
> >>> Namely, it breaks the color output for reviews in different states, s=
o
> >>> Needs Review
> >>> shows up as purple, Approved as green, etc.  If you find the color
> output
> >>> useful
> >>> you'll have to revert this locally.
> >>>
> >>> Also, your last update in the review said that git arc was no longer
> >>> broken for you
> >>> back in May implying this commit wasn't needed for git arc to work fo=
r
> >>> you?
> >>>
> >>
> >> Yes and no. I was mistaken. This change is still needed, but its scope
> can
> >> be reduced.
> >> The trouble is that it's at the first for the other things I committed
> and
> >> getting it out of the
> >> way was a pain (I tried). Since I didn't want to delay things any
> further,
> >> I went ahead and
> >> committed and thought I'd fix stuff if there were objections.I'll do
> that
> >> now.
> >>
> >
> > So even w/o my change, I don't see the color output for the review stat=
es
> > (so I can remove the
> > general filter I added for color). That's easy enough. but what are you
> > doing to get color in the
> > current setup? Or is your arcanist install old and un-updated?
>
> Nope, built locally via poudriere back in October on 14-stable:
>
> > pkg info | grep arcan
> arcanist-lib-php81-20220518_5  Libraries for the command line interface
> for Phabricator
> arcanist-php81-20220518_5      Command line interface for Phabricator
>
> > ll /usr/local/poudriere/data/logs/bulk/14_0-20231022-ports/*/arcanist*
> -rw-r--r--  3 root wheel 16185 Oct 22 22:34
> /usr/local/poudriere/data/logs/bulk/14_0-20231022-ports/latest-per-pkg/ar=
canist-lib-php81-20220518_5.log
> -rw-r--r--  3 root wheel 14152 Oct 22 22:56
> /usr/local/poudriere/data/logs/bulk/14_0-20231022-ports/latest-per-pkg/ar=
canist-php81-20220518_5.log
>
> Can't show color arc list output via text e-mail, but it's color, and
> git arc list is still color for me (from commit
> 613aaf59afa307fc77c8eed01962a59423b1c5f3).
>
> arc list | more shows all the escape codes, but arc list | less -R
> shows the colors just fine.  This is in konsole with TERM=3Dxterm256-colo=
r.
> It also works fine for me in plain xterm under i3wm on my X1 carbon
> running main from September with arcanist built in September.
>

I've had to add --ansi to get color in pipelines...

I'm using: the same version of arc too:
% arc version
arcanist-lib-php80 20220518_5 (devel/arcanist-lib)

and 'arc list' into a pipe never gives me color, but 'arc list --ansi'
always does.

Though there's also arc list --noansi that would be easier than filtering
the escape sequences.

In any event, I've posted a review https://reviews.freebsd.org/D43459 that
should do the right thing.

Warner

Warner

--=20
> John Baldwin
>
>

--000000000000f759f2060f06fc9f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"auto"><div><br><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Mon, Jan 15, 2024, 4:39=E2=80=AFPM=
 John Baldwin &lt;<a href=3D"mailto:jhb@freebsd.org" target=3D"_blank">jhb@=
freebsd.org</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 1/15/=
24 9:02 AM, Warner Losh wrote:<br>
&gt; Hey John,<br>
&gt; <br>
&gt; On Mon, Jan 15, 2024 at 9:37=E2=80=AFAM Warner Losh &lt;<a href=3D"mai=
lto:imp@bsdimp.com" rel=3D"noreferrer" target=3D"_blank">imp@bsdimp.com</a>=
&gt; wrote:<br>
&gt; <br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; On Mon, Jan 15, 2024 at 9:30=E2=80=AFAM John Baldwin &lt;<a href=
=3D"mailto:jhb@freebsd.org" rel=3D"noreferrer" target=3D"_blank">jhb@freebs=
d.org</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt;&gt; On 1/14/24 6:24 PM, Warner Losh wrote:<br>
&gt;&gt;&gt;&gt; The branch main has been updated by imp:<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; URL:<br>
&gt;&gt;&gt; <a href=3D"https://cgit.FreeBSD.org/src/commit/?id=3Ddf834e06b=
bc78c03cb6b35f074ae43673c9ce463" rel=3D"noreferrer noreferrer" target=3D"_b=
lank">https://cgit.FreeBSD.org/src/commit/?id=3Ddf834e06bbc78c03cb6b35f074a=
e43673c9ce463</a><br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt; commit df834e06bbc78c03cb6b35f074ae43673c9ce463<br>
&gt;&gt;&gt;&gt; Author:=C2=A0 =C2=A0 =C2=A0Warner Losh &lt;imp@FreeBSD.org=
&gt;<br>
&gt;&gt;&gt;&gt; AuthorDate: 2024-01-15 02:22:04 +0000<br>
&gt;&gt;&gt;&gt; Commit:=C2=A0 =C2=A0 =C2=A0Warner Losh &lt;imp@FreeBSD.org=
&gt;<br>
&gt;&gt;&gt;&gt; CommitDate: 2024-01-15 02:23:45 +0000<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0git-arc: Just strip escape seque=
nces form arc log<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0Just strip escape sequences and =
Warning: lines from &#39;arc list&#39;<br>
&gt;&gt;&gt; output. I<br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0upgraded and they changed and gi=
t arc list broke. This restores its<br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0functionality.<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0Note: jhb didn&#39;t like this, =
so if others object, I&#39;ll fix...<br>
&gt;&gt;&gt;&gt;<br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0Sponsored by:=C2=A0 =C2=A0 =C2=
=A0 =C2=A0 =C2=A0 =C2=A0Netflix<br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0 markj<br>
&gt;&gt;&gt;&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0 <a =
href=3D"https://reviews.freebsd.org/D36553" rel=3D"noreferrer noreferrer" t=
arget=3D"_blank">https://reviews.freebsd.org/D36553</a><br>;
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Namely, it breaks the color output for reviews in different st=
ates, so<br>
&gt;&gt;&gt; Needs Review<br>
&gt;&gt;&gt; shows up as purple, Approved as green, etc.=C2=A0 If you find =
the color output<br>
&gt;&gt;&gt; useful<br>
&gt;&gt;&gt; you&#39;ll have to revert this locally.<br>
&gt;&gt;&gt;<br>
&gt;&gt;&gt; Also, your last update in the review said that git arc was no =
longer<br>
&gt;&gt;&gt; broken for you<br>
&gt;&gt;&gt; back in May implying this commit wasn&#39;t needed for git arc=
 to work for<br>
&gt;&gt;&gt; you?<br>
&gt;&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Yes and no. I was mistaken. This change is still needed, but its s=
cope can<br>
&gt;&gt; be reduced.<br>
&gt;&gt; The trouble is that it&#39;s at the first for the other things I c=
ommitted and<br>
&gt;&gt; getting it out of the<br>
&gt;&gt; way was a pain (I tried). Since I didn&#39;t want to delay things =
any further,<br>
&gt;&gt; I went ahead and<br>
&gt;&gt; committed and thought I&#39;d fix stuff if there were objections.I=
&#39;ll do that<br>
&gt;&gt; now.<br>
&gt;&gt;<br>
&gt; <br>
&gt; So even w/o my change, I don&#39;t see the color output for the review=
 states<br>
&gt; (so I can remove the<br>
&gt; general filter I added for color). That&#39;s easy enough. but what ar=
e you<br>
&gt; doing to get color in the<br>
&gt; current setup? Or is your arcanist install old and un-updated?<br>
<br>
Nope, built locally via poudriere back in October on 14-stable:<br>
<br>
&gt; pkg info | grep arcan<br>
arcanist-lib-php81-20220518_5=C2=A0 Libraries for the command line interfac=
e for Phabricator<br>
arcanist-php81-20220518_5=C2=A0 =C2=A0 =C2=A0 Command line interface for Ph=
abricator<br>
<br>
&gt; ll /usr/local/poudriere/data/logs/bulk/14_0-20231022-ports/*/arcanist*=
<br>
-rw-r--r--=C2=A0 3 root wheel 16185 Oct 22 22:34 /usr/local/poudriere/data/=
logs/bulk/14_0-20231022-ports/latest-per-pkg/arcanist-lib-php81-20220518_5.=
log<br>
-rw-r--r--=C2=A0 3 root wheel 14152 Oct 22 22:56 /usr/local/poudriere/data/=
logs/bulk/14_0-20231022-ports/latest-per-pkg/arcanist-php81-20220518_5.log<=
br>
<br>
Can&#39;t show color arc list output via text e-mail, but it&#39;s color, a=
nd<br>
git arc list is still color for me (from commit<br>
613aaf59afa307fc77c8eed01962a59423b1c5f3).<br>
<br>
arc list | more shows all the escape codes, but arc list | less -R<br>
shows the colors just fine.=C2=A0 This is in konsole with TERM=3Dxterm256-c=
olor.<br>
It also works fine for me in plain xterm under i3wm on my X1 carbon<br>
running main from September with arcanist built in September.<br></blockquo=
te></div></div><div dir=3D"auto"><br></div><div dir=3D"auto">I&#39;ve had t=
o add --ansi to get color in pipelines...</div><div dir=3D"auto"><br></div>=
<div>I&#39;m using: the same version of arc too:</div><div>% arc version<br=
></div><div>arcanist-lib-php80 20220518_5 (devel/arcanist-lib)</div><div><b=
r></div><div>and &#39;arc list&#39; into a pipe never gives me color, but &=
#39;arc list --ansi&#39; always does.</div><div><br></div><div>Though there=
&#39;s also arc list --noansi that would be easier than filtering the escap=
e sequences.</div><div><br></div><div>In any event, I&#39;ve posted a revie=
w <a href=3D"https://reviews.freebsd.org/D43459">https://reviews.freebsd.or=
g/D43459</a> that should do the right thing.</div><div><br></div><div>Warne=
r<br></div><div><br></div><div>Warner<br></div><div dir=3D"auto"><br></div>=
<div dir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quo=
te" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"=
>
-- <br>
John Baldwin<br>
<br>
</blockquote></div></div></div>
</div>

--000000000000f759f2060f06fc9f--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfpSQhtWmn1_SC6-3D0ReTJh_J2Fu4JCVORMK5SubrgGuA>