arx-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Arx-users] Errors in my ArX workspace


From: Walter Landry
Subject: Re: [Arx-users] Errors in my ArX workspace
Date: Sun, 05 Dec 2004 01:35:25 -0500 (EST)

Kevin Smith <address@hidden> wrote:
> I just had a bit of a blow-up:
> 
> address@hidden www $ arx diff
> Patched Files:
> 
>      arx/arx.css
>      arx/index.html
<snip>
> The problem seems to have arisen because I originally did an arx 
> init-tree down in the light-hand subdirectory. More recently, I did an 
> init-tree at the top level (grandparent of light-hand).
> 
> I tried manually removing the light-hand/_arx directory, but I can't get 
> arx to commit the change. I tried a few more manual repairs, but it 
> seems wedged.
> 
> Any ideas how to repair it?

The problem arose because the second init-tree added everything in the
first init-tree.  It should not have done that.  Then it committed
those files.  It _really_ shouldn't have done that.  My apologies.

The light-hand project should be fine.  The problem is in the project
above (www).  To fix this, first make a backup of the archive.

Now find an empty workspace and manually get all of the patches for
www with "get-patch".  Then delete the "www" branch (you did remember
to backup the archive, right?).  Now apply the patches one-by-one to
an empty directory (call www-fixed).  After each commit, get the old
commit comments back with

  cd www-fixed
  arx log --all www,NN > ,,new_log

and delete that log with

  arx rm _arx/patch-log/address@hidden/www/,0

Now, if you want the www project to include the light-hand project,
then simply delete the light-hand/_arx directory

  arx rm -R -f light-hand/_arx

If you don't want the light-hand project to be included, delete the
whole directory

  arx rm -R -f light-hand

Finally, commit with the new log

  arx commit --dir www-fixed -L www-fixed/,,new_log

So a simple shell script to do that would be

for i in `seq 0 NN`;
 do arx dopatch www,$i.patches www-fixed;
 cd www-fixed;
 arx log --all www,$i > www-fixed/,,new_log;
 arx rm www-fixed/_arx/patch-log/address@hidden/www/,$i;
 arx rm -R -f light-hand/_arx
 arx commit --dir www-fixed -L www-fixed/,,new_log;
 cd ..
done

where NN is the largest revision number you had.  Note that this is
completely untested.  I would recommend that you do the first few
iterations manually to make sure that I didn't do anything
bone-headed.  Above all, make a backup of the archive before you do
anything.

Note that if you delete the whole light-hand directory, there might be
patches to files in that directory.  This would cause conflicts that
you would have to resolve.  It would probably just be deleting a few
,,missing-patches directories.

> Would it help if init-tree did a tree-lint 
> right away, so at least problems like this would be detected? Or maybe 
> it just needs to be smart(er) about nested _arx directories?

init-tree should not be trying to add files in a directory that has an
_arx subdirectory.  In general, "add" should not descend into
directories that are sub-trees, and should refuse to add anything with
a different tree root.  I have committed changes to enforce this in
arx.2.1,118.

Thanks for the bug report.  This is one of those things that just
never occurred to me to do.  It is totally bogus that this happened to
you.

Walter





reply via email to

[Prev in Thread] Current Thread [Next in Thread]