2017-03-06 128 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

相關問題