2017-03-06 130 views
0

我有一个URL存储我们所有的存储库:http://xxx.xx.xx.x:xxxx如何将新项目推送到我的hg mercurial URL?

我在Visual Studios中创建了一个名为MyProject1的新项目。

我打开命令提示符,然后做了cd MyProject1

我做hg init

一切都很好。

然后我想这个项目推到我的仓库,我做

hg add 

一切看起来都不错。

我做hg commit -m "Initial Version"

一切看起来都不错。

hg push http://xxx.xx.xx.x:xxxx

我得到这个回:

pushing to http://xxx.xx.xx.x:xxxx 
abort: 'http://xxx.xx.xx.x:xxxx' does not appear to be an hg repository: 
---%<--- (text/html; charset=cp1252) 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11 
DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US"> 
<head> 
<link rel="icon" href="/static/hgicon.png" type="image/png" /> 
<meta name="robots" content="index, nofollow" /> 
<link rel="stylesheet" href="/static/style-paper.css" type="text/css" /> 
<script type="text/javascript" src="/static/mercurial.js"></script> 

<title>Mercurial repositories index</title> 
</head> 
<body> 

<div class="container"> 
<div class="menu"> 
<a href="https://mercurial-scm.org/"> 
<img src="/static/hglogo.png" width=75 height=90 border=0 alt="mercurial" /></a 

</div> 
<div class="main"> 
<h2 class="breadcrumb"><a href="/">Mercurial</a> </h2> 

<table class="bigtable"> 
    <thead> 
    <tr> 
     <th><a href="?sort=name">Name</a></th> 
     <th><a href="?sort=description">Description</a></th> 
     <th><a href="?sort=contact">Contact</a></th> 
     <th><a href="?sort=lastchange">Last modified</a></th> 
     <th>&nbsp;</th> 

---%<--- 
! 

在世界上什么是我做错了什么?我在这里错过了一些微不足道的东西吗?

在此先感谢

回答

1

首先,检查你http://xxx.xx.xx.x:xxxx有一个仓库。根据反应它不是。您可以随时去改文件.hg/hgrc/default添加类似

[paths] 
default = http://bitbucket.org/xxxx/xxx 

这将指向您的默认跳转至回购。

+0

我想在我们的网络URL上创建一个新的存储库,但我是否缺少了这样做的步骤? – Yusha

+0

基于HTML,你可以通过'hg serve'命令执行Mercurial服务。因此,您可以通过'hg clone http://xxx.xx.xx.x:xxxx somepath'克隆它,然后查看克隆的repo中的'.hg/hgrc'文件,然后使用该URL。 – EvgeniySharapov

相关问题