I use Ubuntu 16.04 and Mercurial 3.7.3. Our repository is accessible only as an SMB share. I cloned the share to a folder in my home folder (I simplified the names a bit):
> hg clone "/run/user/1000/gvfs/smb-share:server=xyz.com,share=abc$/Repo" Repo
My problem is that I can do anything (pull, commit etc.) but push:
> 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'
If I use 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!
Thanks for your help in advance!
UPDATE
I tried the same in Windows 7, and hg push
worked.
UPDATE 2
The SMB share is on a Windows machine.
The output of hg push
on Ubuntu with the --debug
option (the commit I tried to push is different than the above):
> 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'
For some reason, this seems to not work with GVFS-mounted directories. CIFS works, though. So, to push to the remote repository, mount it via CIFS.
sudo mount -t cifs -o user=your_remote_username,domain=your_remote_domain,uid=$(id -u),gid=$(id -g) "//remote.server.com/path/to/remote/directory" /media/your_user/smb-mount
Make sure to set your remote (SMB) username and domain. Also, in case the server sends ownership information for the files, it might be required to add the forceuid,forcegid
options. For a full description of the command, see Mount cifs Network Drive: write permissions and chown.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With