You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Olivier Sannier <ob...@free.fr> on 2008/04/14 12:01:10 UTC

Detect file added with history using svnlook

Hi all,

In a pre-commit hook, I'm using svnlook to see what files were added and 
if the newly added files do not respect a set of rule, I fail the commit.
However, I would like those rules to only apply for files added to the 
repository, not files added with history (because of a move or copy).
Right now, I read the first two characters of the svnlook output, but 
contrary to svnlog, there is no A+ marker to indicate that the file was 
added with history.
Did I miss something?

Thanks for your help
Cheers
Olivier

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

Re: Detect file added with history using svnlook

Posted by Olivier Sannier <ob...@free.fr>.
Hari Kodungallur wrote:
>
> On Tue, Apr 15, 2008 at 12:06 AM, Olivier Sannier <obones@free.fr 
> <ma...@free.fr>> wrote:
> >  
> >
> >  Hari Kodungallur wrote:
> > On Mon, Apr 14, 2008 at 5:01 AM, Olivier Sannier <obones@free.fr 
> <ma...@free.fr>> wrote:
> >  
> >  
> > > Hi all,
> > >
> > > In a pre-commit hook, I'm using svnlook to see what files were 
> added and
> > if the newly added files do not respect a set of rule, I fail the 
> commit.
> > > However, I would like those rules to only apply for files added to the
> > repository, not files added with history (because of a move or copy).
> > > Right now, I read the first two characters of the svnlook output, but
> > contrary to svnlog, there is no A+ marker to indicate that the file was
> > added with history.
> > > Did I miss something?
> > >
> >  
> >  
> >  Use the --copy-info option of the 'svnlook changed' command.
> >  
> >  Rgds,
> >  -Hari
> >  
> >  Thanks, but this seems to only be available in the 1.5 branch, which I
> > cannot use on production servers. Is there some undocumented 
> equivalent in
> > the 1.4 versions ?
> >  
>
> I know it is there in 1.4.x
>
> *hari@homubuntu:~$ svnlook --version*
> svnlook, version 1.4.4 (r25188)
>   compiled Jul 29 2007, 18:51:42
>
> Copyright (C) 2000-2006 CollabNet.
> Subversion is open source software, see http://subversion.tigris.org/
> This product includes software developed by CollabNet 
> (http://www.Collab.Net/).
>
> The following repository back-end (FS) modules are available:
>
> * fs_fs : Module for working with a plain file (FSFS) repository.
>
> *hari@homubuntu:~$ svnlook help changed*
> changed: usage: svnlook changed REPOS_PATH
>
> Print the paths that were changed.
>
> Valid options:
>  -r [--revision] arg      : specify revision number ARG
>  -t [--transaction] arg   : specify transaction name ARG
>  --copy-info              : show details for copies
>
>
> regards,
> -Hari

Ah yes indeed. But it is not documented in the 1.4 version of the SVN 
book, hence the reason why I thought it was only available in the 1.5 
versions

Re: Detect file added with history using svnlook

Posted by Hari Kodungallur <hk...@gmail.com>.
On Tue, Apr 15, 2008 at 12:06 AM, Olivier Sannier <ob...@free.fr> wrote:
>
>
>  Hari Kodungallur wrote:
> On Mon, Apr 14, 2008 at 5:01 AM, Olivier Sannier <ob...@free.fr> wrote:
>
>
> > Hi all,
> >
> > In a pre-commit hook, I'm using svnlook to see what files were added and
> if the newly added files do not respect a set of rule, I fail the commit.
> > However, I would like those rules to only apply for files added to the
> repository, not files added with history (because of a move or copy).
> > Right now, I read the first two characters of the svnlook output, but
> contrary to svnlog, there is no A+ marker to indicate that the file was
> added with history.
> > Did I miss something?
> >
>
>
>  Use the --copy-info option of the 'svnlook changed' command.
>
>  Rgds,
>  -Hari
>
>  Thanks, but this seems to only be available in the 1.5 branch, which I
> cannot use on production servers. Is there some undocumented equivalent in
> the 1.4 versions ?
>

I know it is there in 1.4.x

*hari@homubuntu:~$ svnlook --version*
svnlook, version 1.4.4 (r25188)
  compiled Jul 29 2007, 18:51:42

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (
http://www.Collab.Net/).

The following repository back-end (FS) modules are available:

* fs_fs : Module for working with a plain file (FSFS) repository.

*hari@homubuntu:~$ svnlook help changed*
changed: usage: svnlook changed REPOS_PATH

Print the paths that were changed.

Valid options:
 -r [--revision] arg      : specify revision number ARG
 -t [--transaction] arg   : specify transaction name ARG
 --copy-info              : show details for copies


regards,
-Hari

Re: Detect file added with history using svnlook

Posted by Olivier Sannier <ob...@free.fr>.
Hari Kodungallur wrote:
> On Mon, Apr 14, 2008 at 5:01 AM, Olivier Sannier <obones@free.fr 
> <ma...@free.fr>> wrote:
>
>     Hi all,
>
>     In a pre-commit hook, I'm using svnlook to see what files were
>     added and if the newly added files do not respect a set of rule, I
>     fail the commit.
>     However, I would like those rules to only apply for files added to
>     the repository, not files added with history (because of a move or
>     copy).
>     Right now, I read the first two characters of the svnlook output,
>     but contrary to svnlog, there is no A+ marker to indicate that the
>     file was added with history.
>     Did I miss something?
>
>
>
> Use the --copy-info option of the 'svnlook changed' command.
>
> Rgds,
> -Hari

Thanks, but this seems to only be available in the 1.5 branch, which I 
cannot use on production servers. Is there some undocumented equivalent 
in the 1.4 versions ?

Re: Detect file added with history using svnlook

Posted by Hari Kodungallur <hk...@gmail.com>.
On Mon, Apr 14, 2008 at 5:01 AM, Olivier Sannier <ob...@free.fr> wrote:

> Hi all,
>
> In a pre-commit hook, I'm using svnlook to see what files were added and
> if the newly added files do not respect a set of rule, I fail the commit.
> However, I would like those rules to only apply for files added to the
> repository, not files added with history (because of a move or copy).
> Right now, I read the first two characters of the svnlook output, but
> contrary to svnlog, there is no A+ marker to indicate that the file was
> added with history.
> Did I miss something?
>


Use the --copy-info option of the 'svnlook changed' command.

Rgds,
-Hari