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

Vincent Ladeuil vila+bzr at canonical.com
Mon Oct 15 19:52:33 UTC 2012


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

    > On Mon, Oct 15, 2012 at 10:44 AM, Francis Devereux <francis at devrx.org> wrote:
    >> 
    >> I think maybe Vincent meant to say "copy .bzr to a new folder and
    >> in the new folder do 'bzr revert .'".

Right, sorry for the confusion.

    >> I've just tried this on one of my .bzr directories and the 'bzr
    >> revert .' recreates the files with the contents they had the last
    >> time I committed (when the directory was empty bzr thought I had
    >> deleted all the files so to revert that it recreated them).

    > That worked now. So, my diff indicates what might have happened,
    > although I no longer remember making this attribute change! All the
    > files show up with:

    > (properties changed: -x to +x)

    > What throws me is why bzr says that all these files were "unversioned"

Wait a second, either bzr tells you that all your files have changed
their 'x' property XOR it tells you the files are not versioned in which
case bzr knows nothing about them and as such cannot report a property
change.

    > rather than simply modified. My bzr integration in Wing didn't
    > deal nicely with it either, but that's probably another matter.

If it led you to believe that your files were not versioned anymore,
yeah, there may be an integration issue.

    > I tried to make group and others access back to -x in my working
    > folder (chmod -R go-x *) but that doesn't change the diff
    > report. Do I need to do something else?

It's hard to say without *seeing* the diff report ;)

/me still waiting dropbox dl to finish... ;)

The diff I see from that contains:

=== modified file 'Events.py' (properties changed: -x to +x)
=== modified file 'FAQ.html' (properties changed: -x to +x)
=== modified file 'FuncSpec.py' (properties changed: -x to +x)
=== modified file 'Generator/ADMC_ODEsystem.py' (properties changed: -x to +x)
=== modified file 'Generator/DDEsystem.py' (properties changed: -x to +x)
=== modified file 'Generator/Dopri_ODEsystem.py' (properties changed: -x to +x)
=== modified file 'Generator/EmbeddedSysGen.py' (properties changed: -x to +x)

which is how bzr reports a property change without any other
modification to a file. Your diff indeed mention a bunch of such
property changes to .c, .py, .h files which doesn't really make sense
but that's what the file system is telling bzr. The diff also contains
textual changes, reported as such.

This is especially weird as your tree contains .pyc files which are not
marked as such, so only a few scenarios remain, including one where you
committed from a windows system or at least a FAT file
system... or... partly restore your tree from a FAT file system as a USB
key or a remote server mounted volume...

But as far as I can see your tree is fine and so is your branch... so if
you don't know how you ended up this way and don't want to investigate
why nor fix it, you can just commit those property changes, they may as
well not recur ;)

On the other hand:

 find . -type f -print0 | xargs -0 -n 1 chmod -x $@

almost cleanup the diff, you'll be left with only a few to fix manually
if you want them to keep +x:

=== modified file 'PyCont/TODO' (properties changed: +x to -x)
=== modified file 'Toolbox/data_analysis.py' (properties changed: +x to -x)
=== modified file 'Toolbox/dssrt.py' (properties changed: +x to -x)
=== modified file 'Toolbox/neuro_data.py' (properties changed: +x to -x)
=== modified file 'Toolbox/phaseplane.py'
=== modified file 'tests/ttraj_prebotfast.dat' (properties changed: +x to -x)
=== modified file 'tests/vode_event_test2.py' (properties changed: +x to -x)
=== modified file 'tests/xtraj_prebotfast.dat' (properties changed: +x to -x)

double-check, I may have missed some...


=== modified file 'convert2unix.sh' (properties changed: +x to -x)

for one.

    Vincent



More information about the bazaar mailing list