I create a local repo with
local-host $ hg init ~/test/
and then in the remote host i do a clone
remote-host $ hg clone ssh://user#local-host/test
without any issues.
When im trying to check if there are outgoing changes in the remote repo im getting this error
remote-host $ cd test
remote-host $ hg --verbose out
comparing with ssh://user#local-host/test
running ssh user#local-host 'hg -R test serve --stdio'
searching for changes
no changes found
remote: abort: no repository found in '/home/user' (.hg not found)!
remote: abort: no repository found in '/home/user' (.hg not found)!
If i commit any change in the remote/local repository and push it im getting the error but the change gets pushed.
Both hosts have the same mercurial version.
Any ideas ?
You need to let it know which repository - easiest is:
remote-host $ cd ~/test/
remote-host $ hg --verbose out
Related
I have a Netbeans property file that had a conflict. I removed the conflict manually and attempted to resolve it using resolve -m, but mercurial does not seem to accept this mark:
$ hg resolve -m RESTServices/nbproject/project.properties
$ hg resolve --list
U RESTServices/nbproject/project.properties
R RESTServices/web/main.js
R RESTServices/web/summer_api/renderable_alpha/PlatonicRenderable.js
$ hg commit -m "resolved"
abort: unresolved merge conflicts (see hg help resolve)
Any ideas?
Thanks , K
Has anyone taken a local repo and imported it into Bitbucket? When I go to do this, the Import page asks for a URL, but I'm working on a local computer that does not have port 8000 open to the outside world.
Can I just use some special form of a file path?
First you need to create a repository in Bitbucket, go to Repositories -> create repository. Then you can choose between HTTPS or SSH.
You can customize your hgrc file like this:
[ui]
username = Your Name <youremail#example.com>
[paths]
myproject = https://.. # The one provided by Bitbucket
Now you can just push your changes to the repository:
$ hg commit -m "my changes"
$ hg push myproject
Or pull changes:
$ hg pull -u myproject
The -u option will also update your local repository after pulling the changes. You can use this option instead of pulling and then updating your local repository. The -u option is the same as doing:
$ hg pull myproject
$ hg update
You may also want to take a look to the hgignore file.
My Jenkins server has stopped being able to build a maven project hosted at bitbucket.org. The build works locally but Jenkins reports this error:
[workspace] $ hg incoming --quiet --bundle hg.bundle --template "<changeset node='{node}' author='{author|xmlescape}' rev='{rev}' date='{date}'><msg>{desc|xmlescape}</msg><added>{file_adds|stringify|xmlescape}</added><deleted>{file_dels|stringify|xmlescape}</deleted><files>{files|stringify|xmlescape}</files><parents>{parents}</parents></changeset>\n" --rev default
abort: no suitable response from remote hg!
ERROR: Failed to determine incoming changes
[workspace] $ hg log --rev . --template {node}
Any ideas what's going on?
[edit]
So, I ran hg paths and got a response that the tomcat user was untrusted:
Not trusting file /usr/local/tomcat/.jenkins/jobs/Test/workspace/.hg/hgrc from untrusted user tomcat, group tomcat
After running hg incoming as the tomcat user
cd /usr/local/tomcat/.jenkins/jobs/Test/workspace
sudo -u tomcat hg incoming
I got an error saying the permissions on my ssh key were too open:
remote: ###########################################################
remote: # WARNING: UNPROTECTED PRIVATE KEY FILE! #
remote: ###########################################################
remote: Permissions 0620 for '/usr/local/tomcat/.ssh/id_rsa' are too open.
remote: It is recommended that your private key files are NOT accessible by others.
remote: This private key will be ignored.
remote: bad permissions: ignore key: /usr/local/tomcat/.ssh/id_rsa
remote: Permission denied (publickey).
abort: no suitable response from remote hg!
and thanks to this SO question
I set the permissions and now Jenkins can successfully build.
Since your hg incoming is based on whatever your 'default' path is in the repository's hgrc (use hg paths to see them, or open the file), maybe you should make sure the address of the remote repository is still correct and that the project is still accessible.
I tried committing to a local hg repo and it refuses:
trouble committing plot.py!
note: commit message saved in .hg/last-message.txt
abort: Permission denied: /home/md/md_perf/.hg/store/data/plot.py.i
Your file permissions are messed up inside the local repository -- probably someone else pushed or committed to that repository without making sure they were leaving the permissions in a state usable by your whole group. Try these, with the appropriate substitutions, and sudo if necessary:
chgrp -R yourgroup /home/md/md_perf
chmod -R g+rwX /home/md/md_perf
find /home/md/md_perf -type d -print0 | xargs -0 chmod g+s
I'm trying to install mercurial-server. After adding my keys to keys/root and refreshing auth, I tried to clone hgadmin-repo but I get the following error:
$ hg clone ssh://hg#<domain>/hgadmin
remote: mercurial-server: no such repository hgadmin
abort: no suitable response from remote hg!
Anyone know what's the problem?
I had this same problem and for me it was a problem with the installation of the hgadmin repository. When I installed the package, I got errors from python saying the mercurial package wasn't installed. I assume that happened when mercurial-server tried to initialize the hgadmin repository. So when I went to checkout the hgadmin respistory, there was no .hg directory:
root#myshost:/var/lib/mercurial-server/repos# cd hgadmin/
root#myshost:/var/lib/mercurial-server/repos/hgadmin# ls -a
. ..
In order to resolve this, I did:
easy_install mercurial
sudo apt-get purge mercurial-server
sudo rm -rf /var/lib/mercurial-server
sudo apt-get install mercurial-server
And then continued on with the directions here:
http://kurtgrandis.com/blog/2010/03/20/gitosis-for-mercurial/
Thanks a lot Randy for exposing the exact issue here.
I struggled with the same problem, and found an alternative approach to solving it (without the need to purge and re-install).
You can initialize the hgadmin repo manually and install the hooks, achieving the same effect as a normal installation. You need to to it as 'hg' user though.
Procedure
The commands worked for my environment (Ubuntu 10.04.4 / Hg 1.4.3)
First initialise a mercurial repository in /var/lib/mercurial-server/repos/hgadmin :
$ sudo su hg
$ cd ~/repos/hgadmin/
$ hg init
Then the only difference I found with a normally initialized hgadmin repo (that I deployed in a VM for comparison) were the hooks in .hg/hgrc file. So open the file :
$ vim .hg/hgrc
and paste this exact content :
# WARNING: when these hooks run they will entirely destroy and rewrite
# ~/.ssh/authorized_keys
[extensions]
hgext.purge =
[hooks]
changegroup.aaaab_update = hg update -C default > /dev/null
changegroup.aaaac_purge = hg purge --all > /dev/null
changegroup.refreshauth = python:mercurialserver.refreshauth.hook
Are you sure your clone command syntax is correct? I see at least two errors in it:
You must put the repo you're cloning (not just the destination)
Just as for push, you must use two slashes before hgadmin:
Example FAILING (missing the source repo and using only one '/' before 'home')
$ hg clone ssh://John#127.0.0.1/home/John/delme
Example FAILING (missing the source repo)
$ hg clone . ssh://John#127.0.0.1/home/John/delme
Example SUCCEEDING:
$ hg clone . ssh://John#127.0.0.1//home/John/delme