I named a hg flow hotfix like bug1234:somthing, and now I can not finish the hotfix I always get:
hg: parse error at 6: syntax error
Is there a way to escape the colon in the branchname, so I can finish my hotfix?
I'm using:
Ubuntu 11.04
Mercurial Distributed SCM (version 1.8.4)
HG Flow
started the hotfix with command:
$>hg flow hotfix start bug110711:Billing
after coding (bugfix) I tried:
$>hg flow hotfix finish bug110711:Billing
hg: parse error at 6: syntax error
I ran into the same problem. The hg operation I ran was different though, I tried to update to a branch with a colon in the name. The solution was to quote the command twice. So your command will look like this:
hg update -r '"My branch with a : character"'
The idea is that the outer quotes (') are for the shell and the inner ones (") are for the revset parser.
The error message of hg tag is more clear than the one of hg flow:
$ hg tag "bug1234:so"
abort: ':' cannot be used in a tag name
wrap the special word with "" and entire parameter in ''
e.g
hg log -r '::"first"'
Related
I use Ubuntu 14.04 and when I type the following command in my directory:
hg commit hello.txt
I get:
sughosh#sughosh-desktop:~/myproject$ hg commit hello.txt
215
?
?
?
?
1
HG: Enter commit message. Lines beginning with 'HG:' are removed.
HG: Leave message empty to abort commit.
HG: --
HG: user: Sughosh Kaushik <sughosh.kaushik360#gmail.com>
So cannot enter anything and also cannot save.I have no clue what is going on.What is the fix.And what is the meaning of number which is displayed just after the command (like 336,215).
It looks like because you do not specify any commit message, Mercurial is choosing one that is not working in your terminal. You can try to either:
specify the commit message on the command line: hg commit -m"my message" ...
or specify an editor of your choice before launching the commit command, e.g., if you like emacs: export EDITOR=emacs
To me that looks like you end up in your "favorite" editor when you commit and don't specify an explicit commit message. The "favorite" editor is usually stored in the HGEDITOR, VISUAL or EDITOR environment variable - or vi if neither of those exists.
Thus possibly the editor is vi. Enter a commit message if you want. Then press escape and enter :wq to exit the editor.
I'm trying to get Mercurial to show me all changesets in phase secret. According to the docs, I should execute the command hg log -r "secret()", but if I do that, it tells me hg: parse error at 9: invalid token. I'm running Mercurial 2.8
Is it possible to find the changesets I'm looking for?
The solution turned out to be that I copied the command from somewhere, but that somewhere used quote characters that my command line didn't recognize.
I am trying to do a rather simple hg log -r rev1::rev2 to get a list of changesets between two tags.
However in this particular repository the build server automatically creates tags for a build that are numeric such as 2.12.5.0 based on the software version. When I try do an hg log -r using these numeric tags I get a unknown revision '2.12.5.0' response from mercurial. I have tried escaping with quotes with no change. Is it possible to issue this command with numerical tags, it works just fine for non numerical tags.
I believe the tag revset handles that:
hg log -r tag(2.12.5.0)::tag(2.12.5.2)
Shortened version of Ry4an's revset (derived from hg help revsets)
hg log -r "2.12.5.0::2.12.5.2"
How do you make the mercurial "diff" command produce output that is compatible with the unix or unxutil patch command?
I need to create a patch file that I can send to a coworker who doesn't have Mercurial installed.
I've tried using hg diff -r 3:5 > patch1.diff and I get an error from the patch command when applying it. (hold on, I will post the error message as soon as I have a chance....)
OK, here is a test case that I've uploaded to bitbucket:
hg clone https://bitbucket.org/jason_s/test-patch-apply P2base
hg update -r 2 -R P2base
hg diff -r 2:4 -R P2base > p2base.patch
rm -r P2base/.hg
cd P2base
patch < ../p2base.patch
I get this on my Windows PC:
C:\tmp\hg\P2base>patch < ../p2base.patch
patching file bar.txt
Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354
This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.
Never mind, this is a documented problem (with a REALLY POOR ERROR MESSAGE) that can be overcome. From http://gnuwin32.sourceforge.net/packages/patch.htm :
On MS-Windows, the patchfile must be a text file, i.e. CR-LF must be
used as line endings. A file with LF may give the error: "Assertion
failed, hunk, file patch.c, line 343," unless the option '--binary' is
given.
I used --binary and it worked fine.
I follow this article to create a repository using Mercurial:
$ hg clone http://selenic.com/repo/hello
$ cd hello
$ hg add a.txt
$ hg commit -m 'My changes'
but when i use hg commit -m 'My changes', it shows error :
abort: changes':
What can I do about it?
Seems like your single quotes aren't behaving as such, which would hint that you're using a different character. Are you using the standard straight single quote?
Single-quoted strings need to be supported by your shell. Double quotes should work. For example, the Windows shell only supports double quotes.
If you simply do
hg commit
it will show you the editor, where you can type in your commit message.
As others have pointed out, though, double quotes should do the trick too.