bzr resolve

Stephen J. Turnbull stephen at xemacs.org
Thu Jul 26 08:47:51 UTC 2012


Vincent Ladeuil writes:

 > There are valid cases where what looks like conflict markers generated
 > by bzr are in fact a valid part of the file.

Of course, but they are rare.  The only time I've ever encountered
literal markers in the wild (outside of actually conflicted files) is
in documentation for VCS workflows, and even there typical style
indents them or wraps them in some sort of inline markup so that they
aren't recognized by the VCS.

 > by design, 'resolve' is not meant to check whether a file contains
 > conflict markers or not.

Hm.  I think you're missing a bet here.

Think about the semantics of checking.  If "bzr resolve FILE" checks
for conflict markers, and finds them, it marks FILE as conflicted, and
you can't commit.  Fail-safe.  Of course, you need a "bzr resolve
--nocheck FILE" option, but that's easy enough to implement and rarely
enough typed to be little bother.

OTOH, currently, "bzr resolve" fails dangerously on typos and
wildcards in the command line.

 > are conflicted and are the recommended commands to query bzr about
 > the existing conflicts.

Speaking for myself, at least, I don't want to query bzr about
existing conflicts.  Again, think about the workflow:

    hack hack hack, bzr resolve, oh no what did I plan to work on
    next, bzr conflicts, hack hack hack, ...

Since you're already working interactively (unless you've got an AI
conflict resolver that you haven't contributed to bzr, hm?), who need
the "I'm confused" and "bzr conflicts" steps?  Why not just have "bzr
resolve" tell you what's left to do?

Maybe you have an alternative workflow where explicitly calling bzr
conflicts "only when needed" makes sense, or where having bzr resolve
check for the remaining conflicts would be annoying or an actual
impediment to getting work done, but I don't see it offhand.  Except
if there are many files (say hundreds) changed by the merge (it's an
obvious optimization to ignore files that haven't been touched by the
merge), when it would take a while to grep all those files.



More information about the bazaar mailing list