id with --rev parameter to remote repository

Jouni Airaksinen Jouni.Airaksinen at descom.fi
Fri Oct 14 11:45:14 UTC 2011


Collegue of mine create a branch named "50" to one repository. Of course 
not too good idea (which I said right away), but obviously it's possible 
like it's possible to use spaces in branch names (which seems to be common 
also for people do to..). Now our CI server tries to indentify the 
revision with "hg id" so that it's give a revision to check. Normally you 
just put the branch name for it so it looks for the latest revision 
number. In this instance it tries to lookup revision numbered 50 instead 
of branch named "50". That's fine and I see no problem with that as it's 
possible to tell mercurial with revset syntax that it is a branch instead. 
So you write "branch(50)". Now comes the problem which I tried to 
reproduce and test. 

If you do :

hg id -i --debug --rev "branch(50)" repository-path-locally

It works great and returns correct id. However if you do (same repository 
from previous was just cloned)..

hg id -i --debug --rev "branch(50)" https://repositoryurlhere/

It gives error "abort: unknown revision 'branch(50)'!". Makes me wonder 
what's different here if revsets are not used? Both client and server are 
running Mercurial 1.9.3 under CentOS and Python 2.7. Server is through 
hgweb and Apache.

Any suggestions, or is it just bug or feature? Other than "rename the 
branch" which of course not bad idea for the future ;) Right now we force 
with hash rev to build certain revision from that branch.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial/attachments/20111014/0a5530d9/attachment-0002.html>


More information about the Mercurial mailing list