You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "Moretti, Giovanni" <G....@massey.ac.nz> on 2004/05/12 07:51:15 UTC

Invalid editor anchoring after repository move - Repeatable but fix??

Hi
I'm using Subversion 1.02 and TortoiseSVN and have boiled the "Invalid
Editor Anchoring" problem down to where I can repeatably make it fail.

I've renamed a folder directly in the repository and then used
TortoiseSVN's "relocate" command (SVN's Switch) to alter the path
locally to point to the new location in the repository.

After doing this an Update fails with the message:
 Invalid editor anchoring:At least one of the paths is not a directory
...

If I checkout the folder again, all works OK but then doing a binary
compare on the old (failing) and new folders, they're identical - SAME
repository path and the ONLY difference are two characters in the 
.svn/entries file (see after my sig below):

   revision="44"/>        is in the working update, 

whereas it's

  revision="32"/> 

for the one that falls over with the error. Note the repository path is
NOT different.

If I take the ".svn/entries" file below (from the folder that won't
update) and simply change the "32" to "44", it updates fine ...

I have no idea what to do about this other than checking the folders out
again which is irritating as the contents are actually OK :-)

Subversion is wonderful effort and I'm slowly wrapping my mind around
some of th subtleties. Hopefully this rather minimal sized problem will
be small enough that the fix is easier for those building subversion to
discern. As an aside, the error occurs whether I use the command line
"svn up" or TortoiseSVN.

Cheers and Thanks
Giovanni
========================================================================
 Giovanni Moretti  |  Institute of Information Sciences and Technology
 Senior Lecturer   |  Massey University, Palmerston North, New Zealand
 Computer Science  |  Ph 64-6-3505799x2474 == Fax 64-6-3502259 == ZL2BOI

------------------------------------------------------------------------

----------------------.svn/entries file---------------------------------
modified url and author name for security reasons. I doubt that it 
matters but the developer can ask for the originals if needed:


<?xml version="1.0" encoding="utf-8"?>
<wc-entries
   xmlns="svn:">
<entry
   committed-rev="1"
   name=""
   committed-date="2004-04-08T07:53:48.037257Z"
   url="svn://SubversionServer/Colour%20Project/AI%20Techniques"
   last-author="me"
   kind="dir"
   uuid="eae71f51-fe8a-994a-817a-1add0531b1de"
   revision="44"/>               <<<<<<<<<<<<< ONLY DIFFERENCE 44 vs 32
<entry
   committed-rev="1"
   name="Genetic Algoirthms in Matlab.msg"
   text-time="2004-05-12T05:07:36.183375Z"
   committed-date="2004-04-08T07:53:48.037257Z"
   checksum="619f8a02ece225aa6547f69f39bd32f0"
   last-author="me"
   kind="file"
   prop-time="2004-05-12T05:07:35.995875Z"/>
<entry
   committed-rev="1"
   name="Words and their meaning from Fuzzy Logic Book.doc"
   text-time="2004-05-12T05:07:36.464625Z"
   committed-date="2004-04-08T07:53:48.037257Z"
   checksum="8b49ac3935dbd2a07c90522de577480a"
   last-author="me"
   kind="file"
   prop-time="2004-05-12T05:07:36.308375Z"/>
<entry
   committed-rev="1"
   name="ONTOLOGY.TXT"
   text-time="2004-05-12T05:07:36.683375Z"
   committed-date="2004-04-08T07:53:48.037257Z"
   checksum="ac78a19b25a8106b3d2cd85a9f319868"
   last-author="me"
   kind="file"
   prop-time="2004-05-12T05:07:36.574000Z"/>
</wc-entries>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: Invalid editor anchoring after repository move - Repeatable but fix??

Posted by kf...@collab.net.
Branko Čibej <br...@xbc.nu> writes:
> > TortoiseSVN's relocate command is not the same as SVN's switch, it's
> > the same as SVN's relocate! What did you really want to do?
> 
> Um. What is "svn relocate"?

