comparison tests/test_util.py @ 952:9c3b4f59e7e6

stupid: do not close branch upon branch-wide revert Reverting a branch with a remove followed by a copy results in a branch replacement. By default, branch replacements are handled by closing the replaced branch and committing the new branch on top of it. But we do not really want that when reverting a branch, we only want a linear history with a changeset capturing the revert.
author Patrick Mezard <patrick@mezard.eu>
date Tue, 16 Oct 2012 21:17:55 +0200
parents d6db289f1548
children 26aa0172725b
comparison
equal deleted inserted replaced
951:bd9c292665fd 952:9c3b4f59e7e6
518 fromfile='a', 518 fromfile='a',
519 tofile='b')) 519 tofile='b'))
520 msg = '%s\n%s' % (msg or '', diff) 520 msg = '%s\n%s' % (msg or '', diff)
521 raise self.failureException, msg 521 raise self.failureException, msg
522 522
523 def draw(self, repo): 523 def getgraph(self, repo):
524 """Helper function displaying a repository graph, especially 524 """Helper function displaying a repository graph, especially
525 useful when debugging comprehensive tests. 525 useful when debugging comprehensive tests.
526 """ 526 """
527 # Could be more elegant, but it works with stock hg 527 # Could be more elegant, but it works with stock hg
528 _ui = ui.ui() 528 _ui = ui.ui()
535 tags: {tags} 535 tags: {tags}
536 summary: {desc|firstline} 536 summary: {desc|firstline}
537 files: {files} 537 files: {files}
538 538
539 """ 539 """
540 _ui.pushbuffer()
540 graphlog.graphlog(_ui, repo, rev=None, template=templ) 541 graphlog.graphlog(_ui, repo, rev=None, template=templ)
542 return _ui.popbuffer()
543
544 def draw(self, repo):
545 sys.stdout.write(self.getgraph(repo))
546