On Aug 28, 2009, at 1:15 PM, Altu Faltu wrote:

> With same local repository, my observation is that changes in one  
> private branch are going to other (new) checkouts. I don't expect  
> that as other (new) checkouts, I assume, are from trunk branch.

Right.  A branch (even a private branch) lives in a repository.  If  
you do two or more check-outs from the same local repository, all the  
changes see the same set of branches.  If you want one check-out to  
not see some branches, then clone the repository and do checkouts from  
different clones.

>
> Following command sequence with check it:
>
> # Remote repository
> fossil new remote.fossil
> fossil open remote.fossil
> echo "Original line" > test.txt
> fossil add test.txt
> fossil commit -m "Original commit"
> fossil close
>
> # Local clone
> mkdir local; cd local
> fossil clone ../remote.fossil local.fossil
>
> # First checkout & private checkin
> mkdir open1; cd open1
> fossil open ../local.fossil
> echo "Private" >> test.txt
> fossil commit -m "Private" --private
> fossil sync
> cd ..
>
> # Verify with a new checkout
> mkdir open2; cd open2
> fossil open ../local.fossil
> cat test.txt
> cd ..
>
> Here, I do not expect word 'Private' to be in test.txt, unless I ask  
> 'fossil open' to checkout from private branch. I expect new checkout  
> from 'trunk', unless I override it.

Fossil opens the most recent check-in.  If you want to open the most  
recent check-in from the branch named "trunk" then do:

     fossil open ../local.fossil trunk

You can, of course, replace "trunk" in the example above with any  
other branch name, or tag name, or SHA1-hash prefix that you want.

>
> A couple of more questions:
> 1. If I have two private branches with same name, how can I  
> differentiate between them?

Well, you could do "fossil ui" and browse around to see which check- 
ins are which.  You might want to relabel on of the "branches" to  
something different to help you distinguish them in the future.

> 2. If I use '--branch NAME --provate', does it create a private  
> branch with name NAME, which will not get pushed to remote repository?

Yes.  The --private option makes sure that the branch is private.  The  
--branch option simply changes its name.  You can also use --bgcolor  
to change the default background color to something other than orange.

>
> - Altu
>
>> ----- Original Message -----
>> From: "D. Richard Hipp" <[email protected]>
>> To: "Altu Faltu" <[email protected]>
>> Subject: Re: Thanks for --private option
>> Date: Fri, 28 Aug 2009 07:15:53 -0400
>>
>>
>>
>> On Aug 28, 2009, at 12:58 AM, Altu Faltu wrote:
>>
>>>> Please let me know if you encounter any difficulties with it.
>>>> Also,  be sure to run "fossil all rebuild" after you upgrade  
>>>> fossil.
>>>
>>> Sure.
>>>
>>> One question. I can have only one private branch per 'cloned'
>>> remote  repository. Correct?
>>
>> No.  You can make as many private branches as you want.  By
>> default,  they will all be named "private" but you can change the
>> name of one or  more using either the web interface, or using
>> "--branch NAME" on the  check-in command that creates the private
>> branch.
>>
>>>
>>> I mean if I open a local repository at two locations, I cannot
>>> have  two private branches. In order to have that, I must clone
>>> the remote  repository twice.
>>>
>>> This is not an issue, just wanted to confirm.
>>>
>>> - Altu
>>>
>>> -- Be Yourself @ mail.com!
>>> Choose From 200+ Email Addresses
>>> Get a Free Account at www.mail.com!
>>>
>>
>> D. Richard Hipp
>> [email protected]
>
>>
>
>
> -- 
> Be Yourself @ mail.com!
> Choose From 200+ Email Addresses
> Get a Free Account at www.mail.com!
>

D. Richard Hipp
[email protected]



_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to