'bzr: ERROR: Not a branch' on existing local branch. Can I repair it?

John Arbash Meinel john at arbash-meinel.com
Wed Mar 28 22:10:35 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stevens, Ian wrote:
>>> Both branches which give the error contain only the lock/ dir and a
>>> revision-history file.  The ones which work contain those files as
> well
>>> as branch-name, format and parent files.
>> If you are sure that is the only difference, you can just copy the
>> 'format' file from another directory. 'branch-name' and 'parent'
> should
>> be optional.
> 
> I just tried that and get the same error with the same output in the
> log.  Writing to branch-name doesn't have any effect as you would
> expect.

So you were able to create a 'format' file, which has the right
contents? (Your later comment leads me to wonder if you ended up with an
empty file here).

> 
>> But what concerns me is why something would be deleting your 'format'
>> files. 
>> Could it be an overzealous virus scanner? (I would assume it would
>> delete all the other ones, to). Or maybe a recursive delete gone
> wrong?
>> (find . -name format | xargs rm). I realize you wouldn't use 'find' on
>> Windows.
> 
> I have cygwin installed but I'm quite careful with my use of rm, and it
> would be odd that I would execute such a command that would delete some
> dirs in .bzr but leave others intact.  

Well, to be clearer, it sounds like you have some *files* deleted, but
not others. I don't see any missing directories at this point.

> 
> Symantec Antivirus is on my machine, and it would be strange if it
> deleted files in those two branches, but not others.
> 
> My repo resides on a shared drive and my dir on that drive has strict
> quota limits.  I'm not sure if it was last week but I moved some large
> files to that dir not knowing this and got a complaint ... not sure if
> the quota management would arbitrarily delete files or not.  I suppose
> it's possible that I was using bzr at the time, but I don't think so.  I
> have a feeling that was later than last week, though.
> 
> Ian.
> 
> 

Sure. You also would expect that quotas would fail to let you create new
files, not remove old files. If it did, I would consider the quota
management to be broken.

If it is a shared drive, do you know if it might be a '/tmp' drive?

I do remember than RH actually runs a "clean-tmp" script, which runs
every night or so, and deletes any files which haven't been accessed in
a while.

*I* ran into it because I was hosting a local cache (Gnu Arch revision
library) in /tmp, and every so often it would end up puking because I
hadn't used certain files in a while. (Boy was that ugly).

This would point to a bad server setup. (Anyone who is deleting old
files from your shared location should be shot :).


Internally, the only thing that "declares" a directory to be a bzr
Branch are the .bzr/branch-format and .bzr/branch/format files. The
first lets us grab a BzrDir, and is necessary for a repo or a branch or
checkout, the later is only needed for actual Branches. It is called
.bzr/branch-format because of historical reasons. (So older clients get
an UnsupportedBranchFormat rather than NotABranch).

Can you check .bzr\ for files? You should have 'branch-format' and
README. (README is technically optional, but we put it there so people
know not to mess with that directory)

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGCtnLJdeBCYSNAAMRAvLaAJ9UDKr2FSi49V5Mm/vi9stxKFPLbACfSMhn
lqz3FxlPdjteQ5uur4SkiWQ=
=rTe0
-----END PGP SIGNATURE-----



More information about the bazaar mailing list