Hg Push Fails

Hello

I have recently created a new repository and i have been adding and removing files without any issues. Creating branches, pulling and pushing had been working fine.

All of a sudden now i can't commit any more. I only have one commit that consists of 6 images in new folder.

I am using Mercurial with SSH connection and SourceTree. Since sourcetree is not giving me much in the way of outpu I started using the terminal within the app to get more verbose logs.

This is the output i get:

C:\REDACTED\Trunk>hg push -v --debug --traceback

pushing to ssh://hg@bitbucket.org/REDACTED/REDACTED

running "C:\Program Files (x86)\Atlassian\SourceTree\tools\putty\plink.exe" -ssh -i "C:\Users\REDACTED\private.ppk" hg@bitbucket.org

"hg -R REDACTED/REDACTED serve --stdio"

sending hello command

sending between command

remote: 145

remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024

remote: 1

query 1; heads

sending batch command

searching for changes

all remote heads known locally

sending branchmap command

sending branchmap command

preparing listkeys for "bookmarks"

sending listkeys command

1 changesets found

list of changesets:

35f85d884fa5750f8042b2e14be51d2ddbd78f8d

sending unbundle command

bundling: 1/1 changesets (100.00%)

bundling: 1/1 manifests (100.00%)

bundling: Assets/Models/_Prototype/Textures/Barbarian_Belt_Low_d.tga 1/6 files (16.67%)

Traceback (most recent call last):

  File "mercurial\dispatch.pyc", line 88, in _runcatch

  File "mercurial\dispatch.pyc", line 771, in _dispatch

  File "mercurial\dispatch.pyc", line 540, in runcommand

  File "mercurial\dispatch.pyc", line 866, in _runcommand

  File "mercurial\dispatch.pyc", line 837, in checkargs

  File "mercurial\dispatch.pyc", line 766, in <lambda>

  File "mercurial\util.pyc", line 506, in check

  File "mercurial\commands.pyc", line 4642, in push

  File "mercurial\localrepo.pyc", line 1857, in push

  File "mercurial\wireproto.pyc", line 306, in unbundle

  File "mercurial\sshpeer.pyc", line 172, in _callpush

  File "mercurial\sshpeer.pyc", line 205, in _send

IOError: [Errno 22] Invalid argument

abort: Invalid argument

Exception IOError: (22, 'Invalid argument') in <bound method sshpeer.cleanup of <mercurial.sshpeer.sshpeer object at 0x02455710>> ignored

Do you have any idea of what I can do to be able to push again?

Edit: Additional info:

I tried to add each of the six image files individually to varying degrees of success. When the operation failed the results were the same, but I found out tha if I kept trying on the console with the exact same commands it will eventually go through, this could take dozens of attempts and hours of trying so it is obviously not a solution and the output was this:

C:\REDACTED\Trunk>hg push -v --debug --traceback
pushing to ssh://hg@bitbucket.org/REDACTED/REDACTED
running "C:\Program Files (x86)\Atlassian\SourceTree\tools\putty\plink.exe" -ssh -i "C:\Users\REDACTED\private.ppk" hg@bitbucket.org
"hg -R REDACTED/REDACTED serve --stdio"
sending hello command
sending between command
remote: 145
remote: capabilities: lookup changegroupsubset branchmap pushkey known getbundle unbundlehash batch stream unbundle=HG10GZ,HG10BZ,HG10UN httpheader=1024
remote: 1
query 1; heads
sending batch command
searching for changes
all remote heads known locally
sending branchmap command
sending branchmap command
preparing listkeys for "bookmarks"
sending listkeys command
1 changesets found
list of changesets:
86cb2d4de1e3b06d6bc9a163e2c88613ffe31bd9
sending unbundle command
bundling: 1/1 changesets (100.00%)
bundling: 1/1 manifests (100.00%)
bundling: Assets/Models/_Prototype/Textures/Barbarian_Body_Low_d.tga 1/2 files (50.00%)
bundling: Assets/Models/_Prototype/Textures/Barbarian_Pauldron_L_Low_d.tga 2/2 files (100.00%)
preparing listkeys for "phases"
sending listkeys command
preparing pushkey for "phases:86cb2d4de1e3b06d6bc9a163e2c88613ffe31bd9"
sending pushkey command
try to push obsolete markers to remote
checking for updated bookmarks
preparing listkeys for "bookmarks"
sending listkeys command
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 1 changesets with 2 changes to 2 files
remote: Unable to use key file "C:\REDACTED\private.ppk" (unable to open file)

I'm positive that my private key is working and loaded in Pageant.

The problem persists with other commits.

4 answers

0 votes
Jason Worley Atlassian Team Jan 01, 2014

Offhand I'm not sure but you might get some tips just by searching around for HG Exception IOError: (22, 'Invalid argument'). If troubleshooting doesn't get you anywhere, you might consider trying it on another computer and using git or hg over SSH (git perferably). If that piques any interest you can follow along here: https://confluence.atlassian.com/display/BITBUCKET/Bitbucket+101... with that you might want to keep this handy: https://confluence.atlassian.com/display/BITBUCKET/Troubleshoot+SSH+Issues - I know it doesn't solve the issue but it might help isolate or help narrow down the variables.

W.F.

We have exactly the same problem. Did you find a solution to the problem?

I added an answer talking about my "solution", if you canc all it that.

Hi,

Unfortunately I did not find a solution but I found a workaround while trouble shooting, in short it requires commiting and pushing from a different PC.

What I do now is:

  • I continue to work on my development PC as usual. SourceTree is installed.
  • My project's root directory is now "cloned" to a shared folder of y development PC.
  • I have a laptop PC connected to the development PC via direct ethernet cable.
  • The laptop PC also has SourceTree installed but instead of "cloning" its own copy of the repository, it just "opens" the existing clone from the shared folder in the development PC.
  • I can Pull latest from either PC. I Commit and Push only from the laptop PC. Most of the time I do all my interactions with SourceTree from the laptop just to be safe.

Conclusion:

  • I don't know what the problem is as SourceTree and Mercurial were installed the same way in both machines. The laptop runs windows 8 and the development PC runs windows 7. Both are 64-bit systems.
  • I thinkn this is very unfortunate and there doesn't seem tobe anything else posted on this issue, I assume most people that run into this switch to different solution for source control as this is obviously not OK.

I have the same problem on Mercurial 3.4.2

After several tries I am still unsuccessful.  The changeset I am pushing is rather large, about 7500 files ~ 800M.

My suspicion is that the sheer bulk is a contributing factor.

 
searching for changes
abort: Invalid argument
Exception IOError: (22, 'Invalid argument') in <bound method sshpeer.cleanup of <mercurial.sshpeer.sshpeer object at 0x0000000002536550>> ignored

 

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 06, 2018 in Bitbucket

Upgrade Best Practices

Hello! My name is Mark Askew and I am a Premier Support Engineer for products Bitbucket Server/Data Center, Fisheye & Crucible. Today, I want to bring the discussion that Jennifer, Matt, and ...

434 views 6 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you