You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by David James <li...@davidjamesdesign.com> on 2006/09/03 17:31:33 UTC

New Directories Not Updated on Post-Commit Hook

I am working for an organization that has imposed a very odd svn/ 
development setup. Basically, we all have to use svn (update, commit  
etc), but we can't work with our own working copies (i.e. develop and  
test). Every change we make to the code (even a color change in a css  
file!) we have to commit it, then the repository does a post-commit  
hook script which updates the development server, so we can see our  
changes. We are already up to 800 revisions and most of the messages  
in svn log are blank or say things like "changed stuff".

Because I am at the bottom of the totem-pole in this company, all I  
can do is accept the wonky situation (I have tried to explain what is  
wrong with it and how to improve it, to no avail). Anyways, I needed  
to just talk about it ;) but the main problem now, is that the post- 
commit hook is not adding new directories, only new files to the  
development server. For instance, if the directory already exists,  
then new files are added to it. But if it does not exist, then  
nothing is created (directory or files).

I have checked to make sure (in my working copy) that the directories  
are under version control, and they are.

Here is the script they are using:

REPOS="$1"
REV="$2"

DELTADIR=`/usr/bin/svnlook dirs-changed -r "$REV" "$REPOS"`

/usr/bin/svn update -N /home/devel/$DELTADIR


-- David

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

Re: New Directories Not Updated on Post-Commit Hook

Posted by Erik Huelsmann <eh...@gmail.com>.
On 9/3/06, David James <li...@davidjamesdesign.com> wrote:
>
> Thanks Erik. That's what I thought, only I didn't understand what the
> DELTADIR and the svnlook were doing. So why don't they just have the script
> svn update at the root level, like you say? I wonder what the svnlook
> business if for. To make the update faster perhaps? (it is a large app)

Well, there's a fair chance they did, yes. When 1.4 is out, working
copy access will get lots faster than it is in earlier versions
(improvements of cuts to 1/3!)

Hopefully, that's enough for your situation...

bye,

Erik.

> On Sep 3, 2006, at 11:42 AM, Erik Huelsmann wrote:
>
>
> Ofcoure it doesn't: -N means 'non-recursive' and will ignore any
>
> targets not LOCALLY under version control. It will work as soon as you
>
> remove the -N and just update the development working copy root. But I
>
> guess that's what you mean by your strangely imposed workflow?

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

Re: New Directories Not Updated on Post-Commit Hook

Posted by David James <li...@davidjamesdesign.com>.
Thanks Erik. That's what I thought, only I didn't understand what the  
DELTADIR and the svnlook were doing. So why don't they just have the  
script svn update at the root level, like you say? I wonder what the  
svnlook business if for. To make the update faster perhaps? (it is a  
large app)

On Sep 3, 2006, at 11:42 AM, Erik Huelsmann wrote:

> Ofcoure it doesn't: -N means 'non-recursive' and will ignore any
> targets not LOCALLY under version control. It will work as soon as you
> remove the -N and just update the development working copy root. But I
> guess that's what you mean by your strangely imposed workflow?
>
> bye,
>
> Erik.


Re: New Directories Not Updated on Post-Commit Hook

Posted by Erik Huelsmann <eh...@gmail.com>.
On 9/3/06, David James <li...@davidjamesdesign.com> wrote:
> I am working for an organization that has imposed a very odd svn/
> development setup. Basically, we all have to use svn (update, commit
> etc), but we can't work with our own working copies (i.e. develop and
> test). Every change we make to the code (even a color change in a css
> file!) we have to commit it, then the repository does a post-commit
> hook script which updates the development server, so we can see our
> changes. We are already up to 800 revisions and most of the messages
> in svn log are blank or say things like "changed stuff".
>
> Because I am at the bottom of the totem-pole in this company, all I
> can do is accept the wonky situation (I have tried to explain what is
> wrong with it and how to improve it, to no avail). Anyways, I needed
> to just talk about it ;) but the main problem now, is that the post-
> commit hook is not adding new directories, only new files to the
> development server. For instance, if the directory already exists,
> then new files are added to it. But if it does not exist, then
> nothing is created (directory or files).
>
> I have checked to make sure (in my working copy) that the directories
> are under version control, and they are.
>
> Here is the script they are using:
>
> REPOS="$1"
> REV="$2"
>
> DELTADIR=`/usr/bin/svnlook dirs-changed -r "$REV" "$REPOS"`
>
> /usr/bin/svn update -N /home/devel/$DELTADIR

Ofcoure it doesn't: -N means 'non-recursive' and will ignore any
targets not LOCALLY under version control. It will work as soon as you
remove the -N and just update the development working copy root. But I
guess that's what you mean by your strangely imposed workflow?

bye,

Erik.

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