Feature #134

Provide "Ignore" button

Added by Tim Murray-Browne about 13 years ago. Updated almost 13 years ago.

Status:ClosedStart date:2011-04-05
Priority:NormalDue date:
Assignee:Chris Cannam% Done:

0%

Category:-
Target version:-

Description

Some files you never want to version control, for example *.pyc (Python bytecode), .DS_Store (some kind of OS X file).

Some files you never want to version control within a certain project (e.g. outputted *.png files that your program is producing, or everything in a folder called 'output').

It would be nice to have file exclude filters so that files you really do want to version track are more visible under the 'Untracked' box. Also, it would be nice to be able to make these a general preference for all projects, or a project-specific preference.

History

#1 Updated by Chris Cannam about 13 years ago

  • Assignee set to Chris Cannam
  • Priority changed from Low to Normal

This is provided for by Mercurial, but the interface for it is somewhat lacking in EasyMercurial.

Mercurial supports a file called .hgignore which is contained in the project repository (i.e. it gets pushed from repo to repo along with everything else) listing file patterns to be ignored.

The format, with an example, is shown here.

To edit this from within EasyMercurial, use Advanced -> Edit .hgignore File.

Adding a nicer way to do this for individual files has been one of the planned features for EasyHg since the start, but I haven't got around to doing it yet I'm afraid. Hence, leaving this request open even though a workaround exists.

#2 Updated by Chris Cannam about 13 years ago

It would also be nice to be able to provide a default .hgignore file -- there are some files (.DS_Store is a good example) we know we never want to track. However, a good interface for doing this without confusing people when they can't find files they had expected to see, or when they move to another tool (e.g. command line) and find the behaviour is different, currently eludes me.

#3 Updated by Tim Murray-Browne about 13 years ago

You could make it so that the first time a file matching a pattern the default ignore list is detected in the project a message pops up asking if the user would like to add it to the ignore list.

Also, it would be nice to be able to highlight files in the Untracked box and then click an ignore button to add those specific files to .hg-ignore. Maybe you could also keep a default list of things that are 'sometimes ignored', like *.txt, and if no .txt files have been added to the project so far and you ignore one of them then it asks you (once) if you'd like to ignore all .txt files.

#4 Updated by Chris Cannam about 13 years ago

The original plan was to have an "ignore button", and then to ask you (when you pressed it) whether you'd like to ignore only that file or all files with that extension. Very happy to have these further suggestions though.

#5 Updated by Chris Cannam almost 13 years ago

  • Subject changed from Provide option to exclude certain files from 'Untracked' box based on filter to Provide "Ignore" button

#6 Updated by Chris Cannam almost 13 years ago

  • Status changed from New to Closed

"Ignore" is now provided in the right-button menu on the untracked file list (as of 2af4b5b0bf83). When activated, it offers options to ignore the selected files only, or files with their names in any directory, or files with their extensions anywhere, or the whole directory containing the files (as applicable).

I think that, with appropriate documentation (!), this will have to do for now. There are too many unsatisfactory aspects to trying to provide another button with equal status to the existing left-toolbar buttons -- not least of which are the lack of vertical space in the default layout and the lack of an obvious icon for it.

I'm therefore closing this feature request for now. Bugs in the new feature should be filed as separate bug reports.

Also available in: Atom PDF