hgignore

.hgignore file is not ignoring the maven target/site directory

谁都会走 提交于 2019-12-13 17:34:17
问题 I've created a basic maven/mercurial setup. I've created a .hgignore in the working directory. I have added the following to the .hgignore file (as per the instructions in https://www.mercurial-scm.org/wiki/.hgignore /target$ /.DS_Store$ .DS_Store$ I had run hg status and everything was ignored (as expected) I ran mvn site . Now, when I run the hg status command, everything but the site folder is being ignored in the target folder... e.g. ~/dev/blah >hg st ? target/site/css/maven-base.css ?

Honing the .hgignore file using a negative lookahead

久未见 提交于 2019-12-12 03:16:38
问题 I've looked at a handful of the other Hg hgignore file questions, but I haven't been able to get my regex to work. Imagine these files: Projects/search.intrasearch/newUI/override/xslt/foo.xsl Projects/search.intrasearch/newUI/default/ Projects/search.intrasearch/oldUI/baz/ I want to ignore the second two lines, but not the first. So, in Mercurial, I want to include files in the newUI/override directory and it's children, but that's it. In the real system, there are a bunch more directories

How to ignore the same directory in any trees with mercurial?

五迷三道 提交于 2019-12-11 09:29:34
问题 Hey I would like to ignore cache directories and the sub-tree of them everywhere. I tried the following: syntax: glob **/cache/** It seems it is not the right thing to do. Would somebody shed some light? 回答1: If you're wanting to ignore everything in and below the cache folder the following should work: syntax: glob cache/** 来源: https://stackoverflow.com/questions/4470029/how-to-ignore-the-same-directory-in-any-trees-with-mercurial

Weird negative lookahead handling in hgignore

大兔子大兔子 提交于 2019-12-11 08:24:58
问题 Out of a huge source tree, i want just one subfolder be tracked by Mercurial. specific/component/subfolder In any decent regex tool (Regex Coach, regexpal.com), the following is absolutely sufficient (and understandable) ^(?!specific/component/subfolder).+ meanwhile .hgignore insists on having ^(?!extras).+ ^extras/(?!extensions).+ ^extras/extensions/(?!sharing).+ as soon as i put slash inside the lookahead group, nothing gets through. Before calling this a bug (perhaps of yet another

funny that when .hgignore is added for Mercurial, this file itself shows up as “?” in hg status?

馋奶兔 提交于 2019-12-10 15:13:39
问题 Is it normal? So you just need to add \.hgignore to the list to ignore itself? 回答1: Yes, but you don't want to ignore the .hgignore file. When a new person checks out your repository, don't you want them to get your ignored-files list? Instead, do hg add .hgignore; hg commit . Bottom line: .hgignore is tracked like any other file in the repository. 回答2: Just to supplement Borealid's answer: ? in hg status means that the file is in the working directory, but not tracked. You usually see it in

how to add a dot-directory to mercurials hgignore

送分小仙女□ 提交于 2019-12-08 02:03:52
问题 I have used mercurial for some time now and never had any problems using hgignore. Now I have created a new project using eclipse, which added a .metadata directory. I seem to be unable to ignore the .metadata . nils@yavin $ hg status ? .metadata/.mylyn/repositories.xml.zip ? .metadata/.plugins/org.eclipse.core.resources/.history/37/509db4063df7001f14dbbfe704ff2c4e ... My .hgignore looks like this: syntax: regexp /\.metadata/.* \.metadata/.* glob:.metadata/* glob:.metadata/.mylyn/repositories

Applying hgignore file to already committed file Mercurial repo

雨燕双飞 提交于 2019-12-07 06:39:04
问题 Trying to do something similar to here: Applying .gitignore to committed files Where you apply the new hgignore file to the already committed files. I have node_modules folder already committed with thousands of files and I'd like to remove it by using the new hgignore file. I can't find anything online for it to work on a Mercurial repo, any ideas? Thanks! 回答1: Edit .hgignore to match files you want to ignore hg forget "set:hgignore()" and commit See in action: https://asciinema.org/a

.hgignore whole directory tree excepting one specific file

无人久伴 提交于 2019-12-06 19:00:52
问题 Can anyone tell me the .hgignore pattern to track one specific file in a directory and to ignore everything else? I have a "media" directory which contains a "default.png", for obvious purposes, and the rest of the directory will hold user media. We want hg to ignore everything in the media directory excepting the default file. 回答1: Try: syntax: regex ^media/.* or (leave it in the default glob and do) media/** and then manually hg add media/default.png . In mercurial (unlike in CVS) you can

how to allow files starting with period and no extension in windows 2003 server? [closed]

独自空忆成欢 提交于 2019-12-06 16:49:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 8 years ago . How can I create this file in a directory in windows 2003 SP2: .hgignore I get error: You must type a file name. 回答1: That's a "feature" of Windows Explorer. Try to create your files from a command line (or from a batch/program you wrote) and it should work fine. Try this from a dos prompt: echo Hello there! >

how to add a dot-directory to mercurials hgignore

ε祈祈猫儿з 提交于 2019-12-06 11:47:27
I have used mercurial for some time now and never had any problems using hgignore. Now I have created a new project using eclipse, which added a .metadata directory. I seem to be unable to ignore the .metadata . nils@yavin $ hg status ? .metadata/.mylyn/repositories.xml.zip ? .metadata/.plugins/org.eclipse.core.resources/.history/37/509db4063df7001f14dbbfe704ff2c4e ... My .hgignore looks like this: syntax: regexp /\.metadata/.* \.metadata/.* glob:.metadata/* glob:.metadata/.mylyn/repositories.xml.zip As you can see, I tried some things... I even tried adding one file directly, but it did not