Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411283 Posts in 69325 Topics- by 58380 Members - Latest Member: bob1029

March 29, 2024, 02:24:38 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Ignore whole folder in TortoiseHG/Mercurial?
Pages: [1]
Print
Author Topic: Ignore whole folder in TortoiseHG/Mercurial?  (Read 3257 times)
Lo-Fi
Level 1
*



View Profile
« on: April 16, 2015, 02:44:41 PM »

Hey all.

Recently my repository has become too large, so I want to ignore some of the folders within the project so that I don't take up so much space. I know how to ignore individual files, but when I ignore a folder, it doesn't do anything. I can go through each individual file and ignore those, but that would be way too tedious, as it forces you to add them one at a time. Any ideas?

Edit: on a similar note, what do you all use to manage art and sound files? I've been using Mercurial to handle all of my files, but that's why my repo size has become so big, and bitbucket recommends not doing that. Having to copy over my assets to google drive every time I commit seems like a hassle, and doesn't seem very efficient. What other options do I have?
Logged

riksteri
Level 0
**



View Profile
« Reply #1 on: April 16, 2015, 08:59:09 PM »

Recently my repository has become too large, so I want to ignore some of the folders within the project so that I don't take up so much space. I know how to ignore individual files, but when I ignore a folder, it doesn't do anything. I can go through each individual file and ignore those, but that would be way too tedious, as it forces you to add them one at a time. Any ideas?

I use the glob syntax, which enables me to just use the folder name directly to ignore it. I put a slash and a wildcard after the folder name in the hopes it then only ignores folders with that name and not individual files that happen to have that same name, but I don't actually know if that works (I haven't yet had any files with same names as my folders). To illustrate:

Code:
syntax: glob
obj/*

Now folder named "obj" gets ignored. Just a line "obj" instead of "obj/*" would work as well, but also ignore any files named "obj".

By default, hg uses regular expression patterns when parsing the ignore file. The "syntax: glob" changes the expected syntax for all lines after that line, until syntax is changed again with "syntax: regexp". I just put "syntax: glob" as the first line of my .hgignore and use that for the whole file.

For the regexp syntax, I suspect the pattern for ignoring folders is different. If you want to use the regexp syntax, this page from the Mercurial wiki might help you.
Logged
InfiniteStateMachine
Level 10
*****



View Profile
« Reply #2 on: April 18, 2015, 05:47:38 AM »

Mercurial has a large file extension. You might look into that for your art data.

http://mercurial.selenic.com/wiki/LargefilesExtension

There's other ways to go about it but they are non-trivial if you wan to keep the integrity of your data to match code submissions. 
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic