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

[perl #127993] Version control conflict markers

Thread Previous | Thread Next
From:
Tony Cook via RT
Date:
June 6, 2016 00:46
Subject:
[perl #127993] Version control conflict markers
Message ID:
rt-4.0.18-25862-1465173962-1114.127993-15-0@perl.org
On Sat Jun 04 04:08:48 2016, mauke- wrote:
> 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?

Up to you, it's going to be a lot rarer.

I would have pushed your patch to blead but the git server is out of disk space.

Tony


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

Thread Previous | Thread Next


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