TortoiseHG Sync - How to save URL - mercurial

I've recently migrated to Mercurial for source control and am using TortoiseHG. Everything is working great, but whenever I go to "Synchronize" to do a push, the remote repository URL is blank and I need to type it in every time. How do I save it so that the remote repository source is saved?

You did not mention which version of TortoiseHg, but there are two "standard" ways to save the URL:
1) Manually add the following lines to your <project_dir>\.hg\hgrc file:
[paths]
default = http://server/path/to/remote/repo
2) Click the "Save" icon in TortoiseHg's Sync view:

Related

Can Sphinx source files be pushed to ReadTheDocs without a linked repository?

I'm moving the Mercurial repositories for all my open-source projects to OSDN (OSDN.net) from Bitbucket because Bitbucket will soon drop support for Mercurial. However, OSDN only supports SSH, not HTTPS, as a file exchange protocol, and ReadTheDocs does not support SSH URLs. The ReadTheDocs public API allows builds to be triggered, but does not support any way to provide the source files with the build trigger.
Or any documented way, at least. Does anybody know of a way to either push document source files to RTD with a build trigger, or connect an OSDN repository to RTD so that RTD can clone the source files itself?
Thanks.
OSDN does support both SSH & HTTP(S), for "writing" the only option is ssh. However, read-the-docs needs only to 'read'; https is fine (And supported, although a bit hard to find).
On OSDN, toggle the "RO|r/w" button, to see the other-URL. It's not a button, nor trigger; but it looks like it --The UX/UI design isn't very great ...
Copy that RO value (again: ignore the UI-feedback. You can copy the https-URL. And past it on RTfD.
Note: for now, I could get webhooks/integration working. So, you have to go read-the-docs to rebuild, after a push. Or use the curl webhook from e.g a Makefile locally, see: https://docs.readthedocs.io/en/stable/webhooks.html#parameters

Recover deleted file from PhpStorm and SourceTree

I have an open project in PhpStorm that I manage using SourceTree. I was trying to remove some image files from a commit using SourceTree, but accidentally selected a file that should not be deleted. I haven't changed anything (in either PhpStorm or SourceTree) since deleting the file. I tried to do Ctrl+Z in SourceTree but nothing happened. I then checked in PhpStorm Vcs -> local history, but it didn't show the file. How can I recover this file?
Try to right click on project main folder in phpStorm and select Local history / Show History in context menu (not vcs / local history). The file should be at the list as "Deleting".
This is documented by JetBrains here
TL;DR

Uploading remote server files after git checkout

I am using phpstorm 7 on my windows host for a git project. The files are synced with a VM via phpstorm's remote server feature, so each time a save is made, the changed file is also upoloaded to my VM.
I am having difficulties when I am pulling newer versions from Git because the only way to send the changed files to my VM is to upload a full copy of the project via phpstorm. Or of course I can send them individually but it also takes too much effort.
So my question is if there is a feature or plugin for phpstorm which automatically uploads only the changed files after a git checkout.
Thank you!
You can :
sync src code with option deployement to delete the file that no existing in target location
create a external tools for sync
create macro that launch a git pull and after launch a sync
create external tools for sync AND others for pulling git branch
When you create a macro or external tools don't forget that you can launch those with a shortcut.

PhpStorm does not sync with the server

Here's the problem :
My project on phpStorm use a remote access to the server by FTP.
When I save a modified file, the file is uploaded normally to the serv, but when I create a folder on the serv, i don't see it in phpStorm.
Any idea?
PhpStorm is built around "local project files are the main ones -- deployed are secondary" idea. It's natural to have "automatically upload to remote host" (sync local with remote) functionality to follow such an idea.
At the same time the IDE does not have anything to "automatically sync remote with local" (the reverse: to automatically copy remote stuff back to local). Simply because it contradicts such an idea: local files are the main ones.
Therefore:
The "Synchronize" button that you are referring to does not do what you are expecting it to do. It syncs what the IDE knows about project files on a local file system. In other words: it checks if there were any changes to local files done outside of the IDE. It does not do anything with remote files.
NOTE: In modern 202x.x versions it has been renamed to "Reload All from Disk" to avoid such a confusion).
To manually sync with remote files (any direction) you have these main options:
Use Remote Host side panel (can be accessed via Tools | Deployment | Browse Remote Host if it’s closed/hidden) and download any files or folders manually (drag and drop can also be used, just make sure that you are copying files because by default IDE tries to "move" (copy+delete) instead of just "copy"). It has a "Refresh" button to refresh the remote location.
Use two-way synchronisation (with preview) accessible via right click on desired folder(s)/files and choosing Deployment | Synch with Deployed... where you can sync those files/folders both ways (by default newer stuff will override older regardless of the direction).
The IDE can automatically sync one way (from local to remote): just ensure that automatic deployment is enabled and you have one server (or a group) marked as Default for this project.
Settings (Preferences on macOS) | Build, Execution, Deployment | Deployment | Options | Upload changed files automatically to the default server is the option. Check other options there to better suit your needs.
Please refer to the official help pages for more info on deployment (including a simple video tutorial): https://www.jetbrains.com/help/phpstorm/deploying-applications.html
And the funny thing about it, it is not completly correct. The option underneath is missing.. 'skip external changes' should not be ticked.
In Mac -> PHPStorm -> preferences -> Build, Execution, Deployment -> options
Set the Upload as seen in the picture to always and make sure skip external changes is unticked.
It works for me in PhpStorm 2020.1

Mercurial: can't host on BitBucket.org with an error SSH, OpenSSH?

For a new project :
I created a new repo inside the project's folder.
I created a new repo on bitbucket.org
Now I have one local repo and one remote repo. So I should not need to clone. I push from the local to remote.
In Repository Explorer, I fill the URL and "push outgoing changesets". No login and pwd asked? I get this error error SSH-2.0-OpenSSH_5.3
Previously I cloned a HG project on bitbucket.org with no problem.
Is there any conflict with the previous repo? Where should I input the login and password?
I changed in the Global Settings > Proxy
Host : https://bitbucket.org/$myaccount
user :
password :
Should I use a proxy ? Still something wrong with error SSH-2.0-OpenSSH_5.3
That error is telling you that the path you're trying to push to on bitbitbucket doesn't match the repository you created there. Perhaps you've got a typo in your username or your project (case matters for both). The easiest way to get that URL is to copy it right off of the bitbucket page for that repo.
People's confusion in your wording comes from this statement "I want to push (by cloning) my local repo". Pushing and cloning are separate operations. Cloning creates a new repository and pushing moves changesets between two already existing repositories.
If you do have a repo locally and remotely already then you want to push but not clone, and you need to get the URL right to do it.
Eureka, I found it.
I filled something in Global Settings > Proxy so that I won't need to re-authenticate each time.
This was the cause of the infamous error SSH-2.0-OpenSSH_5.3 . That was stupid I know.
What I should have done is :
First uncheck the proxy settings.
Second I'm too lazy to input my authentication , I should configure paths (Hg Repository Explorer > Synchronize > Configure paths) to save the URL . But still now I don't know how to save my login and pwd . But NOW it WORKS