Setup to integrate Bazaar into my workflow?

Asked by rodrigo

Hello.

Im completely new to version control and just instaled Bazaar yesterday; so far it's all going fine but there are some things i dont know how to set up.

I have a directory A, inside it I have B, and C. I added C to Bazaar and now i would like to add A but excluding C from being added again.

A--,
     '-B
     '-C

So, 2 questions:
1st: Do i have to move out C off A in order to add A?

2nd: What if B depends of C being where it is in order to work, what are my options? (it already happened since files went from C to C/trunk)

I read some tutorials on version control and Bazaar but what i read and what I see in the GUI seems kinda unrelated to me =/

Any help would be really appreciated =)

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Edit question
Assignee:
No assignee Edit question
Solved by:
Ian Clatworthy
Solved:
Last query:
Last reply:
Revision history for this message
Best Ian Clatworthy (ian-clatworthy) said :
#1

rodrigo wrote:
> New question #103794 on Bazaar:
> https://answers.launchpad.net/bzr/+question/103794
>
> Hello.
>
> Im completely new to version control and just instaled Bazaar yesterday; so far it's all going fine but there are some things i dont know how to set up.

Hi Rodrigo and welcome.

> I have a directory A, inside it I have B, and C. I added C to Bazaar and now i would like to add A but excluding C from being added again.
>
> A--,
> '-B
> '-C

Just to clarify, Bazaar manages a *tree* of files and directories. So if
you put A under version control, B and C will be managed as part of that
tree (unless you exclude them via editing .bzrignores say).

> So, 2 questions:
> 1st: Do i have to move out C off A in order to add A?

If C and B aren't part of A, then you'll want to move them out of A
before putting A under version control.

> 2nd: What if B depends of C being where it is in order to work, what are my options? (it already happened since files went from C to C/trunk)

Then it sounds like you may be better off managing the collection of
files (A+B+c) as one branch, not having one branch for each.

> I read some tutorials on version control and Bazaar but what i read and what I see in the GUI seems kinda unrelated to me =/

Sorry about that. I'll be adding content to the Desktop Guide real soon
now. Once completed, http://doc.bazaar.canonical.com/explorer/en/guide/
ought to tell you want you need to know.

> Any help would be really appreciated =)

No problem. If you need more assistance, just ask us know.

Ian C.

Revision history for this message
rodrigo (rodrigojuarez) said :
#2

Thanks for the reply Ian.

Thought about putting all the directories under the same tree but there's a directory which holds a blog. It doesnt need to be versioned but there are links to and from all the other directories, so i'ts almost impossible to take it out. And there's even a directory inside the blog i could use to be versioned.

Right now I'm in doubt then: do I need to restructure the whole site to work with the files moved to the /trunk directories or should I ignore the size of the blog directory for the sake of integrity?

Thanks for your patience =)

Revision history for this message
rodrigo (rodrigojuarez) said :
#3

Addendum: maybe just adding the blog to the .bzrignores you mentioned?
And then: will .bzrignores allow me to "unignore" a particular directory inside the blog?

Revision history for this message
rodrigo (rodrigojuarez) said :
#4

Thanks Ian Clatworthy, that solved my question.

Revision history for this message
Ian Clatworthy (ian-clatworthy) said :
#5

rodrigo wrote:
> rodrigo gave more information on the question:
> Addendum: maybe just adding the blog to the .bzrignores you mentioned?

Yes.

> And then: will .bzrignores allow me to "unignore" a particular directory inside the blog?

I'm not honestly sure. I suspect not, though I haven't tried a recent
feature along those lines:
http://doc.bazaar.canonical.com/bzr.2.1/en/whats-new/whats-new-in-2.1.html#new-ignore-patterns

You can always make that subdirectory within the blog you want
version-controlled a separate branch. Simply go to that directory and run:

  bzr init .
  bzr add
  bzr commit -m "Initial import"

