checkout out local, which path should I use - mercurial

I have a mercurial repository that is not accessible by Http. I can't figure out how I should configure the path in my continuous integration tool (bamboo), before my repo was hosted co-located and I had to access it bij http (that was easy)
The documentation states that the path should be in the following format:
file://local/filesystem/path[#revision]
my repo is on d:\Repository\myproject. I tried thinks like file://local/D:/Repository/myproject , file://D:/Repository/myproject, file://D:/Repository/myproject#default and "file://local/D/project/myproject" , but I got the error
abort: file:// URLs can only refer to localhost stdout:
How should my path look like?

I figured it out on Windows, you should use the following format:
"file://localhost/C:/path/to/my svn repo"

Related

GitHub Actions checkout#v3: where is repo downloaded?

I am working with GitHub Actions to build code on Windows, Linux, and MacOS. I use actions/commit#v3 #actions/checkout#v3 to download my repo to each server. However, I do not know where the repo gets downloaded. I have to curl other files and add them to the repo folder for the build to work.
Does anyone know where repos are downloaded on each server (Windows, Linux, and MacOS) with actions/commit#v3 #actions/checkout#v3? I'm having trouble finding anything in the documentation. If the path is set in an environment variable, I would prefer to use that instead of hard coding the path for each server.
The environment variable you're looking for is GITHUB_WORKSPACE.
The default working directory on the runner for steps, and the default location of your repository when using the checkout action. For example, /home/runner/work/my-repo-name/my-repo-name.
Source: https://docs.github.com/en/actions/learn-github-actions/environment-variables#default-environment-variables

v3 where to get git_url?

I am trying to clone to my local git repository.
From Mac terminal:
git clone git_url directory_to_create
In the web console, I tried to use the GitHub Webhook URL and Generic Webhook URL. But I got this error: The requested URL returned error: 405
Any suggestions?
OpenShift doesn't host a Git repository for you. It relies on you having a separate hosted Git repository to pull application source code from. Alternatively, you can use a binary input build and push source code from your local system.
If you already have a deployed application how did you create it?
If it was a sample S2I application, you need to go to GitHub where the source code for that sample application was and clone it into your GitHub account. You can then check it out from your fork in your own GitHub account to your local system. You will though need to update the build configuration for the application in OpenShift to then use your fork of the original sample application.

TeamCity - Create Project From URL

I can't seem to create a project from a url when using TeamCity. I am hosting my code on bitbucket using mercurial. When I enter the repository URL, I get this error:
Cannot create a project using the specified URL. The URL is not
recognized.
My url looks like this:
https://logeyg#bitbucket.org/logeyg/tracs-enhancements
And I am of course supplying a username and password. I have tried removing the 'logeyg#' but that doesn't work either.
Did you try SSH URL? What exact version of TC do you use?
There were some fixes in 9.0.2 version (https://youtrack.jetbrains.com/issue/TW-39730), maybe it is also for BitBucket.
Btw. I've just tried with internal Git repo and it works fine with both HTTPS and SSH protocols. Maybe there is a problem with BitBucket itself.
There is a ticket suggi(https://youtrack.jetbrains.com/issue/TW-48788) suggesting mercurial may not be installed.
Ensure mercurial is installed (https://www.mercurial-scm.org/)
Try https://bitbucket.org/logeyg/tracs-enhancements/src without the username and add /src
Check the Admin-> Diagnostics -> Server Logs -> teamcity-vcs
This will provide more info eg. invalid credentials, hg not installed.
If your using bitbucket. Use the clone project URL. Once you do that the "create project URL" in TC will auto detect everything. I user Https and not ssh. Thanks

How to clone a local repository using PyCharm

I'm currently using PyCharm but finding impossible to checkout or clone from a local Mercurial repository.
In the Clone Mercurial Repository dialog, you can put an URL to clone from, and works ok with HTTP URLs, but I'm clueless about how to do it from a local repository.
I've tried putting file:// before the absolute path, but PyCharm keeps telling me no repository found there, so I have to open the console, clone, setup project, etc.
There must be a way, every other IDE I've used allows to do it
Thanks and regards!
It works for me:
It doesn't need "file://", just type in the path.
Are you on Windows or Linux/Mac?
Maybe, you use the "tilda" sign (~) for the home directory? This dialog doesn't understand tildas.
Also note, that you have to specify the path to the Mercurial root, not to the ".hg" directory itself.
Please share your path so that we could see, what can be treated incorrectly there.

How to configure hosted Mercurial in TeamCity 5

This is probably a simple problem and I'm feeling exceptionally dumb because I can't find a any kind of documentation.
I've just installed TeamCity 5 and I want to get files from my Mercurial hosting and there is two fields I just can't figure out.
HG Command path. What should I put here? The path to a file containing what? Can I get an example of that file somewhere?
The host is using Mercurial over SSH where do I define my private key?
Pull changes from? Should I put the address I'm cloning from i.e. ssh://username#myhost.something/project
I figured this out for my TeamCity 5 server last week.
HG Command path: HG
Pull changes from: https://bitbucket.org/.../.../
Don't put the username# in the URL. This is specificed as in the Username/Password fields. If you include the username in the URL it'll fail as there is a bug in the configuration tool. You'll also see a screenshot of the configuration attached to the thread:
http://www.jetbrains.net/devnet/message/5254640#5254640
I'd suggest getting things working with HTTPS and then moving to SSH if possible. This breaks things down into two easier to solve configuration problems. I used the following tutorial to get SSH going on my Windows client machine.
http://www.codza.com/mercurial-with-ssh-setup-on-windows
I've not set this up on my TeamCity server yet. However I did get TeamCity to pick up my Mercurial.ini settings by putting the ini file in \Documents and Settings\TeamCity, which is the account the service runs under.
I've not used team city, but I think hg command path is probably the full path to your local mercurial executable. For me (on linux) that's:
$ type hg
hg is /usr/bin/hg
On windows it's where the 'hg' executable in your system path was placed by whichever (of the many) windows installers for mercurial you used.
Pull changes from sounds like the URL to the repo, so:
ssh://username#myhost.something/project
or
ssh://username#myhost.something//project # note the _two_ double slashes
if you're using absolute paths on the server side.
Your private key location/specification depends on what you're using for ssh and whether or not you're running ssh-agent, but here's a links that explicitly points from within mercurial.ini, which seems sound:
http://dev.openttdcoop.org/projects/home/wiki/Configuring_TortoiseHg_(Windows)#Pointing-to-you-Private-key