mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
227d851a9b
Summary: Update the integration test framework so that we can run the hg integration tests with several different hg config settings, using different sets of mercurial extensions. This adds code to test using flat manifest, treemanifest in hybrid mode, and treemanifest in tree only mode. However, the treeonly configuration is disabled at the moment due to some bugs in treeonly behavior preventing it from being able to create test repositories in treeonly mode. Reviewed By: bolinfest Differential Revision: D5685880 fbshipit-source-id: 081ead4e77cd14a7feb03381783395bd5a8fef4f
28 lines
936 B
Python
28 lines
936 B
Python
#!/usr/bin/env python3
|
|
#
|
|
# Copyright (c) 2016-present, Facebook, Inc.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under the BSD-style license found in the
|
|
# LICENSE file in the root directory of this source tree. An additional grant
|
|
# of patent rights can be found in the PATENTS file in the same directory.
|
|
|
|
from .lib.hg_extension_test_base import hg_test
|
|
|
|
|
|
@hg_test
|
|
class BranchTest:
|
|
def populate_backing_repo(self, repo):
|
|
repo.write_file('a_file.txt', '')
|
|
repo.commit('first commit')
|
|
|
|
def test_set_branch(self):
|
|
original_branch = self.hg('branch')
|
|
self.assertEqual('default', original_branch.rstrip())
|
|
|
|
# Note that with tweakdefaults, we discourage the user from creating a
|
|
# branch, so we require them to specify `--new`.
|
|
self.hg('branch', '--new', 'foo-bar')
|
|
new_branch = self.hg('branch')
|
|
self.assertEqual('foo-bar', new_branch.rstrip())
|