Ian C.

Revision history for this message
rodrigo (rodrigojuarez) said :
#6

The most difficult thing was to find out whether paths should be absolute or relative and if relative then, relative to where?

Turns out it was incredible easy!

I started with the empty directory tree of the site (as per someone's recommendation here in the site).
Then i created the .bsrignore file in the root directory and added the relative path of the blog, like: "./blog" and in the next line: "./blog/*" (and end up adding the ignore file itself later because it was being added too):
This is my .bsrignore file:
./blog
./blog/*
.bzrignore

Then i created the repo.
Finally i added all the files and i could see that Bazaar, while it was detecting the whole content of the directory as new files, was indeed ignoring all the stuff inside the /blog directory along with it.

My guess is that if i want to add a particular directory from within /blog, i should remove the path of /blog and add the paths of the directories that it should ignore from inside /blog except that one i want to add. This because if i add the directory via the bzr add, then the content of that directory is going to be moved inside the /trunk dir, effectively preventing the blog from working correctly.

So yeah, .bzrignore was the way to go.

Thanks again Ian! =)

Revision history for this message
rodrigo (rodrigojuarez) said :
#7

Oh, btw.
Where should i ask about Bazaar crashing all the time on me?
Yesterday it crashed no less than 40 times and only 2 or 3 of those give me the error handling screen (thats what i registered here for in the first place).

I've got the logfile where i guess all that should be logged (4845 lines in two days! o.o) ; I couldn't copy the stuff it gave me in the error screen.

They may be bugs but couldn't find a way to reproduce them and they're just too many and too random to file bugs or even look for them in bugtracker.

Thans for your patience =)

Revision history for this message
Andrew Bennetts (spiv) said :
#8

> Oh, btw.
> Where should i ask about Bazaar crashing all the time on me?

If Bazaar crashes, please file a bug at <https://bugs.launchpad.net/bzr>. Some might be duplicates, but the bug-filing process should automatically help you discover that as you start filing it. If in doubt, just a file a new bug and if necessary we can mark it as a duplicate later.

> Yesterday it crashed no less than 40 times

Ouch! That's quite unusual, please do file bug(s) so we can fix that for you :)

Revision history for this message
rodrigo (rodrigojuarez) said :
#9

Ok, will do Andrew.

Thankfully i haven't lost anything so far, I hope it stays that way.

Thank you =)

Revision history for this message
Ian Clatworthy (ian-clatworthy) said :
#10

rodrigo wrote:
> Question #103794 on Bazaar changed:
> https://answers.launchpad.net/bzr/+question/103794
>
> rodrigo posted a new comment:
> Oh, btw.
> Where should i ask about Bazaar crashing all the time on me?
> Yesterday it crashed no less than 40 times and only 2 or 3 of those give me the error handling screen (thats what i registered here for in the first place).

Is it the command line tool or the GUI that keeps crashing? There's a
known bug in the GUI where it "randomly" crashes when refreshing the
display. See https://bugs.launchpad.net/bzr-explorer/+bug/395175

I made some fixes a week or so ago to reduce the frequency of the
crashes so make sure you're running the latest (1.0.1) version. It still
hits me at least a dozen times per day though. :-(

Ian C.

Revision history for this message
rodrigo (rodrigojuarez) said :
#11

I guess is the GUI, although i can't see the command line after GUI crashes because Windows dims them as they crash and wont let me bring CLI to top.

Im running version 1.0.1 (Qbzr 0.18.3, bzrlib 2.1.0, PyQt 4.4.3, Phyton 2.5.4) / Windows 7 (7600) 64 bits.

And now that you mention it, it has happened that it crashes just after autorefreshing when there are changes made to a file or even on manual refresh but not necesarily as that bug describes.

I'll try to put CLI aside so i can keep an eye on it and i'll try to catch those errors in the log, hopefully i can get them to reproduce because they're just too many to be normal.

Rodrigo