Re: Problem with add directory using NT cvs server

Milos Kleint <[email protected]> Wed, 03 Jul 2002 15:26:14 +0200
Newsgroups gmane.comp.java.netbeans.modules.javacvs.devel
Message-ID <[email protected]>
Christian Stein wrote:
>>>3. Added a directory to the root.              [FAILURE]
>>>   The message provided by the server reads:
>>>   " cvs [server aborted]: cannot add to
>>>     D:/cvsroot/nosdev/CVSROOT/Emptydir "
>>>
>>
>>That is correct behaviour IMHO.
>>
> 
> 
> Hmmm... it should be possible to add a module, shouldn't it?
> Or am I missing a standard CVS feature? Do I always have to
> "import" a module (from an empty directory)? Say, like:
> 
> 1. mkdir 123
> 2. cd 123
> 3. cvs import -m"..." 123 vendor tag
> 
> Why not:
> 
> 1. mkdir 123
> 2. cvs add -m"..." 123
> 

Well, I think the second case is possible however not in a directory that has the CVSROOT/EmptyDir 
in it's repository file.. that value prohibits to add dirs/files?!?



> 
>>can you please describe the debug example some more? [...]
> 
> 
> Si.
> 
> SERVER configuration
> 
>  - prefix to all repositories is "D:/cvsroot"
>  - one repository is called "/nosdev"
>  - there-in are some modules "CVSROOT", "nos", docs", ...
> 
> CLIENT setup
> 
>  - Sandbox is "E:\projects\nosdev\calix"
>  - Content of the _magic_ (and hand-edited) "CVS/" folder:
>     Entries   : "\CVSROOT\\\\ \newline \nos \newline ..."
>     Repository: "CVSROOT\Emptydir" (or "." - it depends ... :)
>     Root      : ":pserver:sormuras@calix:/nosdev"
> 
> 
>>that case is catched by the removal of initial dot, but
>>in case the dot is in between there's a problem...
> 
> 
> It was quite interesting to find the place_s_, where the
> dot and other prefixed strings are removed. I first thougt,
> that only the StandardAdminHandler does the job, but the
> Client is the real worker here. Maybe, we should do it only
> in one place.
> 
> Christian

Hmm.. I wonder how have I tested the fix. Of course you are right, I suppose I tried the top-level 
directory addition only without the repository prefix. Well.. I've added another fix that handles 
that correctly (IMHO).

Any comments welcome.

Milos

> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
additionalfix.html (text/html, 2.8 KB)
<HTML>
<HEAD>
<TITLE> CVS Repository Query Results </TITLE>
</HEAD>
<BODY>
<H1> Query: </H1>
   Message Filter (Substring):25060
<P>
   Sort: by Date (Ascending)
<P>
<BR>
<BR>
<H1> Results: </H1>
<UL>
--------------------------------------------------
<LI>User: <B>mkleint</B>
<LI>Date: <B>Tue Jul 02 14:10:08 CEST 2002</B>
<LI>Message: <I>fixing adding of directory - issue #25060
the fix was necessary because of the relative CVSROOT repositories in cvsnt 1.11.1.3
The content for newly created directory is now taken from it's parent directory
I had to rewrite the builder as well to accomodate. If there is no exact match, the builder tries to do the best match possible based on the  trailing file path. The longer the match , the better.. the last one wins.
</I>
<UL>
<LI>
<A href='http://www.netbeans.org/source/browse/javacvs/libsrc/org/netbeans/lib/cvsclient/command/add/AddBuilder.java?rev=1.9&content-type=text/x-cvsweb-markup'>1.9</A> 
  /cvs/javacvs/libsrc/org/netbeans/lib/cvsclient/command/add/AddBuilder.java
[<A href='http://www.netbeans.org/source/browse/javacvs/libsrc/org/netbeans/lib/cvsclient/command/add/AddBuilder.java.diff?r1=text&tr1=1.8&r2=text&tr2=1.9&f=h'> Diff </A>]
<LI>
<A href='http://www.netbeans.org/source/browse/javacvs/libsrc/org/netbeans/lib/cvsclient/command/add/AddCommand.java?rev=1.26&content-type=text/x-cvsweb-markup'>1.26</A> 
  /cvs/javacvs/libsrc/org/netbeans/lib/cvsclient/command/add/AddCommand.java
[<A href='http://www.netbeans.org/source/browse/javacvs/libsrc/org/netbeans/lib/cvsclient/command/add/AddCommand.java.diff?r1=text&tr1=1.25&r2=text&tr2=1.26&f=h'> Diff </A>]
</UL>
</UL>
<UL>
--------------------------------------------------
<LI>User: <B>mkleint</B>
<LI>Date: <B>Wed Jul 03 13:22:14 CEST 2002</B>
<LI>Message: <I>fixing adding of directory - issue #25060 - additional fix:
where parent's directory is '.', strip the dot when creating the to-be-added directory's CVS/Repository file entry
</I>
<UL>
<LI>
<A href='http://www.netbeans.org/source/browse/javacvs/libsrc/org/netbeans/lib/cvsclient/command/add/AddCommand.java?rev=1.27&content-type=text/x-cvsweb-markup'>1.27</A> 
  /cvs/javacvs/libsrc/org/netbeans/lib/cvsclient/command/add/AddCommand.java
[<A href='http://www.netbeans.org/source/browse/javacvs/libsrc/org/netbeans/lib/cvsclient/command/add/AddCommand.java.diff?r1=text&tr1=1.26&r2=text&tr2=1.27&f=h'> Diff </A>]
</UL>
</UL>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
<H1>Summary:</H1>
<B>Number of changes: 2</B>
<P>
<B>Developers: </B>mkleint<P> <BR>
<B>Most frequently changed files:</B>
<UL>
<LI>2 /cvs/javacvs/libsrc/org/netbeans/lib/cvsclient/command/add/AddCommand.java,v
<LI>1 /cvs/javacvs/libsrc/org/netbeans/lib/cvsclient/command/add/AddBuilder.java,v
</UL>
<P> <BR>
<B>Most active developers (based on number of commits): </B>
<UL>
<LI>2 mkleint
</UL>
<P> <BR>
</BODY>
</HTML>