Yep, that does the trick. I'd seen the update command but didn't realise
this was its purpose.

Should fossil close/open behave differently from fossil update? Is this a
bug in Fossil, or is it deliberate?


On Wed, Jul 13, 2011 at 3:20 PM, Andreas Kupries
<andre...@activestate.com>wrote:

> On 7/13/2011 12:14 PM, Tomek Kott wrote:
> > I think the issue is that "fossil close" doesn't clear out the directory,
> and
> > "fossil open" I only overwrites files from the opened checkout, but does
> not
> > delete any files. So if you were to issue "fossil extras" my guess is
> file2
> > would be in that list.
>
> To change branches it is not necessary to 'close' the workspace.
> Just do
>
>        fossil update <branchname>
>
> That will properly remove/add/update the files in the workspace.
>
> >
> > Tomek
> >
> > On Wed, Jul 13, 2011 at 2:55 PM, Brian Cottingham <spiffyt...@gmail.com
> > <mailto:spiffyt...@gmail.com>> wrote:
> >
> >     When I switch between branches Fossil isn't removing files that
> belong to
> >     the previous branch but not the current branch. Am I doing something
> wrong?
> >
> >     Example:
> >     ===
> >     $ fossil new prj.fossil
> >     project-id: 7e92eb48abd299ca1340a7bc0c86dba38097ad3e
> >     server-id:  7efed910652f4fbceef4ec8cdcb152e7c944e7cc
> >     admin-user: spiffy (initial password is "efa50e")
> >
> >     $ fossil open prj.fossil
> >
> >     $ touch new_file
> >
> >     $ fossil add new_file
> >     ADDED  new_file
> >
> >     $ fossil commit -m "added a file"
> >     New_Version: 8d4d39876638575032bc831ac5f88974c83d3beb
> >
> >     $ fossil branch new branch2 trunk
> >     gpg: no default secret key: secret key not available
> >     gpg: out-1D64657C0C0F0F82BE9E: clearsign failed: secret key not
> available
> >     unable to sign manifest.  continue (y/N)? y
> >     New branch: 7c68434806ceddcb1d72949deb5b8caffe1fd58f
> >
> >     $ fossil close
> >
> >     $ fossil open prj.fossil branch2
> >     project-name: <unnamed>
> >     repository:   /tmp/tmp_project/prj.fossil
> >     local-root:   /tmp/tmp_project/
> >     project-code: 7e92eb48abd299ca1340a7bc0c86dba38097ad3e
> >     server-code:  7efed910652f4fbceef4ec8cdcb152e7c944e7cc
> >     checkout:     7c68434806ceddcb1d72949deb5b8caffe1fd58f 2011-07-13
> 18:43:55 UTC
> >     parent:       8d4d39876638575032bc831ac5f88974c83d3beb 2011-07-13
> 18:43:36 UTC
> >     tags:         branch2
> >     comment:      Create new branch named "branch2" (user: spiffy)
> >
> >     $ ls
> >     _FOSSIL_  new_file  prj.fossil
> >
> >     $ touch file2
> >
> >     $ fossil add file2
> >     ADDED  file2
> >
> >     $ fossil commit -m "Added another file"
> >     New_Version: b8d0fde1bfc76e4d25a897fd0d2f6d346cb2577a
> >
> >     $ fossil close
> >
> >     $ fossil open prj.fossil
> >     project-name: <unnamed>
> >     repository:   /tmp/tmp_project/prj.fossil
> >     local-root:   /tmp/tmp_project/
> >     project-code: 7e92eb48abd299ca1340a7bc0c86dba38097ad3e
> >     server-code:  7efed910652f4fbceef4ec8cdcb152e7c944e7cc
> >     checkout:     8d4d39876638575032bc831ac5f88974c83d3beb 2011-07-13
> 18:43:36 UTC
> >     parent:       259984cdf37539a77ab9fb7e5da3255df7dd7729 2011-07-13
> 18:42:54 UTC
> >     child:        7c68434806ceddcb1d72949deb5b8caffe1fd58f 2011-07-13
> 18:43:55 UTC
> >     tags:         trunk
> >     comment:      added a fdle (user: spiffy)
> >
> >     $ ls
> >     file2  _FOSSIL_  new_file  prj.fossil
> >     ===
> >
> >     file2 should not appear when I am viewing the trunk branch because it
> >     doesn't exist there- it only exists in the branch2 branch.
> >
> >     _______________________________________________
> >     fossil-users mailing list
> >     fossil-users@lists.fossil-scm.org <mailto:
> fossil-users@lists.fossil-scm.org>
> >
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
> >
> >
> >
> >
> > _______________________________________________
> > fossil-users mailing list
> > fossil-users@lists.fossil-scm.org
> > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
>
> --
> Andreas Kupries
> Senior Tcl Developer
> ActiveState, The Dynamic Language Experts
>
> P: 778.786.1122
> F: 778.786.1133
> andre...@activestate.com
> http://www.activestate.com
> Get insights on Open Source and Dynamic Languages at
> www.activestate.com/blog
> _______________________________________________
> fossil-users mailing list
> fossil-users@lists.fossil-scm.org
> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
>
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to