He must mean 'svn switch --relocate'.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: Invalid editor anchoring after repository move - Repeatable but fix??

Posted by Branko Čibej <br...@xbc.nu>.
Lübbe Onken wrote:

> Moretti, Giovanni wrote:
>
>> Hi
>
> Hi Giovanni,
>
>> I've renamed a folder directly in the repository and then used
>> TortoiseSVN's "relocate" command (SVN's Switch) to alter the path
>> locally to point to the new location in the repository.
>
> Just to point it out:
> TortoiseSVN's relocate command is not the same as SVN's switch, it's 
> the same as SVN's relocate! What did you really want to do?

Um. What is "svn relocate"?




---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: Invalid editor anchoring - Solved + Suggestion

Posted by Ben Collins-Sussman <su...@collab.net>.
On Thu, 2004-05-13 at 08:43, Giovanni Moretti wrote:

> SUGGESTION: 
>  and it would be very nice to be able to specify (for some
> folders) NOT to CACHE a local copy of this data in .svn. 

Yes, you and 1.29e+09 other users have suggested this already.  :-)

See issues 525 and 908.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

RE: Invalid editor anchoring - Solved + Suggestion

Posted by Giovanni Moretti <Gi...@reflections.co.nz>.
Ben
Thanks very much - this is going to save lots of work. I got into this state
by wanting to checkout bits of a very large repository by using the external
meta property to pick out the bits that I want to work on at home.

I defined a new folder called /workspace and using "external" property I
defined just the bits I want to work on at home.

eg Repository contains  /A & /B /C /D /E /F /G ...

Checking out just /A /B /C to work on at home works fine, but if update it
wants to pull down /D thru /Z, so I have to update/commit them individually.

So I created a workspace folder:
   /Workspace/A  which is an external defs to /A 
   similarly for /B & /C
I can commit & update /Workspace in one command which is much less
errorprone (there are really about 10 folder in the workspace)

