Error when converting git repo to mercurial using hg convert - mercurial

If I run:
hg convert /path/to/repo
I get the error:
abort: invalid mode ('r') or filename
I've checked and I think the error is a Python error, but it doesn't help me resolve the errror.
Is there any way to get more information and, ultimate fix?

Bug, introduced in 2.1.1
Downgrade to 2.1 or wait April release: patch already committed.

Related

Mercurial on Phabricator: "remote: abort: stream ended unexpectedly"

I'm having this problem when trying to push to a remote server. It is a Mercurial repository on Phabricator. Here are my output.
hg commit -m "udpate README"
hg push
pushing to ssh://company.server
searching for changes
remote: abort: stream ended unexpectedly (got 0 bytes, expected 4)
I'm using the latest version of Mercurial 3.5.2+20151001 on Mac OS 10.10.
I have this problem from yesterday. During that time, I could successfully committed two times, although I did nothing.
Why the output somewhat looks like this question, the problem here is different, because I have deleted the repository and cloned again many times without any problem. (my first attempt to solve the problem)
The system admin and the server is at another city, so he can't take a look at my machine. Any help would be greatly appreciated.
This looks like there may be a problem with the server and client disagreeing on the new bundle2 format for the wire protocol introduced in 3.5. I'd recommend trying to temporarily downgrade to 3.4.2 (e.g. with pip install mercurial==3.4.2) to see if it fixes this. See this discussion on Phabricator. If it doesn't work, hg push --debug --traceback can provide more information on what exactly went wrong.

Finding secret changesets in Mercurial 2.8

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.

Mercurial merge with subrepo throw error about .hgsubstate

I am trying to merge my local with the changes I pulled and I get this error:
% hg merge --verbose --tool=internal:fail 68
resolving manifests
'.hgsubstate'
[command returned code 255 Wed Apr 10 09:10:59 2013]
I am using TortoiseHg and the subrep doesn't show any uncommited changes.
This error msg is not very helpful in helping me figure out what to fix and how to fix it.
This looks like bug 3855 which was fixed in hg 2.5.4. There doesn't appear to have been a TortoiseHG release which includes this version yet, but you could perhaps ask on the thg mailing list if they are planning on putting out a new release. Until then you'll either have to downgrade to an older version of thg, or download the command-line-only version from here.

Error in hg convert

I have a problem with hg convert. When I write in the command line "hg convert f:/test" it gives me this: abort: invalid mode ('r') or filename. What I doing wrong?
You have to provide more details:
Version of Mercurial
Source repository type
and, maybe, use full command line (destination, filemap-file, source-type)
Add-on
According to topic Converting: abort: invalid mode ('r') or filename it was bug in 2.1.1, fixed in 1-st April 2012 release

TeamCity/Mercurial - broken patch

I've set up TeamCity (v6.5.5 - build 18087) to build an ASP.NET project from Mercurial. Twice in 56 build now I have got the error below, and the only common denominator I can see is that these changesets had files added to them.
If I clear the server's mercurial cache I get rif of the problem until next time, but that's not a great solution.
I've seen posts from people with similar problems, but haven't found a solution from reading them.
Would be thankful if someone can point me in the right direction here.
From TeamCity build log:
[20:54:21]: Patch is broken, can be found in file: C:\BuildAgent\temp\cache\temp547491181020464280patch_64
[20:54:21]: Failed to build patch for build #56 {build id=64}, VCS root: mercurial: http://server:8000 {instance id=1, parent id=2}, due to error: 'cmd /c hg cat -o C:\TeamCity\temp\mercurial9111169551826812670catresult\%p -r 75f205de9192 website\MasterPage.master website\MasterPage.master.designer.cs website\OurProject.csproj website\Login.aspx website\Login.aspx.designer.cs website\apage.aspx website\apage.aspx.designer.cs website\anotherpage.aspx website\anotherpage.aspx.designer.cs website\thirdpage.aspx website\thirdpage.aspx.designer.cs' command failed. stderr: abort: data/website/thirdpage.aspx.i#2b64b5d6eb86: no match found!
jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl$1: Server was not able to build correct patch, most likely due to VCS errors, will try again. at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.throwError(PatchDownloaderImpl.java:113) at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.checkPatch(PatchDownloaderImpl.java:103) at jetbrains.buildServer.agent.impl.patch.PatchDownloaderImpl.copyPatchAndCheck(PatchDownloaderImpl.java:64)...