develooper Front page | perl.perl5.porters | Postings from June 2016

[perl #127993] Version control conflict markers

Thread Previous
From:
l.mai@web.de via RT
Date:
June 4, 2016 11:08
Subject:
[perl #127993] Version control conflict markers
Message ID:
rt-4.0.18-28800-1465038529-1701.127993-15-0@perl.org
On Sun May 22 19:04:46 2016, tonyc wrote:
> On Sun, May 22, 2016 at 06:32:52PM -0700, l.mai@web.de via RT wrote:
> > Am So 22. Mai 2016, 17:57:48, tonyc schrieb:
> > >
> > > +               if ((s == PL_linestart+2 || s[-3] == '\n') &&
> > > strnEQ(s, "=====", 5))
> > > +                   Perl_croak(aTHX_ "Version control conflict
> > > marker
> > > '%.*s'", 7, s - 2);
> > >
> > > Shouldn't the errors be reported with yyerror() (or one of its
> > > variants) ?
> >
> > I tried that, but it added "at end of line" to the message, followed
> > by another syntax error for "==".
> 
> You'd also want to skip parsing to the next line (as with a comment),
> maybe it can pick up any other conflict markers.

I've attached a patch to do it that way. Any comments?

> Also, git can add |||||| conflict to separate the original text if you
> set merge.conflictstyle to diff3.

I didn't add that one initially because gcc doesn't recognize it either. Should I?


---
via perlbug:  queue: perl5 status: pending release
https://rt.perl.org/Ticket/Display.html?id=127993

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About