bitbucket hg clone 404 error, failed at 'updating to branch default' - mercurial

When cloning a repo from bitbucket I came across a weird error.
Hg would stuck at updating to branch default step for a long long time and then fail.
see shell screen copy below:
~/projects » hg clone ssh://hg#bitbucket.org/akhayyat/mezzanine-pagedown
destination directory: mezzanine-pagedown
requesting all changes
adding changesets
adding manifests
adding file changes
added 55 changesets with 101 changes to 39 files
updating to branch default
abort: HTTP Error 404: Not Found
------------------------------------------------------------
~/projects » cd mezzanine-pagedown
------------------------------------------------------------
~/projects/mezzanine-pagedown » hg status
? .hgignore
? .hgsub
? .hgsubstate
? .hgtags
? LICENSE
? MANIFEST.in
? README.md
? mezzanine_pagedown/__init__.py
? mezzanine_pagedown/defaults.py
? mezzanine_pagedown/fields.py
? mezzanine_pagedown/filters.py
? mezzanine_pagedown/management/__init__.py
? mezzanine_pagedown/management/commands/__init__.py
? mezzanine_pagedown/management/commands/pygments_styles.py
? mezzanine_pagedown/models.py
? mezzanine_pagedown/static/mezzanine_pagedown/css/pagedown.css
? mezzanine_pagedown/static/mezzanine_pagedown/js/jquery.ba-throttle-debounce.min.js
? mezzanine_pagedown/static/mezzanine_pagedown/js/jquery.cookie.js
? mezzanine_pagedown/templates/mezzanine_pagedown/editor.html
? mezzanine_pagedown/urls.py
? mezzanine_pagedown/views.py
? mezzanine_pagedown/widgets.py
? setup.py
------------------------------------------------------------
~/projects/mezzanine-pagedown » hg update
abort: HTTP Error 404: Not Found
--------------------------------
sometimes it's
updating to branch default
abort: error: Network is unreachable
remote: Connection to bitbucket.org closed by remote host.
I have tried it on my laptop, pc and digitalocean vps, all failed.
Can you try cloning this repo and see if you can succeseed?
What might have gone wrong, how can I fix this?

Problem solved. It is a migration issue.
project owner gave the answer:
This is happening because the original PageDown javascript project on
Google Code, which is a subrepository of this repository, is now gone:
https://code.google.com/archive/p/pagedown/.

Related

Mercurial and BitBucket, "abort: repository default-push not found!" error message

I've some code on my laptop I would like to upload through Mercurial on my BitBucket repository.
I'm using a Linux CentOS 6 machine.
The problem is that if I type $hg push, I get the following error message:
pushing to default-push
abort: repository default-push not found!
What should I do?
Thanks
Mercurial doesn't know where you want to push to. Mercurial first looks for the destination in the push command (which could be either a repo on the filesystem, or a remote hg server):
hg push remoterepo
If it doesn't find a destination in the command, it will fall back on the defaults.
Normally, assuming this repository was cloned, the hgrc file (in .hg/) will indicate the default repository to be used.
However this assumes that the repository was created by cloning an existing repo.
If not, you can edit .hg\hgrc and add the default destination eg:
[paths]
default-push=http://yourserver/

mercurial error code :255 , having problems cloning

I'm having problems while cloning a repository .
% hg clone https://hg.mozilla.org/mozilla-central
im getting back this error
destination directory: mozilla-central
abort: Access is denied: 'C:\Program Files\TortoiseHg\mozilla-central'
Can anyone help me and tell me why it is not working ?
Looks like you're running the hg clone command in a directory where you don't have permission to create files
Also you need to add the destination directory
Example :
% hg clone https://hg.mozilla.org/mozilla-central newDirectory

Automating Hg notify config updates

Hosting Mercurial on a windows box thru IIS.
I have a root directory where I put all of my repos
d:\repos
- ProjectA
- .hg
- hgrc
- ProjectB
- .hg
- hgrc
- ProjectC
- .hg
- hgrc
All of the repos' hgrc files setup the notify extension with:
config =d:\hg\Repositories\NotificationList.txt
That way I have a single file to manage all of the notification recipients, like the wiki describes:
https://www.mercurial-scm.org/wiki/NotifyExtension
But the wiki makes mention of controlling that NotificationList.txt file thru it's own repository? How can I do that? If I create a separate repo at d:\repos\HgNotify and have the NotificationList.txt file in there, users can change, commit and push back, but when the push occurs, NotificationList.txt does not get updated on the hg server.
Is there a way to update that file somehow? Am I missing a key setup on my Hg server? Or do I need to use a post-push hook to deploy that file?
Update 1
I added the details from Tim's answer and I kept getting HTTP 500: Server Error on the push. I finally figure out how to trace the python calls (python -m win32traceutil), and here is what seems to be the problem:
File "C:\Python27\lib\site-packages\mercurial\util.py", line 402, in hgexecutable
exe = findexe('hg') or os.path.basename(sys.argv[0]) AttributeError: 'module' object has no attribute 'argv'
It doesn't seem to be able to find hg.exe.
Update 2
I installed TortoiseHg and rebooted the system. Now I get:
emote: added 1 changesets with 1 changes to 1 files
remote: notify: sending 1 subscribers 1 changes
remote: warning: changegroup.update hook exited with status 1
So that makes be think that it has found the hg.exe, but it is not doing its job, because the file does not get updated
Update 3
Found my solution here: https://stackoverflow.com/a/8023594/698
The command line I ended up using was:
changegroup = cmd /c hg update
I also added:
[ui]
debug=true
To my hgrc. Those two combined gave me a lot more meaningful messages. In the end I saw "Access denied". I gave Users full permission, but I am not sure why giving IUSR full permission didn't work. Something I'll have to dig into at a later time.
On the server repo containing your notification list you need to add a changegroup hook:
[hooks]
changegroup.update = hg update -C
or if you want to ensure the repository is always clean:
[extensions]
purge =
[hooks]
changegroup.update = hg update -C && hg purge --all

