Mercurial:"hg push"到smb共享不起作用

kol*_*kol 5 smb mercurial share push

我使用Ubuntu 16.04和Mercurial 3.7.3.我们的存储库只能作为SMB共享访问.我将共享克隆到我的主文件夹中的文件夹(我简化了一些名称):

> hg clone "/run/user/1000/gvfs/smb-share:server=xyz.com,share=abc$/Repo" Repo
Run Code Online (Sandbox Code Playgroud)

我的问题是我可以做任何事情(拉,提交等)但推动:

> hg push -v
pushing to /run/user/1000/gvfs/smb-share:server=xyz.com,share=abc$/Repo
searching for changes
2 changesets found
uncompressed size of bundle content:
     876 (changelog)
     724 (manifests)
     586  a.txt
    2869  b.txt
   34900  c.rpm
   37325  d.rpm
abort: Operation not supported: '/run/user/1000/gvfs/smb-share:server=xyz.com,share=abc$/Repo/.hg/store/journal'
Run Code Online (Sandbox Code Playgroud)

如果我使用sudo:

> sudo hg push -v
[sudo] password for kol: 
pushing to /run/user/1000/gvfs/smb-share:server=xyz.com,share=abc$/Repo
abort: repository /run/user/1000/gvfs/smb-share:server=xyz.com,share=abc$/Repo not found!
Run Code Online (Sandbox Code Playgroud)

感谢您的帮助!

UPDATE

我在Windows 7中尝试过相同的功能hg push.

更新2

SMB共享位于Windows计算机上.

hg pushUbuntu 的输出带有--debug选项(我试图推送的提交与上面的不同):

> hg push -v --debug
pushing to /run/user/1000/gvfs/smb-share:server=xyz.com,share=abc$/Repo
query 1; heads
searching for changes
all remote heads known locally
listing keys for "phases"
checking for updated bookmarks
listing keys for "bookmarks"
listing keys for "bookmarks"
1 changesets found
list of changesets:
9ce3f6fbf7217a7eea79cf21ccbb2d7fc851cbd3
bundle2-output-bundle: "HG20", 4 parts total
bundle2-output-part: "replycaps" 155 bytes payload
bundle2-output-part: "check:heads" streamed payload
bundle2-output-part: "changegroup" (params: 1 mandatory) streamed payload
bundle2-output-part: "pushkey" (params: 4 mandatory) empty payload
abort: Operation not supported: '/run/user/1000/gvfs/smb-share:server=xyz.com,share=abc$/Repo/.hg/store/journal'
Run Code Online (Sandbox Code Playgroud)

dur*_*n42 0

请不要将网络文件系统用于任何版本控制系统。网络文件系统违反了大多数版本控制系统所依赖的一些一致性保证——您在日志文件中看到的几乎肯定是其副作用。

相反,您可以在同一台计算机上运行 http hg 服务器吗?这将显着降低数据丢失的风险。