Bazaar - First steps?

Asked by WindyWeather

These are the things I want to do with Bazaar. I have a network of Win Vista, Win 7 and Ubuntu systems. Click on any picture for a larger view. Well you can look here for the pictures:
http://www.windyweather.net/wp/2010/11/22/using-bazaar-first-steps/

1 - Create a project with collocated repository.
Must do this manually due to the bug in creating collocated repositories but it seems to work by using the All command dialog and colo-init.

2 - Check in files the first time.
Use the Add dialog. Click on the Plus Sign next to the red UnVersioned file list or the lower panel. Choose the files / folders to add and click OK.

3 - Mark files as Ignored.
Intermediate files from the compile don't need to be controlled.
I can't find a way to set files to be ignored in spite of the indicator that it is supported.

4 - Check out a previous revision.
Looks like I can do that with PULL. But do I need to manually type in the revision number. So I need to look at the Log window and then pick a number and then type that number into the Pull dialog. Odd. I expected to get a list of revisions that I could select from and then just click PULL.

5 - Remove a file and commit.
I want to understand what happens when I remove a file and then commit. What I want is for that file to disappear from future revisions. But if I checkout a previous revision, I get the file back, since it's required in that revision. The Remove function - RCLICK in working tree - seems to delete the folder or file. I presume that committing the changes will cause the file to be removed in that revision, but not in previous revisions.

6 - Retrieve a removed file and add it to the the current revision
I want that file restored so it is carried forward. I'd expect to do this without a lot of fooling around.
This means that I need to be able to choose a single file, or folder in an early revision, that was later removed, and just pull that file / folder into the current working tree. I don't see a way to do that easily. Looks like I need to pull the entire revision to a new place and then manually copy the file. Then add it again. And then commit. But will the commit cause that file to be confused if I pull a previous revision? I will of course be changing the file in the later revision. That seems like a lot of fooling around to me. Rather than being able to look at a tree of a previous revision and just PULLing that single file / folder from that previous revision into the working tree, I need to manually get the revision into another place and manually copy it into the new working tree. But is that going to work, or is ADDING the file again going to mess up the repository? Are these the right steps to do this?

7 - Does this look right?
I'm not sure if I've messed up in creating my repository. Does this look right?

8 - For Extra Credit. Shared Repositories?
Can I create a repository on a windows shared disk on another machine and then check out and commit files to that repository? Do I have to run a server on that machine or just clients on the various machines that I'm working from? Please walk me through the steps to accomplish this.

Thanks,
Windy

Question information

Language:
English Edit question
Status:
Answered
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Martin Pool (mbp) said :
#1

On 23 November 2010 05:31, WindyWeather
<email address hidden> wrote:
> New question #135078 on Bazaar:
> https://answers.launchpad.net/bzr/+question/135078
>
> These are the things I want to do with Bazaar. I have a network of Win Vista, Win 7 and Ubuntu systems. Click on any picture for a larger view. Well you can look here for the pictures:
> http://www.windyweather.net/wp/2010/11/22/using-bazaar-first-steps/
>
> 1 - Create a project with collocated repository.
> Must do this manually due to the bug in creating collocated repositories but it seems to work by using the All command dialog and colo-init.
>
> 2 - Check in files the first time.
> Use the Add dialog. Click on the Plus Sign next to the red UnVersioned file list or the lower panel. Choose the files / folders to add and click OK.
>
> 3 - Mark files as Ignored.
> Intermediate files from the compile don't need to be controlled.
> I can't find a way to set files to be ignored in spite of the indicator that it is supported.

I don't know if there is a gui way for this. You can edit .bzrignore.

> 4 - Check out a previous revision.
> Looks like I can do that with PULL. But do I need to manually type in the revision number. So I need to look at the Log window and then pick a number and then type that number into the Pull dialog. Odd. I expected to get a list of revisions that I could select from and then just click PULL.

You probably want 'update' not 'pull'.

Go into the log viewer, right click, then 'update to this revision' :-)

>
>
> 5 - Remove a file and commit.
> I want to understand what happens when I remove a file and then commit. What I want is for that file to disappear from future revisions. But if I checkout a previous revision, I get the file back, since it's required in that revision. The Remove function - RCLICK in working tree - seems to delete the folder or file. I presume that committing the changes will cause the file to be removed in that revision, but not in previous revisions.

Right.

>
> 6 - Retrieve a removed file and add it to the the current revision
> I want that file restored so it is carried forward. I'd expect to do this without a lot of fooling around.
> This means that I need to be able to choose a single file, or folder in an early revision, that was later removed, and just pull that file / folder into the current working tree. I don't see a way to do that easily. Looks like I need to pull the entire revision to a new place and then manually copy the file. Then add it again. And then commit. But will the commit cause that file to be confused if I pull a previous revision? I will of course be changing the file in the later revision. That seems like a lot of fooling around to me. Rather than being able to look at a tree of a previous revision and just PULLing that single file / folder from that previous revision into the working tree, I need to manually get the revision into another place and manually copy it into the new working tree. But is that going to work, or is ADDING the file again going to mess up the repository? Are these the right steps to do this?

'pull' works on the whole tree, not single files. What you should do
is revert that single file to whichever previous version you want.

>
> 7 - Does this look right?
> I'm not sure if I've messed up in creating my repository. Does this look right?

<http://www.windyweather.net/wp/wp-content/uploads/2010/11/JD_x_2010_01114.jpg>
it looks fine.

> 8 - For Extra Credit. Shared Repositories?
> Can I create a repository on a windows shared disk on another machine and then check out and commit files to that repository? Do I have to run a server on that machine or just clients on the various machines that I'm working from? Please walk me through the steps to accomplish this.

Please read the admin guide
<http://doc.bazaar.canonical.com/bzr.dev/en/admin-guide/index.html>
and ask about anything that's unclear. Then we can help you and other
people at the same time.

--
Martin

Revision history for this message
WindyWeather (windyweather) said :
#2

Thanks, Martin. Looks like I'm not as far off as I thought I was.

I'll study the admin guide for the server stuff. But let me clear up the file removal question first since that does not seem to be covered in the admin guide.

You totally lost me with the directions to "revert that single file to whichever previous version you want".

I opened the repository in the browser - I assume that's the icon that looks like a bucket.
In the welcome screen I have 3 icons all with the name CoreHeater. One is a bucket, one is an uparrow sort of thing, and the other is marked Trunk, which I'm guessing is the branch browser. It would be helpful for noobs if these were marked with an additional word like "working tree" or "branch detail" or something. I guess I missed the detailed document that walks through the GUI and all it's features. So I opened the bucket panel.

Then I clicked the Log button at the lower right and I got a window named LOG.

When I click on a revision in the list above, I get a list of files below. I'm assuming that this is a list of the files that were committed in this revision. So this will allow me to find a file in a previous revision that will be missing from the working tree.

When I rclick on that file I expected to see "revert" or "get" or something that would allow me to restore that file to the working tree. But all I see are : show diff, annotate, view.

Is there some other way to navigate to the file to allow me to revert?

Can someone else answer the question about ignoring files through the GUI interface?

Remember, I'm brand new to this whole interface, but not to source control. I'm trying to align my understanding and terminology from about 10 previous platforms to those used by bzr.

Thanks again,
w

Revision history for this message
Martin Pool (mbp) said :
#3

I think you should navigate to the file in the current working tree,
choose 'revert' on that, then choose the version you want to revert
to.
--
Martin

Can you help with this problem?

Provide an answer of your own, or ask WindyWeather for more information if necessary.

To post a message you must log in.