403 forbidden when pushing to Bitbucket - mercurial

Bitbucket apparently changed something, and I have been googling for answers but there are so many topics of logins failing to Bitbucket that I don't even know which to start with. Most of them are spread out over the past few years. I don't see anything recent-- as in, something that would break logins between March and today.
hg push is the command I am using to push changes. It fails with an HTTP 403; the only output is "abort: HTTP Error 403: Forbidden".
I am using the same settings I have for years. My push process worked as recently as March.
I can log into the website using my email and password, which is different than the username I used to use to push.

https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket
After much consideration, we've decided to remove Mercurial support from Bitbucket Cloud and its API. Mercurial features and repositories will be officially deprecated on July 1, 2020.
You are getting a 403 because Bitbucket no longer supports Mercurial. The July 1st 2020 cutoff date fits between your March 2020 and now (July 29th 2020) time window.

Related

hgsubversion fails with "no module named repo"

I updated my Ubuntu installation which updated my mercurial version, and now hgsubversion doesn't work anymore. I keep getting an error that says "abort: No module named repo!" My copy of hgsubversion seems to be up to date with http://hg.durin42.com/hgsubversion/.
hgsubversion doesn't seem to be actively maintained, but the error wasn't too hard to fix. Taking a look at the relevant source file shows that this error isn't the real error, but is from attempting to recover from the real error. Apparently repository was moved from mercurial into mercurial.interfaces, so changing the line above peerapi=1 to from mercurial.interfaces.repository import peer as peerrepository resolves the issue. I would file a bug report, but I was unable to find a place to report it, so I put it here.
Edit: Right, the file in question that needed editing was hgsubversion/svnrepo.py
My copy of hgsubversion seems to be up to date with http://hg.durin42.com/hgsubversion/
You have to use good and correct location as source of extension:
hg.durin42.com/hgsubversion is not maintained at least 18 months
* real hgsubversion repository now is at https://foss.heptapod.net/mercurial/hg-git
tip of this repo is a lot fresher and have all fixes, needed for HG v5
>hg log -r tip --style compact
1702[tip] d6ac1ae9027a 2020-08-04 00:23 +0200 a
gitnodekw: do not crash on hg incoming when log template includes gitnode()
On the rights of idea: you try to use TortoiseHG on your Ubuntu, which seems to have slightly more newest hgsubversion in library

mercurial: No usable temporary file name found

I have a repo on a network drive (served by Windows server), with local repos pushing/pulling to it on the various machines I work on.
I just dealt with this problem, and solved it by cloning the repo from the network drive to a local disk, pushing, then cloning it back again. The machine from which I did this had not problem pushing further changes after this.
Now I just tried pushing from my laptop, and this happens:
% hg --debug push "Z:\[main repo]"
pushing to Z:\[main repo]
query 1; heads
searching for changes
all remote heads known locally
listing keys for "bookmarks"
2 changesets found
list of changesets:
2ed25c8975482734e3b9eed828573fd711d26fd8
19a424c011ffd0c887cf1d54ed0b537a6c1af714
adding changesets
add changeset 2ed25c897548
add changeset 19a424c011ff
adding manifests
adding file changes
adding GEM.py revisions
transaction abort!
rollback completed
abort: No usable temporary file name found
[command returned code 255 Thu Mar 09 18:51:11 2017]
The only info pertaining to this error message I have found so far is this, and I definitely have no files named con.*in my project. There are several named con*.py but they have never been a problem, and both the laptop and my workstation are running Windows 7, and I've been working on this project for a few years now.
I have happily pushed from this laptop for over a year, and it was never a problem. I don't really have any good idea where to even start looking. Could it be connected to the fact that my workstation had the main repo opened at the same time? It was definitely not doing anything to it at the time.
Update:
I ran hg verify, and this is what it returns -- no problem as far as aI can tell
% hg --debug verify
repository uses revlog format 1
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
73 files, 74 changesets, 226 total revisions
[command completed successfully Fri Mar 10 08:58:02 2017]
I had faced the same error as well.
I just ran tortoise hg as as administrator and that fixed it for me
I don't have an answer yet but I would try the following:
Update to the latest mercurial version (4.1) and try again
Verify the repo integrity with hg verify
Although I understand it always worked as is, try to rename all the con.py files. The thing with CON is that it represents a device, I think it comes from DOS times :-)
If I understand correctly, you push to Z:[main repo] where Z: is a Windows share. Try to push to the same repo in another way, with ssh (requires some setup, yes)
Good luck, very bizarre problem :-/