MVN release:prepare with Mercurial push FAIL

Here's the steps I take:
Clone mercurial project at the head.
On local repository, perform hg status (no results), then hg in (no changes).
mvn clean install. Build is successful.
mvn release:prepare.
Get's to the point where it's excuting a push
[INFO] EXECUTING: cmd.exe /X /C "hg push http://remoterepo/hg.project"
[ERROR]
EXECUTION FAILED
Execution of cmd : push failed with exit code: -1
Your Hg installation seems to be valid and complete. Hg version: 1.8.4 (OK)
Doing a hg status I now have:
? pom.xml.releaseBackup
? release.properties
From my understanding is that this happens when it could be creating a branch on the remote repo and the fix is to make sure I'm on the head. I'm on the head.
I've done this several times before and now this happens. Let me reiterate, I cloned the head and I couldn't clone a branch if I wanted to as none exist.
Now what? How do I fix this?
Thanks for any suggestions.
Joe
I figured it out. It was a authentication thing. The Maven release plugin does not use the authentication details in <project>/.hg/hgrc but it DOES in /<Users>/<UserName>/.hgrc. After I updated my password everything worked just fine.
First of all what happens when you try to do an hg push yourself on the command line ? If everything's fine you definitively have a problem, otherwise the error message should help you determine what is going wrong.
If I were you, I would check if I have the right to push to the remote destination.
Is http://remoterepo/hg.project the real output or did you changed it for confidentiality reason ? If it's the real output, you should check your Maven configuration to put the real repository path.
Concerning the output of hg status after the steps, it's totally normal, Maven creates some file in the directory. You can add them to your .hgignore file so Mercurial won't show them to you. More information about that in the documentation.

Mercurial HG Update Exited With Status 255

When remotely updating a Mercurial Repository, I am getting the following error from the hg update command that is being run on the remote server after the push. I looked around online for some help for this however was unsuccessful in finding anything useful. At this point, I am hoping for some ideas and / or insight as to what would be causing this problem.
The error is just below. It occurred when pushing two changesets. One changeset included an unrelated index.html file change. The other changeset was a merge, which included the index.html change as well as the renaming of the two image files.
levinaris#server01:/home/web/repository$ hg push
pushing to ssh://10.10.1.12//home/web/repository
searching for changes`remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 2 changesets with 1 changes to 1 files
remote: abort: Operation not permitted: /home/web/repository/html/images/image.gif
remote: warning: changegroup hook exited with status 255
Additional details:
Both images are 10385 bytes in size. (yes, this error occurs on two images I have)
The two images had their names changed in changesets that were already pushed and hg updated due to case-folding collisions when attempting to pull the repositories down to Windows PCs.
The target server has the following hook in /etc/mercurial/hgrc:
[hooks]
changegroup = hg update
As a work-around, I did the following:
Deleted image.gif.
Deleted another image file that produced the error.
Ran hg update - success!
Ran hg revert html/image/image.gif
Ran hg revert html/image/otherimage.gif
At this point, I am trying to better understand the cause of this problem, so that I can ensure a solid, easy-to-use implementation in my environment. I really appreciate your help!!
After using hg --debug update in the hook, I received this output:
levinaris#server01:/home/web/repository$ hg push
pushing to /home/web/staging/repository
searching for changes
adding changesets
adding manifests
adding file changes
added 2 changesets with 1 changes to 1 files
resolving manifests
overwrite False partial False
ancestor 58a5edb95c9a local 58a5edb95c9a+ remote 3aafb97b148c
searching for copies back to rev 6
html/index.php: remote is newer -> g
html/images/otherimage.gif.casefolding: update permissions -> e
html/images/image.gif: update permissions -> e
abort: Operation not permitted: /home/web/staging/repository/html/images/image.gif
warning: changegroup hook exited with status 255
Additional Permission Information:
All 3 files in the 2 changesets have 775 permission with the webuser:dev user:group.
My Global hgrc file has the webuser trusted
[trusted]
users = webuser
Is it possible that the permissions that file on the server were such that it couldn't be overwitten by the person doing the push?
If, for example, two different people have done that push (and thus update) the second person isn't going to be able to overwrite the files created by the first person's push triggered update.
Maybe try changing the hook to this for a test (you don't actually have those single quotes on your hook, right?):
[hooks]
changegroup = hg --debug update
If it is a permissions issue the usual fix is to put everyone who will be pushing and updating into the same group (I call mine 'hg') and then using the sticky group bit on all the directories in the repo to make sure new files have that group.