Non-expected conflict
Gustavo Niemeyer
gustavo at niemeyer.net
Tue Mar 21 19:42:14 GMT 2006
Hello bzrers!
We're facing an unexpected conflict, which might be a bug in
bzr. Basically, there are two people involved: Chris and Gustavo.
Chris merged from Gustavo's branch-gustavo on revision 75. Doing
bzr diff -r 74..75 on file test, shows these changes on
branch-chris:
if __name__ == "__main__":
- status = main()
- sys.exit(status)
+ runner = os.environ.get("TEST_RUNNER", "unittest")
+ runner_func = globals().get("test_with_%s" % runner)
+ if not runner_func:
+ sys.exit("Test runner not found: %s" % runner)
+ runner_func()
Running bzr blame on the current revision (79) of branch-chris
still shows that Chris is using Gustavo's code:
| if __name__ == "__main__
merge gustavo | runner = os.environ.
| if not runner_func:
| sys.exit("Test r
| runner_func()
1 gustavo |
Now, in branch-gustavo, revision 58 was responsible for the changes
merged into branch-chris, as bzr diff -r 57..58 shows:
if __name__ == "__main__":
- status = main()
- sys.exit(status)
+ runner = os.environ.get("TEST_RUNNER", "unittest")
+ runner_func = globals().get("test_with_%s" % runner)
+ if not runner_func:
+ sys.exit("Test runner not found: %s" % runner)
+ runner_func()
Now, Gustavo did some changes in that code in branch-gustavo's revision
65, so he doesn't have the original content anymore. Running bzr blame
on the current version of branch-gustavo shows:
| if __name__ == "__main__
65 gustavo | runner = os.environ.
| if not runner:
| runner = "unitte
58 gustavo | runner_func = global
| if not runner_func:
| sys.exit("Test r
| runner_func()
1 gustavo |
Now, what should happen if Gustavo bzr merge'd from branch-chris into
branch-gustavo? Gustavo was the only one to work on that code, so his
code should just be preserved, but that's not what bzr is doing:
if __name__ == "__main__":
<<<<<<< TREE
runner = os.environ.get("TEST_RUNNER")
if not runner:
runner = "unittest"
runner_func = globals().get("test_with_%s" % runner)
if not runner_func:
sys.exit("Test runner not found: %s" % runner)
runner_func()
=======
runner = os.environ.get("TEST_RUNNER", "unittest")
runner_func = globals().get("test_with_%s" % runner)
if not runner_func:
sys.exit("Test runner not found: %s" % runner)
runner_func()
>>>>>>> MERGE-SOURCE
Gustavo is basically conflicting with his own changes. So, Gustavo
goes to the bzr mailing list to explain the issue and ask for
suggestions. :-)
The bzr version we use is Jeff Bailey's package version
0.8~2006030807.
--
Gustavo Niemeyer
http://niemeyer.net
More information about the bazaar
mailing list