Pulled revisions not being marked as public phase

I'm not sure if this is a problem with Mercurial or TortoiseHG (both version 3.6.1) but I've got an issue where revisions pulled from our RhodeCode server have recently started being given "draft" phase on one particular development machine.
My own machine is pulling revisions and marking them correctly as "public", but my colleague always get "draft". We are unaware of any recent changes to his configuration, and we've compared mercurial.ini and the hgrc files between our machines.
I'm still fairly clueless when it comes to Mercurial (despite having used it for the last 4 years), so I'm struggling to understand exactly what's happening.
Is there any particular setting (either in Mecurial or TortoiseHG) that would mean a revision pulled by me results in a local "public" phase, but when pulled by my colleague results in local "draft" phase?
There is a setting to check:
Sometimes it may be desirable to push and pull changesets in the draft phase to share unfinished work. This can be done by setting a repository to disable publishing in its configuration file:
[phases]
publish = False
Ref: https://www.selenic.com/mercurial/hg.1.html#phases
This must be related to RhodeCode Phases control, Please check with your super admin for versions < 3.7 if they didn't un-set "set repositories as publishing" globally, if it's 3.7+ each repository has it's own Phases control under settings -> vcs.

How can I see incoming changesets using hg4idea?

When using IntelliJ with Subversion, there is a view called "Incoming" that lets me see incoming changesets from the remote repository. With the Mercurial command line, there is an equivalent command hg in. I like this command because I can see what's coming before pulling it. This view seems to be missing from the IntelliJ-Mercurial integration; my "Changes" window only has one tab called "Changes." Is there a view for this somewhere?
As of IntelliJ IDEA 11.0, it's still not possible to see "incoming" or "repository" changes with either mercurial or git repositories the way you can with subversion ones.
If you look at the online help for IDEA 11.0 http://www.jetbrains.com/idea/webhelp/local-committed-and-incoming-changes.html you'll see a specific note:
"Repository and incoming changes are not supported by Git and Mercurial integrations."
There is an open issue in the IDEA bug tracker http://youtrack.jetbrains.net/issue/IDEA-73130 reported in August 2011 but without any apparent plans for a fix.

How to clone Mercurial to Subversion?

I'm a VERY happy user of bitbucket and mercurial after years of putting up with subversion (and CVS, SourceSafe and others; anybody remember SCCS?). I've considerable project history now in my local hg repo, pushed daily to bitbucket and thence to my home machines.
Problem is, my company wants me to maintain a copy of this history in subversion. And I've hit a stone wall trying to set this up. I've installed hgsubversion, I think correctly. And I've used svnadmin to create an empty svn repository ready to hold the hg history.
But now what? The instructions say to start by pulling a clone (of nose? what's that? I assume this means checkout a copy of the new empty svn directory. OK did that.
But now what? I assume the next step is to push my real local hg clone to the empty svn repo I just checked out. But nothing I've tried will do this. Pull fails as follows, reporting "unrelated repository" (as I recall I gate it the URL of my master local hg repo to get around the "Needs a URL" popup on everything else I've tried.
found new changeset 139d02f4b233
examining 4e97a23b6815:342df9e52cec
abort: repository is unrelated
[command returned code 255 Mon Apr 25 11:29:33 2011]
The result of all this fumbling around is a directory with .hg, .svn and .hgignore entries and nothing else.
So, I feel I'm missing something basic that hundreds of others must have tried by now. Can someone please help me get started? Thanks!
PS: Currently the intent is to maintain SVN permanently as the team repo and push changes there from Hg periodically which would remain the main client for me indefinitely. In case this matters...
You can use the convert extension:
hg convert --dest-type svn mercurialrepo svnrepo
And hgsubversion allows you keep both of them in sync ( bidirectional)
Answered here at SO already:
Converting from Mercurial to Subversion
Migrating from Mercurial to Subversion
Perhaps look at the answers to this question.
Hgsubversion is for working with a repository cloned from SVN using Hg, not the other way around.