我正在尝试化石作为我的新VCS,因为我是一个从事小型项目的独立开发人员。我开始测试化石,但我遇到了一个(可能是主要的新手)问题。如何推送或拉到另一个目录(这在Hg上很容易)。 Fossil pull或push命令需要URL而不是目录。当我在一个目录中启动服务器并尝试从另一个目录推送时,我收到“服务器循环”错误消息。有什么想法吗?
答案 0 :(得分:19)
当我尝试这个时,克隆和拉动工作正常,没有运行化石服务器。
创建主存储库
>mkdir master
>cd master
>fossil new master_repos.fsl
project-id: dbcb1863865d7d3ed74f873df6daf07c5853df5e
server-id: ea7a2e2496cc9c958cb7cc50bf48c0810b25a0a0
admin-user: james (initial password is "89ef88")
>fossil open master_repos.fsl
>echo "hello world" > a.a
>fossil add a.a
ADDED a.a
>fossil ci -m "add a.a"
New_Version: 80b67a84ff276e559328f373008ff3014a869170
克隆主存储库
>cd ..
>mkdir trial
>cd trial
>fossil clone ../master/master_repos.fsl trail_repos.fsl
Repository cloned into trail_repos.fsl
Rebuilding repository meta-data...
3 (100%)...
project-id: dbcb1863865d7d3ed74f873df6daf07c5853df5e
server-id: 24da0b614d1a1d6cd8ac5a86200390b47b87ee27
admin-user: james (password is "89ef88")
>fossil open trail_repos.fsl
a.a
project-name: <unnamed>
repository: C:/Documents and Settings/james/My Documents/code/test/trial/trail
_repos.fsl
local-root: C:/Documents and Settings/james/My Documents/code/test/trial/
project-code: dbcb1863865d7d3ed74f873df6daf07c5853df5e
server-code: 24da0b614d1a1d6cd8ac5a86200390b47b87ee27
checkout: 80b67a84ff276e559328f373008ff3014a869170 2009-11-12 15:19:51 UTC
parent: b04cc7533753a8a8a1f8a92b1be8b73cbc368660 2009-11-12 15:18:11 UTC
tags: trunk
>type a.a
"hello world"
修改主
>cd ../master
>echo "hello #2" > b.b
>fossil add b.b
ADDED b.b
>fossil ci -m "add b.b"
New_Version: 863e2501037e9f215ff3ec08a1d7802315151e7b
从修改后的主人拉
>cd ../trial
>fossil pull ../master/master_repos.fsl
Bytes Cards Artifacts Deltas
Send: 130 1 0 0
Received: 230 6 0 0
Send: 224 2 0 0
Received: 590 8 2 0
Total network traffic: 649 bytes sent, 806 bytes received
>fossil update
Autosync: file://C:/Documents and Settings/james/My Documents/code/test/master/
master_repos.fsl
Bytes Cards Artifacts Deltas
Send: 130 1 0 0
Received: 230 6 0 0
Total network traffic: 295 bytes sent, 337 bytes received
ADD b.b
>type b.b
"hello #2"
答案 1 :(得分:7)
根据this fossil ticket,克隆,推拉需要化石服务器运行。你不能只使用repo,你必须启动一个服务器,然后参考http://localhost/whatever,你应该是金色的。
fossil server
fossil clone http://localhost
:8080 <repository name>
(或推或拉)答案 2 :(得分:-1)
如果内容相同,我使用相同的化石文件。(你不需要拉/推) 例如
fossil new ~/fs/prj1.fossil
(mkdir prj1 ; fossil open ~/fs/prj1.fossil)
(mkdir prj1_feature1 ; fossil open ~/fs/prj1.fossil)
在某些情况下(prj1已满,prj2是prj1的子集),我使用更安全的方法'fossil ui'。 例如
fossil new ~/fs/prj1.fossil
(mkdir prj1 ; fossil open ~/fs/prj1.fossil; fossil ui &)
mkdir prj1_subset
fossil clone http://localhost:8080 prj1_subset.fossil
fossil open prj1_subset.fossil