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
Related
Emacs VC mode show changes in directory state but ignore MQ changes...
I want to remove patch from queue and apply it on working directory.
This is possible with usual patch command, but it require passing some arguments and paths to utilities (which is inconvenient as not all environment allow autocompletion).
I expect hg built-in solution. Ideally - to move patch to shelve.
Moving changes from MQ to working tree and forgetting it:
$ hg qgoto my.patch
$ hg qpop
$ hg qdel --keep my.patch
$ patch -p1 .hg/patches/my.patch
$ rm .hg/patches/my.patch
In Emacs to see difference in top MQ patches I find command C-u C-x v D qparent RET qtip RET which is:
$ hg diff -r qparent:qtip
or shorter:
$ hg diff -r qparent
or:
$ hg qdiff
but latest command doesn't present in Emacs VC mode.
I see no documentation on how to do this in the docs.
hg shelve -l -p [name of shelf].
To get the shelves list one could use hg shelve -l.
Two ways:
hg unshelve --inspect --name [name-of-shelf]
cat .hg/shelves/[name-of-shelf]
Try, hg shelve --patch name — worked for me in Mercurial v 3.6.3
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
I am not able to get the hg head or status for a given repo. is there any way to do this?
]$ hg status /home/user/test_repo/
abort: /home/user/test_repo/ not under root
]$ sudo hg head /home/user/test_repo/
abort: unknown revision '/home/user/test_repo/'!
Thanks in advance.
Put -R before path
hg head -R /home/user/test_repo/
You got your answer with -R and that works, but that's more normally for scripts. Most usually one just goes into the repositories with which one is working:
cd test_repo
hg status
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