Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bazaar: Ignoring files locally but not in centralized repository?

Tags:

We have a centralized development server, with everyone working from local checkouts. How can we ignore a specific directory only in our local repositories and not in the centralized repository?

Some background information: The project is a Drupal site, and the files directory of this site is always in flux. As we don't want any changes to the local files directory to be committed to the centralized repo, we ignore this directory using .bzrignore. The problem is that this means the files directory on the centralized development server will also be ignored, which is not what we want. We want to get its changes when updating/checking out, but not be able to commit our own changes to the files directory.

like image 268
ximo Avatar asked Feb 01 '10 12:02

ximo


2 Answers

At the moment it seems not to be possible to perform such a task directly. It is, however, already added to the wishlist in bzr issue tracker.

like image 81
Jawa Avatar answered Nov 15 '22 07:11

Jawa


For now you can use views to hide them. Just generate a view with just the files you want to keep.

To do this with on my Mac OS X machine I ran the following commands:

find dir1/ dir2/ | sed 's/\(.*\)/"\1"/g' | xargs bzr view --name keep-versioned

All the files in your working copy directory not in dir1 or dir2 will be ignored until you delete the view, like so:

bzr view --delete --name keep-versioned
like image 32
Phillip Whelan Avatar answered Nov 15 '22 06:11

Phillip Whelan