This worked fine from home but then when I committed the changes it of
course it updated the meta properties for /workspace, so that when I updated
at work it created the new /Workspace folder (and this is the messy bit)
proceeded to duplicate /A into /workspace/A and /B into /workspace/B....
This is of course what it should do :-(

This is where I came unstuck: I had to give /A and /workspace a different
parent, so I created /Trunk and (using TortoiseSVNs repo browser) moved /A
into /Trunk/A  /B into /Trunk/B ...

So now the top level is just:
  /Trunk     (containing the real /A /B /C /D ....
  /Workspace (containg just external defs for /A /B )

Having moved all the previously top level items into Trunk, I made the
mistake of using the relocate rather than the switch command to retarget the
working copies. As I have hundreds of megabyte that have been moved, I'm
really glad to find out how to reconnect everything! Thanks.

SUGGESTION: 
I'm using SVN to put a very large part of my workspace (~1.6GB) under
version control, primarily so I can work in different locations (as inspired
by the Linux Journal article on /home under CVS). It's working quite well
but there are large directories that don't change much (eg 400MB of PDFs and
1GB of images) and it would be very nice to be able to specify (for some
folders) NOT to CACHE a local copy of this data in .svn. 

This would slow "reverts" but (from an non-developer's view) it would seem
that as they can't be used for DIFFs anyway and the timestamps would tell
you if files had been changed, this wouldn't really complicate things too
much (apart from an extra meta-property and commands to
"Checkout-NoLocalCopy". Copies could be fetched (as CVS does) when necessary
- effectively "Lazy evaluation".  

The reason for keeping these big and mostly static directories under version
control is so that I can add/delete/move files in the workspace and SVN
makes sure that the other end(s) reflect the changes, and the "svnserver"
makes a dandy way of getting a remote file system.

Thoughts?

Thanks
Giovanni

> 
> > **** The next is really all on one line
> > D:\>svn move -m "Repo Move" svn://SVNServer/Research/Test      
> >                             svn://SVNServer/Research/Trunk/Test
> > 
> > Committed revision 47.
> 
> Okay, so /Trunk/Test exists in r47, but not in r46.
> 
> > 
> > D:\>cd test
> > 
> > D:\Test>svn switch --relocate svn://SVNServer/Research/Test 
> >                               svn://SVNServer/Research/Trunk/Test
> > 
> 
> And this is where you've made the mistake.  You're using the 
> '--relocate' switch when you shouldn't be.  The '--relocate' 
> switch is 
> *only* for changing the SVNROOT:  in other words, the schema, the 
> hostname, or parts of the path leading *up* to the repository.  It 
> dumbly rewrites your URLs under the assumption that your working copy 
> still reflects the *same path* within the repository.
> 
> But instead, you've blindly rewritten your URLs to point to a 
> *different 
> path* in the repository.  This is wrong, wrong, wrong.  If 
> you want your 
> working copy to reflect a new path within the repository, you 
> must use 
> ordinary 'svn switch URL'.  This is equivalent to "updating" 
> to the new 
> location... not just rewriting URLs, but working revs at well.
> 
> 
> > D:\Test>svn update
> > svn: Invalid editor anchoring; at least one of the input paths
> > is not a directory and there was no source entry
> 
> And the reason you get this error...
> 
> > 
> > D:\Test>
> > ============================================================
> > ======== Contents of .svn/entries ==========================
> > ============================================================
> > <?xml version="1.0" encoding="utf-8"?>
> > <wc-entries
> >    xmlns="svn:">
> > <entry
> >    committed-rev="46"
> >    name=""
> >    committed-date="2004-05-13T10:54:17.792750Z"
> >    url="svn://SVNServer/Research/Trunk/Test"
> 
> ...is because your working copy claims to be a reflection of 
> /Trunk/Test@46.  But that location doesn't exist.
> 
> If you had run 'svn switch URL' and not used the --relocate 
> switch, your 
> entries file would claim to be at /Trunk/Test@47, which *does* exist.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org


Re: Invalid editor anchoring - log of failing sequence

Posted by Ben Collins-Sussman <su...@collab.net>.
Giovanni Moretti wrote:

> **** The next is really all on one line
> D:\>svn move -m "Repo Move" svn://SVNServer/Research/Test      
>                             svn://SVNServer/Research/Trunk/Test
> 
> Committed revision 47.

Okay, so /Trunk/Test exists in r47, but not in r46.

> 
> D:\>cd test
> 
> D:\Test>svn switch --relocate svn://SVNServer/Research/Test 
>                               svn://SVNServer/Research/Trunk/Test
> 

And this is where you've made the mistake.  You're using the 
'--relocate' switch when you shouldn't be.  The '--relocate' switch is 
*only* for changing the SVNROOT:  in other words, the schema, the 
hostname, or parts of the path leading *up* to the repository.  It 
dumbly rewrites your URLs under the assumption that your working copy 
still reflects the *same path* within the repository.

But instead, you've blindly rewritten your URLs to point to a *different 
path* in the repository.  This is wrong, wrong, wrong.  If you want your 
working copy to reflect a new path within the repository, you must use 
ordinary 'svn switch URL'.  This is equivalent to "updating" to the new 
location... not just rewriting URLs, but working revs at well.


> D:\Test>svn update
> svn: Invalid editor anchoring; at least one of the input paths
> is not a directory and there was no source entry

And the reason you get this error...

> 
> D:\Test>
> ============================================================
> ======== Contents of .svn/entries ==========================
> ============================================================
> <?xml version="1.0" encoding="utf-8"?>
> <wc-entries
>    xmlns="svn:">
> <entry
>    committed-rev="46"
>    name=""
>    committed-date="2004-05-13T10:54:17.792750Z"
>    url="svn://SVNServer/Research/Trunk/Test"

...is because your working copy claims to be a reflection of 
/Trunk/Test@46.  But that location doesn't exist.

If you had run 'svn switch URL' and not used the --relocate switch, your 
entries file would claim to be at /Trunk/Test@47, which *does* exist.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Invalid editor anchoring - log of failing sequence

Posted by Giovanni Moretti <Gi...@reflections.co.nz>.
Here's the same sequence I used last time, but now built from the command
line with a single directory with one file (authentication stuff altered)
but otherwise verbatim except for **** comment lines

Cheers
Giovanni

==============================================================
= Using Windows svnServer v1.02 & 1.01 client (different PCs =
==============================================================
**** Create a Junk directory and put a file in it
D:\>md test                             
D:\>dir > test\junk.txt                 

D:\>svn import -m "Initial checkin" test svn://SVNServer/Research/Test
Authentication realm: <svn://SVNServer:3690> Users's Repository
Password for 'User':
Authentication realm: <svn://SVNServer:3690> User's Repository
Username: me
Password for 'me': ***********
Adding         test\junk.txt

Committed revision 46.

**** Removed the "test" directory using Windows

D:\>svn checkout svn://SVNServer/Research/Test
A  Test\junk.txt
Checked out revision 46.

**** The next is really all on one line
D:\>svn move -m "Repo Move" svn://SVNServer/Research/Test      
                            svn://SVNServer/Research/Trunk/Test

Committed revision 47.

D:\>cd test

D:\Test>svn switch --relocate svn://SVNServer/Research/Test 
                              svn://SVNServer/Research/Trunk/Test

**** Used TortoiseSVN to commit a file to another part of
**** the repository forcing the revision number up to 48.
**** Not sure why but thought that this may be important!

D:\Test>svn update
svn: Invalid editor anchoring; at least one of the input paths
is not a directory and there was no source entry

D:\Test>
============================================================
======== Contents of .svn/entries ==========================
============================================================
<?xml version="1.0" encoding="utf-8"?>
<wc-entries
   xmlns="svn:">
<entry
   committed-rev="46"
   name=""
   committed-date="2004-05-13T10:54:17.792750Z"
   url="svn://SVNServer/Research/Trunk/Test"
   last-author="me"
   kind="dir"
   uuid="eae71f51-fe8a-994a-817a-1add0531b1de"
   revision="46"/>
<entry
   committed-rev="46"
   name="junk.txt"
   text-time="2004-05-13T10:55:56.729209Z"
   committed-date="2004-05-13T10:54:17.792750Z"
   checksum="d9d620c0393b1f7f47da0c578eeaf3f5"
   last-author="me"
   kind="file"
   prop-time="2004-05-13T10:55:56.709180Z"/>
</wc-entries>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Invalid editor anchoring after repository move - Repeatable but fix??

Posted by Lübbe Onken <l....@rac.de>.
Moretti, Giovanni wrote:
> Hi
Hi Giovanni,

> I've renamed a folder directly in the repository and then used
> TortoiseSVN's "relocate" command (SVN's Switch) to alter the path
> locally to point to the new location in the repository.
Just to point it out:
TortoiseSVN's relocate command is not the same as SVN's switch, it's the 
same as SVN's relocate! What did you really want to do?

-Lübbe


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: Invalid editor anchoring after repository move - Repeatable but fix??

Posted by Ben Collins-Sussman <su...@collab.net>.
Moretti, Giovanni wrote:
> Hi
> I'm using Subversion 1.02 and TortoiseSVN and have boiled the "Invalid
> Editor Anchoring" problem down to where I can repeatably make it fail.
> 
> I've renamed a folder directly in the repository and then used
> TortoiseSVN's "relocate" command (SVN's Switch) to alter the path
> locally to point to the new location in the repository.
> 
> After doing this an Update fails with the message:
>  Invalid editor anchoring:At least one of the paths is not a directory

I'm confused;  you say this is repeatable using only the commandline 
client.  Can you show us an exact transcript that reproduces the 
problem, using only the commandline client?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org