Re: Checksum mismatch between 1.4.2 server and 1.7 client

2012-02-23 Thread Daniel Shahaf
Nate Parsons wrote on Thu, Feb 23, 2012 at 16:46:55 -0500:
> * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
>   - handles 'http' scheme
>   - handles 'https' scheme
> 
> If there is any other information I could provide, let me know.

Are you able to rebuild --with-neon and try again?  I have no particular
reason to suggest this, but it might help isolate the problem.

(And see the ~/.subversion/servers:global:http-library config option)


Checksum mismatch between 1.4.2 server and 1.7 client

2012-02-23 Thread Nate Parsons
Hi all,

I'm not sure if this is something I did wrong or a bug, but I'm only
seeing this on the svn client I built myself (not in TortoiseSVN 1.7.5
or debian's 1.6.12dfsg-6 with the same server). I rebuilt with
--enable-maintainer-mode to try to get more information

At random, arbitrary files, checkouts fail, along the lines of:

subversion/svn/checkout-cmd.c:168: (apr_err=200014)
subversion/libsvn_client/checkout.c:229: (apr_err=200014)
subversion/libsvn_client/update.c:551: (apr_err=200014)
subversion/libsvn_client/update.c:412: (apr_err=200014)
subversion/libsvn_ra_serf/update.c:2399: (apr_err=200014)
subversion/libsvn_ra_serf/update.c:2399: (apr_err=200014)
subversion/libsvn_ra_serf/util.c:1913: (apr_err=200014)
subversion/libsvn_ra_serf/util.c:1913: (apr_err=200014)
subversion/libsvn_subr/checksum.c:418: (apr_err=200014)
svn: E200014: Checksum mismatch for 'REDACTED':
   expected:  14c7009f204c02209ef14148a8bde444
 actual:  d41d8cd98f00b204e9800998ecf8427e

I did ./get-deps for dependencies, and my version information is:

$ svn --version
svn, version 1.7.3 (r1242825)
   compiled Feb 23 2012, 16:20:07

Copyright (C) 2012 The Apache Software Foundation.
This software consists of contributions made by many people; see the NOTICE
file for more information.
Subversion is open source software, see http://subversion.apache.org/

The following repository access (RA) modules are available:

* ra_svn : Module for accessing a repository using the svn network protocol.
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
  - handles 'http' scheme
  - handles 'https' scheme

If there is any other information I could provide, let me know.

Thanks,
-Nate


Re: Automated Deployments in SVN--Windows

2012-02-23 Thread Les Mikesell
On Thu, Feb 23, 2012 at 10:35 AM, Waseem Shahzad
 wrote:
> One more thing.
>
>>> What do you mean with this? Is it describing the parts of your software 
>>> which need to be deployed or your ideas how you could deploy with 
>>> subversion?
>
> --- Yes , your ideas how you could deploy with subversion?

Some people do run live production servers on a subversion working
copy and trigger svn updates or switches in post-commit hooks on the
subversion server, but it is not really designed for that.  For most
purposes it would be better to use subversion for development with a
separate testing/deployment step.  For example you might use jenkins
(http://jenkins-ci.org/) to run automated test and deployment jobs
when in notices that changes have been commited, or simply do a manual
checkout on a staging system and then use rsync with the -C option to
push the changes to your production server(s).

-- 
   Les Mikesell
lesmikes...@gmail.com


Re: Automatic tagging

2012-02-23 Thread Geoff Hoffman
Tagging is simply an svn copy operation. svn copy is scriptable.
Does that help at all?


On Thu, Feb 23, 2012 at 10:07 AM, List Man wrote:

> Is there a way to tag a project based on some requirements?  I am trying
> to script it and I am coming up empty.  I am tired of manually tagging for
> each production deployment.  My research did not help enough.
>
>
> TIA,
>
> LS/
>

-- 


This email, including any attachments, is for the sole use of the intended 
recipient and may contain confidential information. If you are not the 
intended recipient, please immediately notify us by reply email or by 
telephone, delete this email and destroy any copies. Thank you.


Automatic tagging

2012-02-23 Thread List Man
Is there a way to tag a project based on some requirements?  I am trying to 
script it and I am coming up empty.  I am tired of manually tagging for each 
production deployment.  My research did not help enough.


TIA,

LS/


RE: Automated Deployments in SVN--Windows

2012-02-23 Thread Waseem Shahzad
One more thing.

>> What do you mean with this? Is it describing the parts of your software 
>> which need to be deployed or your ideas how you could deploy with subversion?

--- Yes , your ideas how you could deploy with subversion?


Cheers, 
Waseem Bukhari
CMer - Ext: 506


-Original Message-
From: Waseem Shahzad 
Sent: Thursday, February 23, 2012 11:34 AM
To: 'Thorsten Schöning'; users@subversion.apache.org
Subject: RE: Automated Deployments in SVN--Windows

Thanks for your ACK.

> I have just ASPs files , need to be copy and paste.
>Below are part of my deployment that I want to do with SVN.
 1. ASPs --> Copy Paste
 2. SQL Scripts 
 3. DLLs

Any way to work with Other than web svn?


Cheers, 
Waseem Bukhari
CMer - Ext: 506


-Original Message-
From: Thorsten Schöning [mailto:tschoen...@am-soft.de] 
Sent: Thursday, February 23, 2012 11:25 AM
To: users@subversion.apache.org
Subject: Re: Automated Deployments in SVN--Windows

Guten Tag Waseem Shahzad,
am Donnerstag, 23. Februar 2012 um 15:46 schrieben Sie:

> What is the best approach to deploy through SVN on Remote servers:-

That heavily depends on your software and environment. If your
software is installable using MSI, I for example prefer using WebSVN
to provide a relative simple download interface directly to a maybe
synced subversion repo to the users. If you have software which
doesn't need to be installed and depending on your customers, you may
even instruct them on using TortoiseSVN and directly.

> 1. ASP pages à Copy and Paste
> 2. SPs à in SQL 20xx
> 3. COM+Dlls

What do you mean with this? Is it describing the parts of your
software which need to be deployed or your ideas how you could deploy
with subversion?

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning   E-Mail:thorsten.schoen...@am-soft.de
AM-SoFT IT-Systeme  http://www.AM-SoFT.de/

Telefon.030-2 1001-310
Fax...05151-  9468- 88
Mobil..0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hanover HRB 207 694 - Geschäftsführer: Andreas Muchow



RE: Automated Deployments in SVN--Windows

2012-02-23 Thread Waseem Shahzad
Thanks for your ACK.

> I have just ASPs files , need to be copy and paste.
>Below are part of my deployment that I want to do with SVN.
 1. ASPs --> Copy Paste
 2. SQL Scripts 
 3. DLLs

Any way to work with Other than web svn?


Cheers, 
Waseem Bukhari
CMer - Ext: 506


-Original Message-
From: Thorsten Schöning [mailto:tschoen...@am-soft.de] 
Sent: Thursday, February 23, 2012 11:25 AM
To: users@subversion.apache.org
Subject: Re: Automated Deployments in SVN--Windows

Guten Tag Waseem Shahzad,
am Donnerstag, 23. Februar 2012 um 15:46 schrieben Sie:

> What is the best approach to deploy through SVN on Remote servers:-

That heavily depends on your software and environment. If your
software is installable using MSI, I for example prefer using WebSVN
to provide a relative simple download interface directly to a maybe
synced subversion repo to the users. If you have software which
doesn't need to be installed and depending on your customers, you may
even instruct them on using TortoiseSVN and directly.

> 1. ASP pages à Copy and Paste
> 2. SPs à in SQL 20xx
> 3. COM+Dlls

What do you mean with this? Is it describing the parts of your
software which need to be deployed or your ideas how you could deploy
with subversion?

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning   E-Mail:thorsten.schoen...@am-soft.de
AM-SoFT IT-Systeme  http://www.AM-SoFT.de/

Telefon.030-2 1001-310
Fax...05151-  9468- 88
Mobil..0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hanover HRB 207 694 - Geschäftsführer: Andreas Muchow



Re: Automated Deployments in SVN--Windows

2012-02-23 Thread Thorsten Schöning
Guten Tag Waseem Shahzad,
am Donnerstag, 23. Februar 2012 um 15:46 schrieben Sie:

> What is the best approach to deploy through SVN on Remote servers:-

That heavily depends on your software and environment. If your
software is installable using MSI, I for example prefer using WebSVN
to provide a relative simple download interface directly to a maybe
synced subversion repo to the users. If you have software which
doesn't need to be installed and depending on your customers, you may
even instruct them on using TortoiseSVN and directly.

> 1. ASP pages à Copy and Paste
> 2. SPs à in SQL 20xx
> 3. COM+Dlls

What do you mean with this? Is it describing the parts of your
software which need to be deployed or your ideas how you could deploy
with subversion?

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning   E-Mail:thorsten.schoen...@am-soft.de
AM-SoFT IT-Systeme  http://www.AM-SoFT.de/

Telefon.030-2 1001-310
Fax...05151-  9468- 88
Mobil..0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hanover HRB 207 694 - Geschäftsführer: Andreas Muchow



Re: Lost changes

2012-02-23 Thread Ryan Schmidt

On Feb 23, 2012, at 08:57, Gary Weinfurther wrote:

> I have a team of about seven people, both on Macs and PCs.  Within the last 
> couple of weeks, we have been experiencing frequent occurrences of lost 
> changes.  Someone will commit a change and later we discover that the change 
> has been reverted.

Subversion does not lose your changes. As you said, they're still there in the 
repository history; you can get them back.

> Everyone claims that they are updating before they work on files.  Even if 
> this was not always true, the SVN clients should catch commits that were not 
> on the most recent files, correct?

Almost certainly user error. A great way to get this to happen is:

* You open a file in an editor and start working on it
* Meanwhile someone else makes a change to the same file in their working copy 
and commits it
* You try to commit but fails because the working copy is out of date because 
of the other change that was committed.
* You update your working copy; Subversion merges the other changes into your 
working copy, *but your editor does not notice and does not reload the file*
* You go back to the editor, make some other changes and save, thus re-saving 
your now old version of the file on top of the nicely merged file, thus 
"reverting" the other person's changes
* You commit; it succeeds, "losing" the other person's changes

You can avoid this by always looking at the output of "svn diff" before 
committing and ensuring that every change listed is one you actually intend to 
make.

You should also use editors that reload files (either automatically or 
prompting you) that have been changed on disk by other programs.



Re: svn copy randomly gets "File or directory is out of date" error

2012-02-23 Thread Philip Martin
Stefan Sperling  writes:

> I am not entirely convinced yet that the situation involves only copies.
> That is what we're apparently being told, but we don't know what these
> build scripts are really doing.
>
> So, yes, more information is needed to figure out what's happening.

Looking at the mod_dav_svn code I see that the DAV protocol imposes
further restrictions on the out-of-dateness beyond those imposed by the
repository itself.  It looks like the error is comimg from mod_dav_svn
in response to the DAV CHECKOUT request.  I'm still not sure exactly how
to trigger the original error.

Upgrading the client and server to 1.7 to get the v2 protocol will
probably make the problem go away as that doesn't use DAV CHECKOUT.

-- 
Philip


Re: Lost changes

2012-02-23 Thread Stefan Sperling
On Thu, Feb 23, 2012 at 02:57:10PM +, Gary Weinfurther wrote:
> I have a team of about seven people, both on Macs and PCs.  Within the
> last couple of weeks, we have been experiencing frequent occurrences
> of lost changes.  Someone will commit a change and later we discover
> that the change has been reverted.  Everyone claims that they are
> updating before they work on files

Do people also always review the changes they are about to commit,
making sure what is being committed is really what they intend
to commit?

Editors with auto-save can cause this kind of problem.
E.g. the developer leaves the editor open with unsaved changes,
runs an update, svn changes the working file, and now the editor
saves the file on top of the new one overwriting the incoming changes.
If the developer commits the file other peoples' changes are undone
accidentally.

You can tell whether this kind of thing is happening by studying
the output of 'svn log --diff' and looking for unrelated changes
in existing commits.


RE: Automated Deployments in SVN--Windows

2012-02-23 Thread Waseem Shahzad
Thanks for your ACK.

I am using Windows ,Visual SVN Server and tortoise SVN as Client.

Now Pls share your thoughts?


Cheers, 
Waseem Bukhari
CMer - Ext: 506


-Original Message-
From: Ryan Schmidt [mailto:subversion-20...@ryandesign.com] 
Sent: Thursday, February 23, 2012 10:11 AM
To: Waseem Shahzad
Cc: users@subversion.apache.org
Subject: Re: Automated Deployments in SVN--Windows


On Feb 23, 2012, at 08:46, Waseem Shahzad wrote:

> Any threat or problem if I put my Live Application in SVN checkout?

Depending on where you check out your working copy on the server, your
version of Subversion, and your web server configuration, it's possible
users could access all the files in the working copy's pristine area,
thus possibly being able to read your code and/or gain access to any
passwords or other confidential information contained therein. So I
recommend you configure your web server to deny access to any URL
containing "/.svn".

For Apache 2, I have the following line in my httpd.conf to accomplish
this goal:

RedirectMatch 404 .*/\.svn(/|$)

If you use a different web server you'll have to consult its
documentation to learn how to do that kind of thing.


For automated deployments generally, I've often recommended
SVN::Notify::Mirror. I don't know if it will help in your situations
specifically.

http://search.cpan.org/perldoc?SVN::Notify::Mirror




Re: Lost changes

2012-02-23 Thread Nico Kadel-Garcia
On Thu, Feb 23, 2012 at 9:57 AM, Gary Weinfurther wrote:

>  I have a team of about seven people, both on Macs and PCs.  Within the
> last couple of weeks, we have been experiencing frequent occurrences of
> lost changes.  Someone will commit a change and later we discover that the
> change has been reverted.  Everyone claims that they are updating before
> they work on files.  Even if this was not always true, the SVN clients
> should catch commits that were not on the most recent files, correct?
>
>
>
Your observation sounds right. Sounds like you really need to examine the
change history. For example, an automated procedure that is copying *back*
old files and committing them on top of old changes would cause just this
sort of problem. Also, if you have multiple Subversion servers in a
multi-hosted proxy or svnsync based setup, or you're using DNS to point to
a master and a slave server and the slave allows writes, you're ripe for
"split-brain" problems.

It does sound like a PEBKAC, though. (Problem Exists Between Keyboard And
Chair.) For example, if people are working in branches and not merging
changes carefully before committing to trunk, that could also cause issues.
And don't get me *going* on what clever people can do to git2svn gateways.


> Server is VisualSVN 2.5.3.
>
>
>
This is where I'd start looking. In particular, setting up a pre-commit
script to log or email a log of changes so that you have a transcript of
operations would be very helpful to debugging.
 **

> PC Clients:
>
> ** **
>
> TortoiseSVN 1.7.5, Build 22551 - 64 Bit
>
> ** **
>
> Mc Clients:
>
> ** **
>
> SmartSVN 6.6.11
>
> ** **
>
> SmartSVN Early Access 7EA4
>
> ** **
>
> Subversion Client Adapter for Eclipse 1.6.12
>
> Subversion JavaHL 1.6.17
>
> SVN Team Provider Core 1.6.18
>
> ** **
>
> Versions 1.1.10 Build 1029
>
> ** **
>
> ** **
>
> I am not subscribed. Please CC me on replies.
>
> ** **
>
> Gary
>


Re: svn copy randomly gets "File or directory is out of date" error

2012-02-23 Thread Stefan Sperling
On Thu, Feb 23, 2012 at 03:05:41PM +, Philip Martin wrote:
> Stefan Sperling  writes:
> >
> > Recall that any commit to a node creates a new revision of the node's
> > parents in the repository. If a commit changes, for instance, /trunk/foo,
> > the following nodes will get a new revision in the repository:
> >
> >   /
> >   /trunk
> >   /trunk/foo
> >
> > This is called "bubble-up process" and is described here in detail:
> > http://www.red-bean.com/kfogel/beautiful-code/bc-chapter-02.html
> >
> > A concurrent commit racing the copy operation can cause a new revision of
> > the destination 'tags/build', of '/tags', and of the root.
> > This can cause an out-of-date error because the copy operation is now
> > trying to modify out-of-date directories.
> 
> That's not correct, a commit does involve bubble-up changes but that
> doesn't stop concurrent commits.  Look at the '1729' loop in
> svn_fs_fs__commit_txn, that will detect the race and retry the commit
> based on the new revision.
> 
> You can get a conflict on URL-URL copies if two concurrent commits
> attempt to create the same destination URL, but that leads to a
> "Conflict at" error, not "out of date".

I made a generalised statement because it wasn't clear what the other
commit is doing. In the general case, it won't always work.
For example, if a commit deletes tags/build, that should prevent a
competing transaction from copying into tags/build. I don't know
off-hand what kind of error is returned in this situation however.

> I'm not sure how an URL-URL copy can trigger the original error.  Is
> there any clue in the apache error log?  Which version of Subversion on
> the client and server?  Are you using serf or neon?  Is there a
> master-slave write-through proxy involved?

I am not entirely convinced yet that the situation involves only copies.
That is what we're apparently being told, but we don't know what these
build scripts are really doing.

So, yes, more information is needed to figure out what's happening.


Re: Lost changes

2012-02-23 Thread vishwajeet singh
On Thu, Feb 23, 2012 at 8:27 PM, Gary Weinfurther wrote:

>  I have a team of about seven people, both on Macs and PCs.  Within the
> last couple of weeks, we have been experiencing frequent occurrences of
> lost changes.  Someone will commit a change and later we discover that the
> change has been reverted.  Everyone claims that they are updating before
> they work on files.  Even if this was not always true, the SVN clients
> should catch commits that were not on the most recent files, correct?
>

I heard the similar argument in one of my training classes, but let me
assure you Subversion does not allow to commit on older version of files,
so the problem is with way your team is working, what must be happening is
that the person trying to commit later would be getting out of date error
and than he must be updating and getting  conflict and he must be replacing
the file with his version and commiting it back, atleast this was the case
in the training which I was conducting, in such cases logs are your best
friend, go through the logs check the files on different revision if text
you can view the diff, if not you will have to manually review but you will
surely find the revision on which the previous commits changes were over
written by someone else.

Let us know how your review goes and findings.





>
> ** **
>
> Server is VisualSVN 2.5.3.
>
> ** **
>
> PC Clients:
>
> ** **
>
> TortoiseSVN 1.7.5, Build 22551 - 64 Bit
>
> ** **
>
> Mc Clients:
>
> ** **
>
> SmartSVN 6.6.11
>
> ** **
>
> SmartSVN Early Access 7EA4
>
> ** **
>
> Subversion Client Adapter for Eclipse 1.6.12
>
> Subversion JavaHL 1.6.17
>
> SVN Team Provider Core 1.6.18
>
> ** **
>
> Versions 1.1.10 Build 1029
>
> ** **
>
> ** **
>
> I am not subscribed. Please CC me on replies.
>
> ** **
>
> Gary
>



-- 
Vishwajeet Singh
+91-9657702154 | dextrou...@gmail.com | http://bootstraptoday.com
Twitter: http://twitter.com/vishwajeets | LinkedIn:
http://www.linkedin.com/in/singhvishwajeet


Re: Issue report: subversion 1.7.2 windows command line client cannot copy URL -> WC if URL contains externals

2012-02-23 Thread Paul Burba
On Wed, Feb 22, 2012 at 12:36 PM, Paul Burba  wrote:
> On Wed, Feb 22, 2012 at 12:05 PM, Philip Martin
>  wrote:
>> Paul Burba  writes:
>>
>>> Index: subversion/libsvn_client/copy.c
>>> ===
>>> --- subversion/libsvn_client/copy.c   (revision 1292379)
>>> +++ subversion/libsvn_client/copy.c   (working copy)
>>> @@ -1519,6 +1519,17 @@
>>>          ctx->notify_baton2 = old_notify_baton2;
>>>
>>>          SVN_ERR(err);
>>> +
>>> +#ifdef WIN32
>>> +        if (!ignore_externals)
>>> +          {
>>> +            /* Issue #4123: We may still hold file handles to the databases
>>> +               for externals under TMP_ABSPATH.  We need to release these
>>> +               handles before we move TMP_ABSPATH below or Windows will
>>> +               raise an ERROR_ACCESS_DENIED error. */
>>> +            SVN_ERR(svn_wc__externals_close(tmp_abspath, ctx->wc_ctx, 
>>> pool));
>>> +          }
>>> +#endif
>>
>> I'm not sure why this would be windows specific.  Yes, Linux lets us
>> move the dir with the handle open but I think it would be an error for
>> the Subversion client to use the handle after the move.
>
> Hi Philip,
>
> OK, both you and Bert pointed this out, so it's gone.
>
>> Is this the best way to do it?  It isn't what I was expecting.  I was
>> expecting the checkout code to explicitly close the handles it was
>> responsible for opening.  Then the copy code would not have to do
>> anything special.
>
> Are you thinking within svn_client__checkout_internal or from its
> caller, like the attached patch?

Doh, of course the attached patch *is* within on of
svn_client__checkout_internal's helpers; that's what I get for a quick
patch.  This fixes the issue and passes all tests; committed it in
r1292827.

Paul


Lost changes

2012-02-23 Thread Gary Weinfurther
I have a team of about seven people, both on Macs and PCs.  Within the last 
couple of weeks, we have been experiencing frequent occurrences of lost 
changes.  Someone will commit a change and later we discover that the change 
has been reverted.  Everyone claims that they are updating before they work on 
files.  Even if this was not always true, the SVN clients should catch commits 
that were not on the most recent files, correct?

Server is VisualSVN 2.5.3.

PC Clients:

TortoiseSVN 1.7.5, Build 22551 - 64 Bit

Mc Clients:

SmartSVN 6.6.11

SmartSVN Early Access 7EA4

Subversion Client Adapter for Eclipse 1.6.12
Subversion JavaHL 1.6.17
SVN Team Provider Core 1.6.18

Versions 1.1.10 Build 1029


I am not subscribed. Please CC me on replies.

Gary


Re: Automated Deployments in SVN--Windows

2012-02-23 Thread Ryan Schmidt

On Feb 23, 2012, at 08:46, Waseem Shahzad wrote:

> Any threat or problem if I put my Live Application in SVN checkout?

Depending on where you check out your working copy on the server, your version 
of Subversion, and your web server configuration, it's possible users could 
access all the files in the working copy's pristine area, thus possibly being 
able to read your code and/or gain access to any passwords or other 
confidential information contained therein. So I recommend you configure your 
web server to deny access to any URL containing "/.svn".

For Apache 2, I have the following line in my httpd.conf to accomplish this 
goal:

RedirectMatch 404 .*/\.svn(/|$)

If you use a different web server you'll have to consult its documentation to 
learn how to do that kind of thing.


For automated deployments generally, I've often recommended 
SVN::Notify::Mirror. I don't know if it will help in your situations 
specifically.

http://search.cpan.org/perldoc?SVN::Notify::Mirror




Re: svn copy randomly gets "File or directory is out of date" error

2012-02-23 Thread Philip Martin
Stefan Sperling  writes:

> On Thu, Feb 23, 2012 at 04:18:29AM -0800, leojhartiv wrote:
>> 
>> We have an automated build process (enabled via jenkins) that creates a
>> nightly tag and uses that tag to deploy the latest and greatest version of
>> our app to SIT.  Here are there we are getting a "file or directory is out
>> of date" error.  I find this confusing as I'm performing an SVN copy, which
>> I thought was an all server-side command (doesn't depend on a workspace) and
>> thus couldn't be out of date.
>> 
>> Here's the command:
>> svn cp --username=user --password= 'http://fromurl'
>> http://tourl/tags/builds/4.1.3.0_20120223.0 -m 'Nightly build tag created by
>> CI' 
>> svn: File or directory 'tags/builds' is out of date; try updating 
>> svn: resource out of date; try updating 
>> 
>> Any ideas on why this might be happening?
>
> Server-side copies can fail if they compete with concurrent commits.
>
> Recall that any commit to a node creates a new revision of the node's
> parents in the repository. If a commit changes, for instance, /trunk/foo,
> the following nodes will get a new revision in the repository:
>
>   /
>   /trunk
>   /trunk/foo
>
> This is called "bubble-up process" and is described here in detail:
> http://www.red-bean.com/kfogel/beautiful-code/bc-chapter-02.html
>
> A concurrent commit racing the copy operation can cause a new revision of
> the destination 'tags/build', of '/tags', and of the root.
> This can cause an out-of-date error because the copy operation is now
> trying to modify out-of-date directories.

That's not correct, a commit does involve bubble-up changes but that
doesn't stop concurrent commits.  Look at the '1729' loop in
svn_fs_fs__commit_txn, that will detect the race and retry the commit
based on the new revision.

You can get a conflict on URL-URL copies if two concurrent commits
attempt to create the same destination URL, but that leads to a
"Conflict at" error, not "out of date".

I'm not sure how an URL-URL copy can trigger the original error.  Is
there any clue in the apache error log?  Which version of Subversion on
the client and server?  Are you using serf or neon?  Is there a
master-slave write-through proxy involved?

-- 
Philip


Re: svn copy randomly gets "File or directory is out of date" error

2012-02-23 Thread leojhartiv

My guess is that this is what's happening (in my case):
I have two nightly build processes creating tags.  #1 and #2 both run at
around the same time.  Perhaps #2 starts while #1 is still running and then
Subversion tells us that something is changed (optimistic locking).

There are probably 2 ways for me to fix this:
1. Schedule one build 15 minutes later (which I am trying)
2. Wrap my svn copy command in a shell script and add some retry logic

Thanks for your explanation of what's happening here!



Andreas Krey wrote:
> 
> On Thu, 23 Feb 2012 14:10:22 +, Stefan Sperling wrote:
> ...
>> > svn cp --username=user --password= 'http://fromurl'
>> > http://tourl/tags/builds/4.1.3.0_20120223.0 -m 'Nightly build tag
>> created by
>> > CI' 
>> > svn: File or directory 'tags/builds' is out of date; try updating 
>> > svn: resource out of date; try updating 
> 
> At the very least the error messages are misleading:
> There is nothing that could be updated in this case.
> 
>> Server-side copies can fail if they compete with concurrent commits.
> 
> Seriously, what competition? What reason even is there to allow
> a purely server-side operation to run into a can't-continue state
> due to other commits -- and not let those commits (that are late
> to the race to begin with) fail?
> 
> The message should really be
> 
>   svn: I don't feel like it, please retry.
> 
> Andreas
> 
> -- 
> "Totally trivial. Famous last words."
> From: Linus Torvalds 
> Date: Fri, 22 Jan 2010 07:29:21 -0800
> 
> 

-- 
View this message in context: 
http://old.nabble.com/svn-copy-randomly-gets-%22File-or-directory-is-out-of-date%22-error-tp33377417p33378402.html
Sent from the Subversion Users mailing list archive at Nabble.com.



Re: svn copy randomly gets "File or directory is out of date" error

2012-02-23 Thread Stefan Sperling
On Thu, Feb 23, 2012 at 03:24:54PM +0100, Andreas Krey wrote:
> On Thu, 23 Feb 2012 14:10:22 +, Stefan Sperling wrote:
> ...
> > > svn cp --username=user --password= 'http://fromurl'
> > > http://tourl/tags/builds/4.1.3.0_20120223.0 -m 'Nightly build tag created 
> > > by
> > > CI' 
> > > svn: File or directory 'tags/builds' is out of date; try updating 
> > > svn: resource out of date; try updating 
> 
> At the very least the error messages are misleading:
> There is nothing that could be updated in this case.

Yes, the error message is misleading.
The client probably prints this message for any failed commit.
We could try to make it print a different message for pure
server-side commits. But I don't think this is a high priority
issue (aka I'd review patches for this, but not work on it myself).

> > Server-side copies can fail if they compete with concurrent commits.
> 
> Seriously, what competition? What reason even is there to allow
> a purely server-side operation to run into a can't-continue state
> due to other commits -- and not let those commits (that are late
> to the race to begin with) fail?

A server-side commit is a transaction, just like any other commit.
There is no difference from the filesystem's point of view between
a commit made from a working copy and a commit made only via URLs.

Subversion does in fact attempt to reconcile changes from competing
transactions before giving up. But this can fail for various reasons.
Given the information provided in the problem report, the exact reason
for the failure isn't entirely clear. Specifically, it isn't clear what
the hypothetical concurrent commit is doing. So if my answer was a bit
hand-wavy on details for you, I'm afraid I can't provide additional
details without more information.
 
> The message should really be
> 
>   svn: I don't feel like it, please retry.

Oh, come on.
I'm just going to suggest that you read the code of svn_fs_fs__commit_txn()
if you feel like understanding the details.


Automated Deployments in SVN--Windows

2012-02-23 Thread Waseem Shahzad
Guys

What is the best approach to deploy through SVN on Remote servers:-

 

1.   ASP pages à Copy and Paste

2.   SPs à in SQL 20xx

3.   COM+Dlls

 

Moreover  ; Any threat or problem if I put my Live Application in SVN checkout?

 

Cheers, 

Waseem Bukhari

CMer

 



Re: svn copy randomly gets "File or directory is out of date" error

2012-02-23 Thread Andreas Krey
On Thu, 23 Feb 2012 14:10:22 +, Stefan Sperling wrote:
...
> > svn cp --username=user --password= 'http://fromurl'
> > http://tourl/tags/builds/4.1.3.0_20120223.0 -m 'Nightly build tag created by
> > CI' 
> > svn: File or directory 'tags/builds' is out of date; try updating 
> > svn: resource out of date; try updating 

At the very least the error messages are misleading:
There is nothing that could be updated in this case.

> Server-side copies can fail if they compete with concurrent commits.

Seriously, what competition? What reason even is there to allow
a purely server-side operation to run into a can't-continue state
due to other commits -- and not let those commits (that are late
to the race to begin with) fail?

The message should really be

  svn: I don't feel like it, please retry.

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds 
Date: Fri, 22 Jan 2010 07:29:21 -0800


Re: svn copy randomly gets "File or directory is out of date" error

2012-02-23 Thread Stefan Sperling
On Thu, Feb 23, 2012 at 04:18:29AM -0800, leojhartiv wrote:
> 
> We have an automated build process (enabled via jenkins) that creates a
> nightly tag and uses that tag to deploy the latest and greatest version of
> our app to SIT.  Here are there we are getting a "file or directory is out
> of date" error.  I find this confusing as I'm performing an SVN copy, which
> I thought was an all server-side command (doesn't depend on a workspace) and
> thus couldn't be out of date.
> 
> Here's the command:
> svn cp --username=user --password= 'http://fromurl'
> http://tourl/tags/builds/4.1.3.0_20120223.0 -m 'Nightly build tag created by
> CI' 
> svn: File or directory 'tags/builds' is out of date; try updating 
> svn: resource out of date; try updating 
> 
> Any ideas on why this might be happening?

Server-side copies can fail if they compete with concurrent commits.

Recall that any commit to a node creates a new revision of the node's
parents in the repository. If a commit changes, for instance, /trunk/foo,
the following nodes will get a new revision in the repository:

  /
  /trunk
  /trunk/foo

This is called "bubble-up process" and is described here in detail:
http://www.red-bean.com/kfogel/beautiful-code/bc-chapter-02.html

A concurrent commit racing the copy operation can cause a new revision of
the destination 'tags/build', of '/tags', and of the root.
This can cause an out-of-date error because the copy operation is now
trying to modify out-of-date directories.


svn copy randomly gets "File or directory is out of date" error

2012-02-23 Thread leojhartiv

We have an automated build process (enabled via jenkins) that creates a
nightly tag and uses that tag to deploy the latest and greatest version of
our app to SIT.  Here are there we are getting a "file or directory is out
of date" error.  I find this confusing as I'm performing an SVN copy, which
I thought was an all server-side command (doesn't depend on a workspace) and
thus couldn't be out of date.

Here's the command:
svn cp --username=user --password= 'http://fromurl'
http://tourl/tags/builds/4.1.3.0_20120223.0 -m 'Nightly build tag created by
CI' 
svn: File or directory 'tags/builds' is out of date; try updating 
svn: resource out of date; try updating 

Any ideas on why this might be happening?

Thanks!
-- 
View this message in context: 
http://old.nabble.com/svn-copy-randomly-gets-%22File-or-directory-is-out-of-date%22-error-tp33377417p33377417.html
Sent from the Subversion Users mailing list archive at Nabble.com.



Re: commit hooks - is there a hook which is called after commit even if its not successful

2012-02-23 Thread Andreas Krey
On Thu, 23 Feb 2012 11:50:29 +, Torsten Krah wrote:
...
> In theory yes it would work to do the same thing again in post-commit -
> but pre-commit already did all the work before. Would be nice if there
> would be no need to parse and analyze things twice, may take time and
> resources depending on the commit size.

Put the pre-commit hook work aside (which you need to do anyway),
and when no post-commit hook has picked it up for, say, 15 minutes,
discard it. If the server should really be that slow, then you
will have to recreate the stuff, but only then. You can do the
expiry check in the post-commit trigger; you may also look
at the (monotonical) revision number.

I don't expect there to be a guarantee that there is only ever
one set of hooks (pre-hook/commit/post-hook) running, so you need
to deal with multiple work sets anyway.

Andreas

-- 
"Totally trivial. Famous last words."
From: Linus Torvalds 
Date: Fri, 22 Jan 2010 07:29:21 -0800


Re: commit hooks - is there a hook which is called after commit even if its not successful

2012-02-23 Thread Torsten Krah
Am Donnerstag, den 23.02.2012, 11:16 +0100 schrieb Stephen Butler:
> Why not do 1 & 3 in a post-commit hook?

In pre-commit things are already needed to be parsed to check if the
commit itself is allowed.
When doing those checks things can be prepared too for the external
system - 2 in 1 ;-).
So the parsing work have to be done at pre-commit and preparing can be
done in this process too.

In theory yes it would work to do the same thing again in post-commit -
but pre-commit already did all the work before. Would be nice if there
would be no need to parse and analyze things twice, may take time and
resources depending on the commit size.



smime.p7s
Description: S/MIME cryptographic signature


Re: commit hooks - is there a hook which is called after commit even if its not successful

2012-02-23 Thread Stephen Butler

On Feb 23, 2012, at 10:44 , Torsten Krah wrote:

> Am Mittwoch, den 22.02.2012, 14:53 -0500 schrieb Andy Levy:
>> Can pre-commit clean up after itself, so that the environment is clean
>> regardless of the result of the commit?
> 
> Hm no, the action should do some work (external system) and does need to
> know if commit was successful or if it failed.
> At pre-commit time i'll got all changes (what changes, is it valid etc.
> pp. - all the things which can be done in pre-commit) and can prepare
> them for an external system.
> Those changes, which were prepared at pre-commit time, need to be
> committed at success time in post-commit and reverted if it fails (which
> is missing at the moment) - as data should be consistent as possible,
> the failing info would be needed here.
> Details how it is done does not matter, use case is:
> 
> 1. At pre-commit prepare things for an external system
> 2. let svn do its work
> 3. At successful commit do this too for prepared work, if it failed,
> revert prepared things too.

Why not do 1 & 3 in a post-commit hook?

Have you measured how much time you save by running the external 
system early?

I suspect you won't save much.  For a large commit over a slow connection, 
there may be a few minutes' gap between start-commit and pre-commit.  
The gap between pre-commit and post-commit is usually short because the 
data is already on the server.

Regards,
Steve

> 
> Did this explanation help to understand the use case? any ideas how to
> do, or impossible at the moment?
> May a feature request at bug tracker help to get those feature?




Re: How to recognize commit failure via hooks

2012-02-23 Thread Daniel Shahaf
Lars Klonowski wrote on Thu, Feb 23, 2012 at 10:42:40 +0100:
> The post-commit hook gets a revision parameter and I don't see a
> possibility how to determine which transaction it came from.

This has been implemented for 1.8.0:

http://subversion.apache.org/docs/release-notes/1.8#hooks-post-commit


How to recognize commit failure via hooks

2012-02-23 Thread Lars Klonowski

Hello guys,

We are running a web application with subversion and database access.
The normal workflow is to make changes on the web surface,
which will then trigger further changes in subversion and the database.
This way we can easily assure consistency between these two systems.

Now, we are requested to also carry subversion changes to the database.
A pre-commit hook will assure that these changes are database conform.
It will also determine which changes should be made in the database.
These will be triggered in the post-commit hook,
to be sure the subversion commit was successful.


But here the problems start:

The post-commit hook gets a revision parameter and I don't see a
possibility how to determine which transaction it came from.
(This is necessary, as we have to apply the right database changes
determined in the pre-commit hook.)

So we decide to use internal locks for specific elements.
The pre-commit hook determines the elements to be updated, locks them,
checks database confirmity and maps the database changes.
The post-commit hook determines the elements to be updated,
performs the mapped database operations and releases the locks.

But if the commit fails, the elements stay locked.
The application now has to decide if it is just a lengthy commit
or if it failed and the locks have to be released.


So is there any possibility to notify the application about the
commit failure via hooks?
Or has anyone ever dealt with triggering database changes based on
subversion commits and has found a solution for it?


Best regards,
Lars Klonowski


Re: commit hooks - is there a hook which is called after commit even if its not successful

2012-02-23 Thread Torsten Krah
Am Mittwoch, den 22.02.2012, 14:53 -0500 schrieb Andy Levy:
> Can pre-commit clean up after itself, so that the environment is clean
> regardless of the result of the commit?

Hm no, the action should do some work (external system) and does need to
know if commit was successful or if it failed.
At pre-commit time i'll got all changes (what changes, is it valid etc.
pp. - all the things which can be done in pre-commit) and can prepare
them for an external system.
Those changes, which were prepared at pre-commit time, need to be
committed at success time in post-commit and reverted if it fails (which
is missing at the moment) - as data should be consistent as possible,
the failing info would be needed here.
Details how it is done does not matter, use case is:

1. At pre-commit prepare things for an external system
2. let svn do its work
3. At successful commit do this too for prepared work, if it failed,
revert prepared things too.

Did this explanation help to understand the use case? any ideas how to
do, or impossible at the moment?
May a feature request at bug tracker help to get those feature?


smime.p7s
Description: S/MIME cryptographic signature