[fossil-users] Beginners question
Hello all, I have two branches of my project under fossil management, trunk and stable. My intention being to perform new developments in trunk and to keep stable for releases and bug fixes. These are set up in two directories ~/project/trunk and ~/project/stable. Whilst in directory ~/project/stable I performed a commit. To my surprise, this ended up being a commit to the trunk branch. Also there were new files included in the commit, and located in ~/project/stable, so these are also now included in trunk within fossil. How do I correct this? Can I move the commit to stable? Or can I undo the last action? (fossil undo) Thanks for any help! ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] importing cvs cannot override date and user for tags and branches
On Wed, 29 Sep 2010 19:23:21 -0400, Richard Hipp wrote: On Wed, Sep 29, 2010 at 7:16 PM, Rene wrote: I'm importing a cvs repo and are able to override in the checkins the user and the date fossil commit --override-user olduser --override-date 2004-04-01 08:10:42 -m oldlog message Is there a similar possibility for branches and tags? Not at this time. But that is easy enough to add. I'll try to get to this later tonight, or failing that tomorrow. Remind me if I forget. Thanks -- Rene ___ fossil-users mailing list fossil-users@lists.fossil-scm.org [2] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users [3] -- D. Richard Hipp d...@sqlite.org [4] I remember that you migrated sqlite from cvs to fossil. So I looked at http://www.sqlite.org/src/ and saw the branches and tags with correct dates. I wonder how did you do that? -- Rene Links: -- [1] mailto:renew...@xs4all.nl [2] mailto:fossil-users@lists.fossil-scm.org [3] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users [4] mailto:d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Beginners question
The thing that gives me pause is that fossil would not jump branches just for fun. Perhaps you had accidentally opened trunk in your stable directory and didn't notice? (I usually run `fossil status` before I commit, in part to avoid such errors.) Or else is it possible you've come from SVN, and you actually have only opened your repository once (in ~/project) and are trying to use the two directories withing a single checkout as branches? If the latter, fossil (like most everything that isn't SVN) doesn't work that way. To work in two different branches, you'd do something like: $ fossil new ~/myrepo.fossil $ mkdir -p ~/project/trunk ~/project/stable $ cd ~/project/trunk $ fossil open ~/myrepo.fossil $ # add some files $ fossil commit -m my first checkin $ cd ~/project/stable $ fossil open ~/myrepo.fossil $ # change something $ fossil commit -m a stable bugfix --branch stable If you've gotten started in the SVN style, with both branches in separate directories of a single checkout, I don't think there's any way to correct it other than to start over. If, however, you just accidentally ended up on the wrong branch: `fossil undo` only works on update/merge/revert. You can effectively cancel a check-in by using `fossil ui`, going to the timeline, clicking on the commit, clicking on 'edit' (by 'Other Links:'), and using the checkbox and textbox by 'Branching' to move it to another branch (e.g., 'oops') and marking the Leaf Closure checkbox as well. I don't know what happens if you try to use the branching section to try to move a commit to trunk or another existing branch. If your changes are not easy to recreate, follow these steps after the above fiddling in fossil ui: $ fossil checkout branch-you-were-accidentally-on --keep $ fossil status You should see that you're on trunk with a list of changed files $ fossil extras you should see the new files that aren't yet added to the repo $ fossil update branch-you-meant-to-be-on $ fossil status $ fossil extras these should show the same files as before, but should indicate that you're on stable $ fossil add all-the-new-files-you-wanted-to-add $ fossil commit -m hey, now these changes are on the right branch -- Joshua Paine LetterBlock: Web applications built with joy http://letterblock.com/ 301-576-1920 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Beginners question
On Thu, Sep 30, 2010 at 7:40 AM, Joshua Paine jos...@letterblock.comwrote: The thing that gives me pause is that fossil would not jump branches just for fun. Perhaps you had accidentally opened trunk in your stable directory and didn't notice? (I usually run `fossil status` before I commit, in part to avoid such errors.) Running fossil status prior to a commit is a good habit. Another good habit is to run fossil diff prior to each commit, to see exactly what it is your are committing. On Mac, the following is useful: fossil diff | open -f Note also when you are prompted for the check-in comment (assuming you do not use the -m option) that the current branch is clearly shown in the prepackaged text of the comment, so that you can double-check that you are going into the right branch. What if you have made a bunch of changes on stable when you (mistakenly) thought you were working on trunk? Prior to commit you can just do fossil update trunk That will shift you over to the trunk branch. If you are already on the head of trunk, then the command above is a harmless no-op, so maybe it would be a good idea to always do fossil update branch-you-think-you-are-on prior to a commit. Or else is it possible you've come from SVN, and you actually have only opened your repository once (in ~/project) and are trying to use the two directories withing a single checkout as branches? If the latter, fossil (like most everything that isn't SVN) doesn't work that way. To work in two different branches, you'd do something like: $ fossil new ~/myrepo.fossil $ mkdir -p ~/project/trunk ~/project/stable $ cd ~/project/trunk $ fossil open ~/myrepo.fossil $ # add some files $ fossil commit -m my first checkin $ cd ~/project/stable $ fossil open ~/myrepo.fossil $ # change something $ fossil commit -m a stable bugfix --branch stable If you've gotten started in the SVN style, with both branches in separate directories of a single checkout, I don't think there's any way to correct it other than to start over. If, however, you just accidentally ended up on the wrong branch: `fossil undo` only works on update/merge/revert. You can effectively cancel a check-in by using `fossil ui`, going to the timeline, clicking on the commit, clicking on 'edit' (by 'Other Links:'), and using the checkbox and textbox by 'Branching' to move it to another branch (e.g., 'oops') and marking the Leaf Closure checkbox as well. I don't know what happens if you try to use the branching section to try to move a commit to trunk or another existing branch. You'll probably end up with two forks in the same branch, which you would then need to merge. But it should work. If you mistakenly made changes to stable when you should have been working on trunk, and you already committed those changes, probably the right fix would be: (1) Move the mistaken check-in off into a new oops branch to get it out of the way using the Edit feature described by Joshua. (2) fossil update trunk (3) fossil merge --cherrypick mistaken-check-in In step (3), you are taking all the changes that were mistakenly applied to stable and reapplying them to trunk. Assuming all that works, test your code again (and run fossil status and fossil diff just to make sure everything is right) then do your fossil commit against the trunk. If your changes are not easy to recreate, follow these steps after the above fiddling in fossil ui: $ fossil checkout branch-you-were-accidentally-on --keep $ fossil status You should see that you're on trunk with a list of changed files $ fossil extras you should see the new files that aren't yet added to the repo $ fossil update branch-you-meant-to-be-on $ fossil status $ fossil extras these should show the same files as before, but should indicate that you're on stable $ fossil add all-the-new-files-you-wanted-to-add $ fossil commit -m hey, now these changes are on the right branch -- Joshua Paine LetterBlock: Web applications built with joy http://letterblock.com/ 301-576-1920 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] Fossil remembering passwords
Hello, on linux, fossil does not remember the remote passwords for my push/pull commands. Nevertheless, I built fossil on cygwin, and it asks me the password only at the time of clone, and then all push/pull operations go for granted. Can anyone tell me where is fossil saving the password, how, and how can I disable/enable this? By the way, I had to build fossil on cygwin in order to use properly the cygwin 'vim', which did not cope well with a non-cygwin fossil at the time of editing the commit comments. Regards, Lluís. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Beginners question
Quoting David tw dtw...@gmail.com: Hello all, I have two branches of my project under fossil management, trunk and stable. My intention being to perform new developments in trunk and to keep stable for releases and bug fixes. These are set up in two directories ~/project/trunk and ~/project/stable. This is not really the setup that is typically used with Fossil (or any other CMS). You want to have a directory called /project and then let Fossil handle the contents of the directory dependent upon what branch is checked out. There should be no need for you to maintain trunk and stable subdirectories (however, IF you were to do so then you would want to ensure that the stable subdirectory is not tracked in the trunk branch, and that the trunk subdirectory is not tracked in the stable branch). If you feel it is better to maintain separate trunk and stable *directories*, I would propose that you handle them as separate checkouts from the same repository. The Fossil repository itself would not contain the directories. $ mkdir trunk $ cd trunk $ fossil open /fossil_repos/project.fossil $ fossil checkout trunk $ cd .. $ mkdir stable $ cd stable $ fossil open /fossil_repos/project.fossil $ fossil checkout stable With this setup, your role as a developer would depend upon which directory you are in. This is basically what would happen if two different developers were working on the code simultaneously, one on the stable branch and one on the trunk. Whilst in directory ~/project/stable I performed a commit. To my surprise, this ended up being a commit to the trunk branch. Keep in mind that Fossil tracks whatever files that have been ADDed to the branch, regardless of where those files reside in your source tree. If you created a new stable branch by branching off of trunk then from the outset, stable will be tracking the same files that were being tracked in trunk (at the time of the branching). Unless you actually remove those trunk files (using 'fossil rm trunk/*' or somesuch), those trunk files will still be tracked during checkouts of the stable branch. ... Also there were new files included in the commit, and located in ~/project/stable, so these are also now included in trunk within fossil. My guess is that this was caused by a somewhat separate issue. A common mistake I made when starting out was to create a new branch and then assume that I was then working in that newly created branch. This is not the case. One must explicitly switch to a newly created branch (using fossil co branch). How do I correct this? Can I move the commit to stable? Or can I undo the last action? (fossil undo) You can't undo things in the sense of removing all traces of your mistake, but you can correct things by recommitting the appropriate checkouts to the appropriate branches. But you also have to fix the cause of the problem in the first place: that you have trunk files still being tracked in the stable branch -- and more importantly, that you are basically using branches incorrectly. Personally, I would recommend that you start over with a new Fossil project, and port over the files from your current project. If you want to retain the editing history then you will have to copy the files (and then commit) for each checkout in the original. This procedure is not too bad if you only have a couple dozen checkouts in the original and it will also help you detect any similar errors that have occurred previously but have gone unnoticed. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] Beginners question
Thanks for all your help, the repo is correct now and I have understood my mistake. On Thu, Sep 30, 2010 at 5:36 PM, David tw dtw...@gmail.com wrote: Hello all, I have two branches of my project under fossil management, trunk and stable. My intention being to perform new developments in trunk and to keep stable for releases and bug fixes. These are set up in two directories ~/project/trunk and ~/project/stable. Whilst in directory ~/project/stable I performed a commit. To my surprise, this ended up being a commit to the trunk branch. Also there were new files included in the commit, and located in ~/project/stable, so these are also now included in trunk within fossil. How do I correct this? Can I move the commit to stable? Or can I undo the last action? (fossil undo) Thanks for any help! ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users