//@flow import React from "react"; import { repositories } from "@scm-manager/ui-components"; import type { Repository } from "@scm-manager/ui-types"; type Props = { repository: Repository } class ProtocolInformation extends React.Component { render() { const { repository } = this.props; const href = repositories.getProtocolLinkByType(repository, "http"); if (!href) { return null; } return (

Clone the repository

          hg clone {href}
        

Create a new repository

          
            hg init {repository.name}
            
echo "[paths]" > .hg/hgrc
echo "default = {href}" > .hg/hgrc
echo "# {repository.name}" > README.md
hg add README.md
hg commit -m "added readme"

hg push

Push an existing repository

          
            # add the repository url as default to your .hg/hgrc e.g:
            
default = {href}
# push to remote repository
hg push
); } } export default ProtocolInformation;