Switching between branches with uncommited changes.

Michael Gliwinski Michael.Gliwinski at henderson-group.com
Wed Nov 11 15:45:45 GMT 2009


Hello all,

Wanted to ask before I go logging tickets for it.

Currently `bzr switch` in lightweight checkout allows you to switch to 
different branch even if there are uncommited changes.  Is this by design?

The reason I'm asking is one of my fellow devs was just bitten by it (they're 
only starting to use Bazaar, or any VCS for the matter and forgetting to 
commit still happens quite a bit).

Still it seems to me that shouldn't be allowed by default.  What do others 
think?


Just to be clear, the behaviour I'm describing is:

$ bzr init-repo --no-trees switch-test && cd switch-test
...
$ bzr init trunk
...
$ bzr co --lightweight trunk work && cd work
$ echo foo > a
$ bzr add a
adding a
$ bzr ci -m "Added a."
$ bzr branch ../trunk ../feature-b
$ bzr switch ../feature-b/
Tree is up to date at revision 1.
Switched to branch: /home/gliwm/.local/tmp/switch-test/feature-b/
$ echo bar > b
$ bzr add b
adding b
$ bzr switch ../trunk/
Tree is up to date at revision 1.
Switched to branch: /home/gliwm/.local/tmp/switch-test/trunk/
$ ls -l
total 8.0K
-rw-r--r-- 1 gliwm gliwm 4 2009-11-11 14:31 a
-rw-r--r-- 1 gliwm gliwm 4 2009-11-11 14:32 b
$ bzr st
added:
  b


-- 
Michael Gliwinski
Henderson Group Information Services
9-11 Hightown Avenue, Newtownabby, BT36 4RT
Phone: 028 9034 3319

**********************************************************************************************
The information in this email is confidential and may be legally privileged.  It is intended solely for the addressee and access to the email by anyone else is unauthorised.
If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted to be taken in reliance on it, is prohibited and may be unlawful.
When addressed to our clients, any opinions or advice contained in this e-mail are subject to the terms and conditions expressed  in the governing client engagement leter or contract.
If you have received this email in error please notify support at henderson-group.com

John Henderson (Holdings) Ltd
Registered office: 9 Hightown Avenue, Mallusk, County Antrim, Northern Ireland, BT36 4RT.
Registered in Northern Ireland
Registration Number NI010588
Vat No.: 814 6399 12
*********************************************************************************




More information about the bazaar mailing list