Report import branch name used by default

To avoid users needing to assume the name of the import branch created,
ensure that by default the name is outputted as part of a message to
the user.

Change-Id: I3e633d1431d77f9c89e986755004a5904dbc0952
Related-Bug: #1625878
This commit is contained in:
Darragh Bailey 2016-10-04 15:46:50 +01:00
parent f243bd6355
commit 0e30d3898b
2 changed files with 6 additions and 1 deletions

View File

@ -177,7 +177,8 @@ class ImportCommand(LogDedentMixin, GitUpstreamCommand):
# otherwise perform fresh import
self.log.notice("Starting import of upstream")
import_upstream.create_import(force=self.args.force)
self.log.notice("Successfully created import branch")
self.log.notice("Created import branch '%s'" %
import_upstream.import_branch)
# build suitable command line for interactive mode
if self.args.merge:

View File

@ -159,6 +159,10 @@ class TestImportCommand(TestWithScenarios, BaseTestCase):
def _verify_basic(self):
self.assertThat(self.git.log(n=1), Contains("Merge branch 'import/"))
# check we report to the user about the import branch created
self.assertThat(
self.logger.output,
Contains("Created import branch 'import/"))
def _verify_basic_additional_missed(self):
"""Additional verification that test produces a warning"""