bzr resolve fails on files with certain strings

Bug #191402 reported by Cameron
4
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Low
Unassigned

Bug Description

I had a conflict in a file that had the string ===================== in it. The file is pure text, and this string was used to underline a section heading. I fixed all the conflicts, but the resolver wouldn't accept that the conflict was fixed until this string was removed.

The workaround was to remove the string, resolve, commit, replace the string and commit again.

This is something of an odd corner case, and I would simply propose that `bzr help conflicts` `bzr help resolve` and other similar documentation includes a note that files with this string (and others? I haven't tested) will not resolve. I spent about half an hour trying to figure this one out, and it then it was a last resort!

Revision history for this message
Aaron Bentley (abentley) wrote : Re: [Bug 191402] [NEW] bzr resolve fails on files with certain strings

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Cameron wrote:
> Public bug reported:
>
> I had a conflict in a file that had the string ===================== in
> it.

That string, like <<<<<<< and >>>>>>>, is a conflict marker.

Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHsp390F+nu1YWqI0RAhF5AJ9X6MbzfO3xLmD0s4YRMP/kVt7kMgCeNI5o
XDuYLUxkbqdzUdm0uY5V3jA=
=BlLb
-----END PGP SIGNATURE-----

Revision history for this message
Cameron (cammo) wrote : Re: [Bug 191402] [NEW] bzr resolve fails on files with certain strings

On Wed, Feb 13, 2008 at 07:36:29AM -0000, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Cameron wrote:
> > Public bug reported:
> >
> > I had a conflict in a file that had the string ===================== in
> > it.
>
> That string, like <<<<<<< and >>>>>>>, is a conflict marker.
>

Yeah, that's what I eventually guessed. The problem was that I didn't
see anything in the documentation that suggested the resolver would
fail if that particular string was encountered. It's a corner case,
but not an obvious gotcha. My file was quite small, but imagine a
large file in which the string was several thousand lines away from
the conflict!

--

=============================================
Cameron Horsburgh

=============================================

Revision history for this message
John A Meinel (jameinel) wrote :

Only automatic resolution is prevented. If you had done:

bzr resolve file

Then we would assume that whatever was in there was valid.

"bzr resolve"

Is more of "search around and see if files have had their conflict markers removed".

So at best this might be a documentation thing. What sort of things did you try/how could we present it such that it would have been more obvious to you?

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Perhaps "bzr resolve" should tell the user on which files the conflicts were resolved and which files still contain conflicts (and where?)

Revision history for this message
Martin Pool (mbp) wrote :

I agree it should give you some better help that they seem to contain conflict markers.

Also, that string of ~20 equals signs is not actually one that bzr will emit. It's always seven followed by one space, which is somewhat less likely to occur accidentally. Is there any reason why (as a separate bug) we should not make that check more strict?

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Jelmer Vernooij (jelmer)
tags: added: conflicts resolve
tags: added: doc help
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.