349
349
runbzr('log --forward')
355
def example_branch(test):
358
file('hello', 'wt').write('foo')
359
test.runbzr('add hello')
360
test.runbzr('commit -m setup hello')
362
file('goodbye', 'wt').write('baz')
363
test.runbzr('add goodbye')
364
test.runbzr('commit -m setup goodbye')
367
class RevertCommand(ExternalBase):
370
file('hello', 'wt').write('bar')
371
file('goodbye', 'wt').write('qux')
372
self.runbzr('revert hello')
373
self.check_file_contents('hello', 'foo')
374
self.check_file_contents('goodbye', 'qux')
375
self.runbzr('revert')
376
self.check_file_contents('goodbye', 'baz')
379
class MergeCommand(ExternalBase):
381
from bzrlib.branch import Branch
387
self.runbzr('branch a b')
389
file('goodbye', 'wt').write('quux')
390
self.runbzr(['commit', '-m', "more u's are always good"])
393
file('hello', 'wt').write('quuux')
394
# We can't merge when there are in-tree changes
395
self.runbzr('merge ../b', retcode=1)
396
self.runbzr(['commit', '-m', "Like an epidemic of u's"])
397
self.runbzr('merge ../b')
398
self.check_file_contents('goodbye', 'quux')
399
# Merging a branch pulls its revision into the tree
402
a.get_revision_xml(b.last_patch())
403
print "Pending: %s" % a.pending_merges()
404
# assert a.pending_merges() == [b.last_patch()], "Assertion %s %s" \
405
# % (a.pending_merges(), b.last_patch())