示例#1
0
 def pull(self, file_name):
     """ Pulls an hg bundle file into the local repository. """
     self.ui_.pushbuffer() # Hmmm.. add param to make this optional?
     try:
         pull_bundle(self.repo, self.ui_, file_name)
     finally:
         self.ui_.popbuffer()
示例#2
0
 def pull(self, file_name):
     """ Pulls an hg bundle file into the local repository. """
     self.ui_.pushbuffer()  # Hmmm.. add param to make this optional?
     try:
         pull_bundle(self.repo, self.ui_, file_name)
     finally:
         self.ui_.popbuffer()
示例#3
0
def setup_rollup_test_repo(dir_name):
    """ INTERNAL: Setup for rollup test. """
    assert dir_name.endswith('TST_REPO')
    if os.path.exists(dir_name):
        shutil.rmtree(dir_name)

    assert not os.path.exists(dir_name)
    os.makedirs(dir_name)
    ui_ = ui.ui()
    repo = hg.repository(ui_, dir_name, True)
    bundle_path = os.path.join(dir_name, 'bundle.hg')
    bundle_file = open(bundle_path, 'wb')
    bundle_file.write(unhexlify(ROLLUP_TEST_HG))
    bundle_file.close()
    pull_bundle(repo, ui_, bundle_path)
    return (repo, ui_)
示例#4
0
def setup_rollup_test_repo(dir_name):
    """ INTERNAL: Setup for rollup test. """
    assert dir_name.endswith('TST_REPO')
    if os.path.exists(dir_name):
        shutil.rmtree(dir_name)

    assert not os.path.exists(dir_name)
    os.makedirs(dir_name)
    ui_ = ui.ui()
    repo = hg.repository(ui_, dir_name, True)
    bundle_path = os.path.join(dir_name, 'bundle.hg')
    bundle_file = open(bundle_path, 'wb')
    bundle_file.write(unhexlify(ROLLUP_TEST_HG))
    bundle_file.close()
    pull_bundle(repo, ui_, bundle_path)
    return (repo, ui_)