I am noob at things like these. At work team leader installed Mercurial in my PC. And created folder. After doing several things he connected my folder with folder in his PC. I forgot what he did. Now I need to connect my home PC to that folder. If there is a tutorial for this?
There is the TortoiseHg documentation. It's quite good and has a description of the common tasks. What I think you're looking for is the Open Repository menu item in the File menu:
As the menu says, you can also use Ctrl+O as a keyboard shortcut. That will add it to the Repository Registry in the left side of the workbench.
Turns out it wasn't the Open Repository item after all. My next guess is that clicking two arrows in the Task Toolbar will help. That brings up the Synchronize Window where you can add a new path to repository settings. That's the bottom left side here:
Pick the type in the first drop-down (pick "local" if you can browse to the repository on your file system) and then enter the path to the repository. Click the little floppy disk icon to the right to save the path. Use the name default to make it the default push and pull path.
If the team leader's repository is accessed over HTTP, then you need the right host name or IP address to be able to connect. You should have gotten this information from the team leader.
If you start by opening the team leader's repository, then you'll find it listed in the bottom right side. You can then click on the repository and save the path.
Now I need to connect my home PC to that folder.
You really need to learn Mercurial terminology and Mercurial basics - before all
You must (in Mercurial Terms)
- clone TeamLeader repo
- add this clone (you local repo, linked to leader's) to your WorkBench
Before cloning I'll suggest checking the docs (link from Martin above) as a must and read TortoiseHG QuickStart Guide, grok it and adapt to your project's needs (URL of repo to clone)
Related
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
I am trying out Nitrous.io -- it is a very nice tool. I am also using Nitrous' Mac application which syncs box content to a local directory -- except I have noticed that it doesn't sync the .git directory. I assume this is intentional(?). Is there a list someplace that describes what is and what is not synced?
You can update the file <home dir>\Nitrous\<box name>\.unison\default.prf and add any configuration there per the manual: http://www.cis.upenn.edu/~bcpierce/unison/download/releases/stable/unison-manual.html
Mine contains this line, for example:
ignore=Name node_modules
This way my node_modules folder is not synced in either direction.
You could add this line to yours:
ignorenot=Name .git
As #ajhit406 noted though, you should handle your git actions in one place (the box, in this case).
The .git directory is not synced on purpose. You should be SSH'ing into your box to manage your git repositories.
In the Mac application shortcut menu, hover over the box you want to SSH into, and click "Open Shell". You should enter any git commands from your box in the cloud.
Nitrous has a resource about this: http://help.nitrous.io/nitrous-desktop/
In the document it details that these are the files and directories that aren't synced:
.unison
.git
.svn
.hg
CVS
.DS_Store
.AppleDouble
.LSOverride
.Spotlight-V100
.Trashes
*.sock
*.sw?
._* , *~
I am following the directions here trying to get Mercurial running on my shared HostGator account.
I am supposed to create a "hg" directory, but I am unsure if it is to be in the /home/user/ location or in /home/user/domain-I-want-to-version-control/. I actually tried creating that directory, and the modified 'index.cgi' inside. When I then navigate to (url)/hg I get an internal server error.
Could really use some guidance, please.
Never create repository this way! If you want to add Mercurial repo for existing code (did you try to verify, that you have working hg?!) read before it QuickStart Guide at least
I work with a partner on an PHP site for a client. We have a common Mercurial repository (on Bitbucket), both local copies and the live site. We have only FTP access to the live site (which can't be changed since it is a hosting package with FTP only).
I want to be able to push changes from the repository to the live site.
Until now I simply keep track of changed files in the repo and copy them manually with FileZilla - a error prone and annoying task. My idea is, to mount the remote location locally (i.e. using CurlFtpFS) and tell mercurial to automagically copy changed files to the site. Ideally I want to be able to specify which changes but this would be a bonus. It would be sufficient if the local state of the files within the repo are synced.
Is there any good way to do this using linux commandline tools?
My first recommendation is, if at all possible, get a package that allows more access. FTP only is just brutal.
But since you are looking for a real answer to your question, I have two ideas for you:
I would suggest looking into the mercurial FTP Extension. I personally have never used it since I have never gotten myself stuck in a ftp-only situation (not for a long time at least), but it looks promising. Looks like if you make sure that you tag your production releases it will work really well for you. (make sure to use the -uploaded param)
Also, if you only ever want the tip to be installed on your production env, then you could look at the suggestion Martin Geisler made on the bitbucket user group a few days ago. Basically his suggestion is to utilize bitbucket's "ping url" functionality. You would have to write a server-side script/url handler that would accept that ping, then fetch the tip from bitbucket (as a zip) and then unzip/unpack it. This is a bit complicated, but if you are looking for complete automation and the tip will always be the best this could work for you.
One notion is the use the hg archive command:
hg archive /path/to/curlftpsfs
which will put a snapshot of your repo in that location -- it will however overwrite any file already there.
Another option is to create a Mercurial clone in that same /path/to/curlftpsfs and then just do a hg pull ; hg update in it on your local system with the remote one mounted. Setting that up initially will mean transferring the whole thing but subsequently you'll only be sending deltas.
Some folks don't like this last options because it exposes your entire /.hg repository too, but you can block access to that at the web server.
I came across this problem a while ago after switching from AWS to a local web hosting that provides only ssh/ftp.
My previous approach of updating a production site on AWS using "hg pull; hg update -C" can no longer be used on the new web hosting. They don't have mercurial installed for shared hosts.
So, what I did is to mount the remote location using ftp, to a local machine (i.e. your laptop), then run the hg pull and update commands locally on your machine at the path where has the remote ftp site mounted.
Windows solution:
BeyondCompare (http://www.scootersoftware.com/) is an awesome piece of software. Apart from being awesome it can mirror your local folder to the FTP site. It's comparing files and only transfers what's new.
I use TextMate to do my HTMl,PHP,JS/Other languages and CSSEdit to do my CSS.
I want to integrate TextMate with Transmit better because at the moment I work like this:
TextMate: Edit code
Transmit: Look for folder and drag to online server
Firefox: Refresh page
Rinse, Repeat.
It feels very clunky to me and I do the same with CSSEdit (although CSSEdit's live preview means that I only have to upload once) but I would like to be able to, on save, have Transmit upload the edited document to the relevant place on the server (given that linked browsing is enabled).
Does anyone have a certain workflow that they follow or macros enabled in TextMate to do such tasks as they would certainly make my life a lot easier, Coda is also an option instead of TextMate if needed.
Being able to have Versions/Git-Tower auto commit on save would be great too.
I recommend #Adam's solution for the uploading part of your question but why are you using Git and Transmit simultaneously? Why not Git for everything?
My workflow:
On my machine I keep a Git repository where I do all the work. The working directory is served by MAMP so that I can test my code before commiting anything.
When I'm satisfied I commit my latest changes until I think the branch I'm working on is stable.
When I'm ready, I push to the server where a post-commit hook checks out the latest version to what the "pre-prod server".
When everything has been tested to death, branches merged and so on I check out manually the repository to the "prod server".
No need to use an FTP client at any point, everything is done from the editor (TextMate before, Vim now).
If you set up a site in Transmit, and open the local directory that holds your files, you can activate the Textmate Transmit bundle by typing ctrl-shift-f. Then hit either 1 or 2. 1 will upload the current directory, 2 will send the current file.
You might consider using Transmit's ability to mount FTP servers as volumes and simply edit the files directly on the server. To TextMate the mounted FTP server will appear to be just another volume. Search the help files for Transmit Disk, their name for this feature.