commit needs a --exclude option

Bug #3117 reported by Mark Shuttleworth on 2005-10-13
8
Affects Status Importance Assigned to Milestone
Bazaar
Wishlist
Robert Collins

Bug Description

Bzr needs the ability to commit all changes EXCEPT those in specified file(s)

Often I am working on code and want to have local changes that are not committed. For example, I might change a debug setting in a makefile. But I don't want to commit that to the archive, for everybody. It would only be kept in that state for a few commits. What I woudl like, is a way to commit the rest of my changes, but not those in a specified file or files.

  bzr commit --exclude=Makefile -m "foo bar"

In baz we have the reverse, the ability to commit ONLY the changes in a specific file. For completeness, it would be nice to have both options in bzr.

Related branches

summary: + Bzr needs the ability to commit all changes EXCEPT those in specified
+ file(s)
John A Meinel (jameinel) wrote :

Well, right now in bzr we do have the reverse. You can say:
bzr commit -m "Foo" change1 dir2/change

I'm not sure if
bzr commit -m "just dir2" dir2/

works properly.

Also, there is the shelf plugin provided by bzrtools. Which lets you specifically pack up some of your changes (undo) so that you can bring them out later. Eventually we want to integrate some sort of undo using changesets.

So there are some workarounds right now, but I do agree that some sort of exclude files option would be nice.
Do we want to read from a file, use a regex, or take a series of --exclude (-x?)

I would tend to read exact names from a file, since that is the easiest way to get multiple files. Though we could use the --exclude=@filename that some programs use.

Changed in bzr:
status: Unconfirmed → Confirmed
Robert Collins (lifeless) wrote :

we could use a simple google-search like metaphor and treat -foo as 'without foo' (assuming there is no actual path -foo). And when there is a -foo include it or error or something.

For now, -x foo -x bar would be best I think

On Fri, Aug 1, 2008 at 1:51 PM, Robert Collins
<email address hidden> wrote:
> we could use a simple google-search like metaphor and treat -foo as
> 'without foo' (assuming there is no actual path -foo). And when there is
> a -foo include it or error or something.

I think that's fine in a web ui but would be pretty weird on a unix
command line, as -foo already looks like the options -f -o -o.

I agree, -x goo and --exclude-from /tmp/exclude.lst

--
Martin <http://launchpad.net/~mbp/>

Robert Collins (lifeless) wrote :

Fixed except for a listing file facility; mind you that applies to specific-files too, I don't see that its specific to excludes and as such can be considered later and separately.

Changed in bzr:
assignee: nobody → lifeless
status: Confirmed → Fix Committed
Changed in bzr:
milestone: none → 1.6
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers