You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by John Abd-El-Malek <jo...@gmail.com> on 2008/07/21 19:18:54 UTC

Problem with changelists and new directories

Hello, my team of about several dozen developers has been using Rietveld for
code reviews.  We've created wrapper scripts that use svn changelists to
group files in one code review together.  However we're running into an
issue when adding files in a new directory.  The problem is that the new
directory can't be added to the changelist.  When someone tries to commit
the changelist, it fails because the new directory isn't committed.
We've worked around this for now by detecting this situation, and doing a
"svn commit" without "--changelist", instead listing the new directories and
other files.

It would be nice if "svn commit" detected this case and committed the new
directories as well.

What do people think?

Thanks

Re: Problem with changelists and new directories

Posted by "C. Michael Pilato" <cm...@collab.net>.
Karl Fogel wrote:
> "C. Michael Pilato" <cm...@collab.net> writes:
>> That's the problem, Karl.
>>
>> They have a situation like this:
>>
>>    svn changelist "issue-21" wc/mu
>>    svn changelist "issue-21" wc/A/D/G/rho
>>    mkdir wc/some-new-module
>>    edit wc/some-new-module/new-file
>>    svn changelist "issue-21" wc/some-new-module/new-file
>>
>> Now, they have 3 files in a changelist "issue-21", but one of those
>> files lives in a directory slated for addition.  When they run 'svn
>> commit --changelist issue-21', Subversion does as told -- tries to
>> commit only those three changelist-bearing files.  But of course, you
>> can't commit a file that lives in a directory scheduled for addition
>> if you don't also commit said directory.
>>
>> (Non-minimal, admittedly) recipe attached.
> 
> I get it now, thanks.
> 
> How to solve?  Have the client also commit any newly-added directories
> leading down to a changelist-included item in a given commit?

Would we rather grow support for depth-empty directory changelists?

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand


Re: Problem with changelists and new directories

Posted by Karl Fogel <kf...@red-bean.com>.
"C. Michael Pilato" <cm...@collab.net> writes:
> That's the problem, Karl.
>
> They have a situation like this:
>
>    svn changelist "issue-21" wc/mu
>    svn changelist "issue-21" wc/A/D/G/rho
>    mkdir wc/some-new-module
>    edit wc/some-new-module/new-file
>    svn changelist "issue-21" wc/some-new-module/new-file
>
> Now, they have 3 files in a changelist "issue-21", but one of those
> files lives in a directory slated for addition.  When they run 'svn
> commit --changelist issue-21', Subversion does as told -- tries to
> commit only those three changelist-bearing files.  But of course, you
> can't commit a file that lives in a directory scheduled for addition
> if you don't also commit said directory.
>
> (Non-minimal, admittedly) recipe attached.

I get it now, thanks.

How to solve?  Have the client also commit any newly-added directories
leading down to a changelist-included item in a given commit?

-Karl

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

Re: Problem with changelists and new directories

Posted by "C. Michael Pilato" <cm...@collab.net>.
Karl Fogel wrote:
> "John Abd-El-Malek" <jo...@gmail.com> writes:
>> Hello, my team of about several dozen developers has been using Rietveld for
>> code reviews.  We've created wrapper scripts that use svn changelists to group
>> files in one code review together.  However we're running into an issue when
>> adding files in a new directory.  The problem is that the new directory can't
>> be added to the changelist.  When someone tries to commit the changelist, it
>> fails because the new directory isn't committed.
> 
> I thought you couldn't add directories to changelists at all?  Aren't
> they only for files?

That's the problem, Karl.

They have a situation like this:

    svn changelist "issue-21" wc/mu
    svn changelist "issue-21" wc/A/D/G/rho
    mkdir wc/some-new-module
    edit wc/some-new-module/new-file
    svn changelist "issue-21" wc/some-new-module/new-file

Now, they have 3 files in a changelist "issue-21", but one of those files 
lives in a directory slated for addition.  When they run 'svn commit 
--changelist issue-21', Subversion does as told -- tries to commit only 
those three changelist-bearing files.  But of course, you can't commit a 
file that lives in a directory scheduled for addition if you don't also 
commit said directory.

(Non-minimal, admittedly) recipe attached.

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Re: Problem with changelists and new directories

Posted by John Abd-El-Malek <jo...@gmail.com>.
On Mon, Jul 21, 2008 at 12:59 PM, Karl Fogel <kf...@red-bean.com> wrote:

> "John Abd-El-Malek" <jo...@gmail.com> writes:
> > Hello, my team of about several dozen developers has been using Rietveld
> for
> > code reviews.  We've created wrapper scripts that use svn changelists to
> group
> > files in one code review together.  However we're running into an issue
> when
> > adding files in a new directory.  The problem is that the new directory
> can't
> > be added to the changelist.  When someone tries to commit the changelist,
> it
> > fails because the new directory isn't committed.
>
> I thought you couldn't add directories to changelists at all?  Aren't
> they only for files?


Right, you can't add the directory.  The new file is in the changelist
though.


>
>
> It would help if you attached a reproduction script.


mkdir john
(create a file called README in john)
svn add john
svn cl addjohn john\README
svn commit --cl addjohn --message=''


svn: Commit failed (details follow):
svn: '/chrome/branches/depot_tools_release_branch/john' path not found


>
>
> Thanks,
> -Karl
>

Re: Problem with changelists and new directories

Posted by Karl Fogel <kf...@red-bean.com>.
"John Abd-El-Malek" <jo...@gmail.com> writes:
> Hello, my team of about several dozen developers has been using Rietveld for
> code reviews.  We've created wrapper scripts that use svn changelists to group
> files in one code review together.  However we're running into an issue when
> adding files in a new directory.  The problem is that the new directory can't
> be added to the changelist.  When someone tries to commit the changelist, it
> fails because the new directory isn't committed.

I thought you couldn't add directories to changelists at all?  Aren't
they only for files?

It would help if you attached a reproduction script.

Thanks,
-Karl

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