I got all the fonts from the Google font project on my computer via Terminal by using:
hg clone someURL;
I would like to delete it all from my computer. I've seen the following code suggested in another thread:
rm -r .hg
I'm uncertain what the .hg refers to though. There are less than 20 fonts in the 'googlefontdirectory' folder, even though I can use many more Google fonts in various apps. I'm concerned that simply deleting the 'googlefontdirectory' folder won't get rid of everything, since most of the fonts don't seem to be there. What is the best way to delete/remove all fonts that came with the 'hg clone'?
ALL files in repo, cloned by hg clone command placed inside one directory, which is Working Copy and local repository in .hg subdir. rm -r .hg doesn't remove all cloned data, only repository without working copy
hg help clone
...
Create a copy of an existing repository in a new directory.
If no destination directory name is specified, it defaults to the
basename of the source.
Added results of repo-clone
There are less than 20 fonts in the 'googlefontdirectory' folder
Really?!
hg clone https://code.google.com/p/googlefontdirectory/
...
added 3056 changesets with 60182 changes to 46816 files (+1 heads)
updating to branch default
27215 files updated, 0 files merged, 0 files removed, 0 files unresolved
dir /S *.ttf
...
Total Files Listed:
1295 File(s) 201 270 824 bytes
Related
On a CentOS Linux machine, I have copied a folder project that has mercurial.
Hg status
in the source folder was clean.
Now hg status in the new folder shows modified files. Those files seem to be quasirandom: 2 php files and most of the image folder from almost a thousand files.
Of course,
hg diff -g
dows not show anything.
I've done this before to create a test instance of the same project, different branch, and everything was ok.
I've read here about modified permissions, but this is not the case. I've looked in the filesystem and all files pairs are 0644 and are identical.
Is there any other file property that is tracked by Mercurial and can be modified by a file copy command?
Edit 1
As it turns out,
hg diff --git
shows permissions modified from 755 to 644, but I'm looking at the files in the original folder and this is not true. All files are 644, but for reasons unknown, Mercurial thinks they are 755
Edit 2
So, the theory is that the old repo is somehow borked: it thinks some files are 755 while in fact they are 644.
To prove the theory I cloned the repo using hg clone and lo and behold, in the new repo all those specific files are cloned as 755.
Checked again the source: 644. Destination: 755
So much for Mercurial reliability
I have got a new repository converted from SVN. I want to minimize this repository further by removing unintended files.
For that I am again converting the mercurial repository to a new one by using hg convert and the filemap parameter.
So my filemap looks like this:
include a
rename a .
The command I am using is:
hg convert --filemap fm.txt . ../new_repo
This ends after full conversion as I can see in the console output.
But if I now check the content of the directory new repo, I can see only .hg files in there.
I ran hg update -C within the directory whic gives me one more file .hgtags
Can anyone please suggest what has gone wrong?
This answer was spot on: you don't actually create an empty directory, but a directory with a hidden .hg directory. If you run
hg update
in your target directory, you will have your target directory with all its contents as expected.
In common, you done all correct (if directory a exist in source repo)
In my test for repository with directory lang, which I want to move into the root of new repo, I used filemap
include lang
rename lang .
identical to your filemap and got bare repository after converting (no files in Working Dir, only repository on .hg). Testing repository
hg log
changeset: 19:41e96453fa67
tag: tip
...
changeset: 0:ba52ea5c5c1f
showed me all related hisory
hg up
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(without -C) brings all files into the Working Directory
SR>dir /B
.hg
UTF-8
I want to clone my Mercurial repository into my /public_html folder on my web server. My Mercurial project looks like this...
- /ProjectName
- /public
- /application
- /config
- /library
What I want is to just get the contents of "ProjectName" into my /public_html folder. Unfortunately, cloning the repository includes "ProjectName" and all of the subfolders are in there.
Any idea how to accomplish this without a symbolic link?
Just to put it out there, you probably don't want a full clone in your public_html unless you really want every version that ever was out there on the web. There's nothing inherently wrong with that, but since you'll have a .hg in public_html people will even be able to clone your repository from it.
Instead consider using the hg archive command which exports all the files as they exist at a specific revision and places them wherever you want.
For example:
cd your_clone
hg archive --rev release /public_html
That takes the code pointed to by the release label (which could be a tag, bookmark, or branch head) and puts the files, but not a full-history clone, in /public_html.
I actually found an easy way to do this.
hg clone https://me#bitbucket.org/me/ProjectName "/home/website/public_html"
public_html has to be empty to clone the repository into it, so I moved everything out, cloned the repo, then moved the pre-existing files and folder back.
Here is a simple step that you can follow:
cd /public_html
hg init .
hg pull ../pathto/ProjectName/
This will pull all the files and folders under ProjectName in public_html without creating /public_html/ProjectName.
But it will still copy all the resources that are in the mercurial repository (Files and Folders) into your directory.
I created a repository and synchronized it with a remote repository.
The files are compressed and each has an (i) extension.
I want to extract the files to a new folder (not repository) with decompressing them and with their original name as I see them on the web browsing on Google code.
Normally you do hg clone <remoteRepoPath> <localPath> to do that, which automatically updates the working directory.
Since you did an hg init and then hg pull from the remote repo, you need to do hg update and it will fill the working directory with the actual files.
All those .i files under the .hg directory are the repository's storage and indexes and such. Very rarely does anybody mess with those manually. Most of the time the only thing people touch under the .hg directory is the hgrc file and patch queues.
I am trying to pull some files and directories and I am having the following messages:
When I look in my repository I can see that the files have been downloaded but all contains _ as prefix, and even the names of files and folders contain _
requesting all changes
adding changesets
adding manifests
adding file changes
added 1094 changesets with 4304 changes to 1071 files abort:
untracked file in working directory differs from file in requested revision: '.hgignore' [command interrupted]
What is wrong?
I think you have created a .hgignore in your working directory without adding it to the repository (hg add). This file is "untracked".
Someone else, from another clone, has added this file too, committed and pushed it. Now, when you try to update your working directory, Mercurial try to add this file but sees a file with the same name in your working directory which is untracked and different.
There's two solution to your problem :
Backup your .hgignore file, do the update and add the differences from the backup if necessary
Add your own file to the repository with hg add, then re-run the update. It will maybe be necessary to commit the file prior to the update.
I'll advise using the first solution.
When you say the files in the repository have _ as a prefix, you're looking down inside the .hg directory aren't you? That's the data store for Mercurial itself and the files in there are revlogs, not your files. Outside of .hg you'll have a working directory where the files are the actual files you expect. You're not getting one of those now because hg update is refusing to update the working directory because doing so would overwrite your uncomitted .hgignore file.
What exact command are you running? It looks like it's doing a hg pull followed by an hg update so I'd guess hg clone but if you already have a .hgignore lying around that's not the right command to use. If instead you're using hg pull -u or hg fetch you should just use hg pull instead to get the changesets. Then you can:
hg add .hgignore # add the hg ignore file you already have that's untracked
hg commit -m .hgignore # commit the .hgignore file you just added
hg merge # merge your new commit (.hgignore) with the changesets you just pulled down.