When I try to download a project from Google Code using TortoiseHg I got the following message:
abort: 'svn' executable not found for subrepo 'mobile/ios/externals/google-toolbox-for-mac'
I am using this link google.code
EDIT: I am running Windows XP
The repository you're trying to clone as some Subrepository defined which are on a Subversion repository. The subrepository list can be seen in the .hgsub file.
In order for the clone to work, you will need to install Subversion on your computer. You can find packages for various platform here : http://subversion.apache.org/packages.html
The executable must also be in the path so Mercurial can use it. Since you didn't give much details about your environment, I can't help you with that, but I think the installation process should take care of this.
FYI, Mercurial also handles Git subrepository, so if you want to clone a project which make uses of them, you will also have to install Git.
Related
I'd like to pull a Mercurial web repository into my local filesystem to work. I used the following command but I get the error: Merucrial Repository (.hg directory not found). But my boss said Mercurial is installed in the machine.
hg pull https://username#web_repository_name
What is the proper way to get a working copy of a Mercurial repository?
You need to start by executing a clone of the repository, after which you can use pull to incrementally add new changes.
These are really the basics of Mercurial, so I would propose you read this tutorial, followed by this Mercurial guide.
So I have managed to corrupt my mercurial repo. So I am following the steps from the repository corruption page on the wiki to repair it.
When I run the convert command:
hg convert --config convert.hg.ignoreerrors=True REPO REPOFIX
It gives me the following output:
initializing destination REPOFIX repository
REPO does not look like a CVS checkout
REPO does not look like a Git repository
REPO does not look like a Subversion repository
REPO is not a local Mercurial repository
REPO does not look like a darcs repository
REPO does not look like a monotone repository
REPO does not look like a GNU Arch repository
REPO does not look like a Bazaar repository
cannot find required "p4" tool
Why on earth would it say that? And how can I go about fixing it?
It definitely is a mercurial repository, it's hosted on Bitbucket, and I am using Tortoisehg to manage it.
Edit:
I think maybe I can't do this against a remote repository? How can I go about fixing this then?
You probably did not corrupt the remote repository at Bitbucket, did you?
It's more likely you corrupted your local copy, and so you can just clone it from Bitbucket again or try the hg convert … trick on your local copy (i.e. the folder you manage with TortoiseHG).
A bit late but I faced the same issue. The mistake was running that command inside the project folder. You have to run the command outside the folder containing the .hg file. I could not find a way through TortoiseHg console to move up a directory so I used windows terminal.
I'm using dreamhost to host a django app, and also the static content for the app. I want to have my static content versioned together with my application code.
Because the dreamhost install of hg is version 1.0.1, to use subrepos at all, one must install ones own version of hg. I have done so.
Once that is done, it is sufficient to create a .hgsub file with the location pointing to another repo, then just add the .hgsub file.
Now, the problem I have is that I want to push to my bitbucket repository, but:
(a) I would need to upgrade my python to be able to use https; and
(b) trying ssh I get the following error:
pushing to ssh://hg#bitbucket.org/marcintustin/oneclickcos
pushing subrepo public to ssh://hg#bitbucket.org/marcintustin/public
remote: conq: repository does not exist.
abort: no suitable response from remote hg!
(To confirm, I have registered my ssh key with bitbucket.)
Any suggestions?
You need to make site a Mercurial repository. Then add a .hgsub file with
project = project
public = public
and make a commit in the site repository. You'll see that it creates and tracks a .hgsubstate file with the changeset hashes of project and public. Make a local clone of site and the subrepositories will follow along nicely.
If that is not enough help, then my suggestion is to read the output of hg help subrepos, the Kick Start guide, and the subrepository wiki page again.
If those guides do not help you along, then come talk to us in #mercurial on irc.freenode.net or on the mailing list. Your question is not very specific and I think it is much easier to discuss this on the proper support channels.
I am a new guy in using Mercurial to maintain my code editions. My company's server is using SVN and I want to maintain my local repository, so I am commit into my Hg when I have a little change to my code. After testing my code carefully, then I can push back my code into SVN server.
I install TortoiseHg and I can clone other open source project to my computer. And I have HgSubversion plugin installed correctly.
Right now I can do the clone operation using following commands:
$ hg clone svn+https://XXXX:8443 test
But after the clone is finished, there is just a folder .hg under test folder.
Why this happen? How can I fix it?
Thanks
Water Lin
It might has some files which stored with non-ascii file name in repository. Mercurial can't treats non-ascii file name correctly so far. Have you tried to check out the log? You can do it with command "hg log" to make sure all files had been imported in to Mercurial. Then download and install the extention fixutf8. That can fix the problem. After you install fixutf8 you can update current working folder to tip reversion again.
I am new to Mercurial HG. My friends created a repo and I am going to use it.
I installed TortoiseHG and trying to get the latest code. I found that when using Clone operation, it will pull all code to my local, including the histories (Am I right?). This is not needed for me. I just wanna get the latest code. Is there an operation for this?
In short, no.
In a bit longer: Mercurial doesn't yet support “shallow” clones where you only get part of the history. So each time you clone you pull in the entire repository with all changesets.
Additionally, unlike Subversion, there is no way to make a “narrow” clone where you only checkout a portion of a repository. For example, if a repository has directories foo/ and bar/, there is no way to get only the bar/ directory. In other words, Mercurial always operates on project-wide snapshots.
The easiest way to achieve what you want:
hg archive [destination folder]
Once you cloned a repository, to get the code of the "tip" (the last version of the current branch - the default one if not precised) you just need to update.
You have an update action in TortoiseHG. Once done, you can look at the files in the folder.
If you wanted another state of the repository (an old version, or an old tagged state) then it's still the update command, with other parametters (see the docs or the TortoiseHG interface).
If you only want the latest code, and you don't intend to do anything related to the repository with it, like commit, or diff to older versions, or whatever, then you it depends on where you got the code from and how.
If he is using one of the hosting services, like bitbucket, there's usually a download link which gives you just the source code.
For instance, if you go here, there's a "Get source" link up and to the right which gives you a few choices in the file format (zip or whatnot.)
If you got the files somewhere else, you need to explore the interface you got them from. Try just pasting the link you cloned from into your browser and see what you get.
Sure. Clone the repository, then delete the .hg subdirectory.
I might be a bit late but actually it is possible to forget some history with Mercurial. You just need to enable convert extension from Your mercurial.ini file or .hgrc file.
[extensions]
hgext.convert=
Now you are able to use convert extension to "clone" only changesets starting from the revision specified.
hg convert --config convert.hg.startrev=[wheretostart] path_to_full_history_repo path_to_new_repo
Just note that this is not the same operation with hg clone. That's why the source repository must be a local repository. For example if we have a repository in folder MyProject and we want to forget all the changes done before revision 100. We can use the following command:
hg convert --config convert.hg.startrev=[100] MyProject MyShrinkedProject
If You are going to use this shrunken repository on a "central server" remember to take care of that everybody clones it before they continue working. Repositories are not compatible with each other anymore.
Mercurial now supports shallow clone using remotefilelog extension. Extension is bundled with mercurial probably since version 4.9. Older versions need to download the extension e.g. from github.
You have to enable it on the server e.g:
[extensions]
remotefilelog =
[remotefilelog]
server = True
serverexpiration = 14
and on client
[extensions]
remotefilelog =
[remotefilelog]
cachepath = /some/path
cachelimit = 5 GB
Than you can do shallow clone with much smaller footprint a and faster clone speed:
hg clone --shallow ssh://user#server/repo