I somehow messed up my project's repo, please help

Vincent Ladeuil vila+bzr at canonical.com
Sun Oct 14 12:40:46 UTC 2012


>>>>> Rob Clewley <rob.clewley at gmail.com> writes:

    > In great haste, being a pragmatic and busy academic and not a
    > professional software engineer, I recently had to patch some
    > things in my primary development folder for my software that also
    > contains my .bzr folder so that I could provide my students with
    > an updated version quickly. In doing so, I think what I did was
    > make a backup copy of the code folder, temp deleted the .bzr there
    > and packaged the folder up to email my students.

You probably wanted 'bzr export project.zip' there which doesn't require
moving the '.bzr' folder.

But, what do you call exactly 'temp deleted the .bzr folder' ? This is
where bzr recorded all your commits as well as the state of your working
tree, if you deleted it... well, you've lost your commits :-/

If you still have it though, make a copy of it in a new folder and there
do 'bzr checkout .', that should set you up at the last state you
committed.

    > I thought I'd restored everything back the way it was, and there
    > certainly is a .bzr folder there now (I haven't touched it otherwise)
    > that should be just the same as before. But in Wing and from the
    > command line I now have every file showing up as unversioned when I
    > check bzr status.

Then the '.bzr' folder is not the same.

    > Does bzr use something like file IDs to identify changes,

It does but that shows up only when deal with different branches, file
systems don't have file ids so when bzr query the file system it deals
with regular paths.

Could it be that you put the '.bzr' folder in a different place in the
tree ?

    > so that even if the source code files are identical in content
    > they are seen as new/unversioned? I'm very confused by the
    > terminology, and I'm not even sure exactly what I've done.

    > I can't simply revert to the online repo because I have a handful of
    > changes that need to be committed and uploaded to the repo, and now I
    > can't even see which files are in this state because *all* files now
    > show up as unversioned.

Again, that means either the '.bzr' folder is not the original one or
that you put it in a different place.

    > Please can someone guide me out of this pickle? I'm really stumped - I
    > need to properly update my software's repo for users waiting on bug
    > fixes, and I don't know how to search online for this issue
    > effectively. Yes, I know I should have used a more careful workflow
    > that doesn't involve fiddling with my primary dev folder in the first
    > place :/

    > Let me know if I can provide more info / copies of files, etc.
    > Thanks so much.
    > -Rob

Can you publish a zip of your whole folder (including the '.bzr' one) in
a state where 'bzr st' display what you're describing ?

  Vincent



More information about the bazaar mailing list