Re: Script to change repo layout from `{trunk,tags,branches}/tag/proj/sub` to sub/`{trunk,tags,branches} ?
On Jun 13, 2012, at 01:22, Oliver Schrenk wrote: Am 13.06.2012 um 04:28 schrieb Ryan Schmidt: On Jun 12, 2012, at 07:05, Oliver Schrenk wrote: I have multiple projects with the following layout in the repository: trunk/project/subproject tags/tag/project/subproject branches/branch/project/subproject Now a subset of subprojects need to be moved to another repository. I want to change the layout of each subproject to the standard layout but want to retain tag and branch names but pointing to the trunk of the subproject. Is this possible? Of course: svn mv things to the way you want them to be. I should have been more clear in my question. I want to move the subprojects to another repo. But I guess the way to go is to move the sources in repo1 the way I need them and than somehow find I way to move them to another repo. Ah yes. In that case, along with the built-in svnadmin dump, svndumpfilter, and svnadmin load, the separate svndumptool may be helpful to you. Their web site has been down for awhile; here's a mirror: http://web.archive.org/web/20101102200928/http://svn.borg.ch/svndumptool/
Re: Script to change repo layout from `{trunk,tags,branches}/tag/proj/sub` to sub/`{trunk,tags,branches} ?
Ryan Schmidt wrote on Wed, Jun 13, 2012 at 02:05:59 -0500: On Jun 13, 2012, at 01:22, Oliver Schrenk wrote: Am 13.06.2012 um 04:28 schrieb Ryan Schmidt: On Jun 12, 2012, at 07:05, Oliver Schrenk wrote: I have multiple projects with the following layout in the repository: trunk/project/subproject tags/tag/project/subproject branches/branch/project/subproject Now a subset of subprojects need to be moved to another repository. I want to change the layout of each subproject to the standard layout but want to retain tag and branch names but pointing to the trunk of the subproject. Is this possible? Of course: svn mv things to the way you want them to be. I should have been more clear in my question. I want to move the subprojects to another repo. But I guess the way to go is to move the sources in repo1 the way I need them and than somehow find I way to move them to another repo. Ah yes. In that case, along with the built-in svnadmin dump, svndumpfilter, and svnadmin load, the separate svndumptool may be helpful to you. Their web site has been down for awhile; here's a mirror: http://web.archive.org/web/20101102200928/http://svn.borg.ch/svndumptool/ I thought the site came back up a couplf of weeks ago. We can ping the maintainer if needed. To the original question, I'll mention svnmucc as a way to implement the retreeing in one commit without a working copy of ^/ .
Staged Integration Lines and binary conflicts
Hello, I am using a Staged Integration Lines metodology in SVN where thereis a trunk (stable revisio) and a branch per Environment (por isntance Development). When a feature/patch is required then a new branch (featureA) is created and developers edit files in than branch. When the feature nedds to be promoted then the changes are commited to featureA-branch and the changes merged to Development. Finally changes are reintegrated to trunk. When we only modify text files there is no problem but, if featureA modifies a binary file, then merge to development for new feature-branches shows a binary conflict!! Me text files are merged ok. Test case: 1- Create a trunk with a binary (word file por instance) and a text file. 2.- Create a copy DES-branch from trunk. 3.- Create a copy featureA-branch from trunk. 4.- Edit text and binary in featureA. Commit changes. 5.- Merge featureA to DES. 6.- Reintegrate featureA to trunk. 7.- Create a copy featureB-branch from trunk. 8.- Edit text and binary in featureB. Commit changes. 9.- Merge featureB to DES. -- Shows a binary conflict!!! Why SVN is not able no guess/track than the binary is also commited to DES? Thank you in advance -- David Morón Ruano
Re: Script to change repo layout from `{trunk,tags,branches}/tag/proj/sub` to sub/`{trunk,tags,branches} ?
Thanks for the suggestions. I'll look into it. Am 13.06.2012 um 09:24 schrieb Daniel Shahaf: Ryan Schmidt wrote on Wed, Jun 13, 2012 at 02:05:59 -0500: On Jun 13, 2012, at 01:22, Oliver Schrenk wrote: Am 13.06.2012 um 04:28 schrieb Ryan Schmidt: On Jun 12, 2012, at 07:05, Oliver Schrenk wrote: I have multiple projects with the following layout in the repository: trunk/project/subproject tags/tag/project/subproject branches/branch/project/subproject Now a subset of subprojects need to be moved to another repository. I want to change the layout of each subproject to the standard layout but want to retain tag and branch names but pointing to the trunk of the subproject. Is this possible? Of course: svn mv things to the way you want them to be. I should have been more clear in my question. I want to move the subprojects to another repo. But I guess the way to go is to move the sources in repo1 the way I need them and than somehow find I way to move them to another repo. Ah yes. In that case, along with the built-in svnadmin dump, svndumpfilter, and svnadmin load, the separate svndumptool may be helpful to you. Their web site has been down for awhile; here's a mirror: http://web.archive.org/web/20101102200928/http://svn.borg.ch/svndumptool/ I thought the site came back up a couplf of weeks ago. We can ping the maintainer if needed. To the original question, I'll mention svnmucc as a way to implement the retreeing in one commit without a working copy of ^/ .
Re: Cleanup needed after failed update
Am 12.06.2012 16:49, schrieb Justin Case: - Original Message - From: Ulrich Eckhardt ulrich.eckha...@dominolaser.com Yes, probably, unless it was killed so quickly that it couldn't even cry for help any more, which e.g. happens if you cut the power or use kill -9 on POSIX systems. We're not talking here about natural catastrophes, but about a file which was in use when tried to update :) So the solution would be with the first update, the one which fails with file in use - it could revert the temp file creation and just leave the used file and the following tasks un-updated, then exit saying so. Then the next update will just have to pick up the remaining tasks, no need to cleanup. Sorry, but I'm afraid I didn't get across what I wanted to say. There is an SVN process, and that process finds a lock on a working copy[0]. It now must rely on the user to determine whether this lock is stale or not. In this specific context, I really don't care why the lock was there and whether it should be there or not, that is a related but different issue. See the last paragraph of my initial mail in this thread for my opinion on this different issue. (c: Uli [0] Just to get this clear: A lock on a working copy is not the same as denied access to a file during an update! Maybe that is the reason of the confusion between us? ** Domino Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932 ** Visit our website at http://www.dominolaser.com ** Diese E-Mail einschließlich sämtlicher Anhänge ist nur für den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empfänger sein sollten. Die E-Mail ist in diesem Fall zu löschen und darf weder gelesen, weitergeleitet, veröffentlicht oder anderweitig benutzt werden. E-Mails können durch Dritte gelesen werden und Viren sowie nichtautorisierte Änderungen enthalten. Domino Laser GmbH ist für diese Folgen nicht verantwortlich. **
Re: Cleanup needed after failed update
- Original Message - From: Ulrich Eckhardt ulrich.eckha...@dominolaser.com Sorry, but I'm afraid I didn't get across what I wanted to say. Correct. Let me simplify again my test case: 1. I run svn update 2. svn update finds a file in use, aborts 3. I free the file, oops it seems I have to cleanup Why should I have to cleanup??? svn update (see point 2) KNEW the file is in use, so instead of leaving locks around it could just have skipped that file and print a message that not everything have been updated. JC
Re: Cleanup needed after failed update
On Wed, Jun 13, 2012 at 6:20 AM, Justin Case send_lotsa_spam_h...@yahoo.com wrote: - Original Message - From: Ulrich Eckhardt ulrich.eckha...@dominolaser.com Sorry, but I'm afraid I didn't get across what I wanted to say. Correct. Let me simplify again my test case: 1. I run svn update 2. svn update finds a file in use, aborts 3. I free the file, oops it seems I have to cleanup Why should I have to cleanup??? svn update (see point 2) KNEW the file is in use, so instead of leaving locks around it could just have skipped that file and print a message that not everything have been updated. JC To detect a locked file as a safe change to reject and fail on, wouldn't Subversion have to know quite a bit about the underlying filesystem? This can be surprisiingly difficult, and is partly why lock files exist, to abstract that subtle knowledge into a more tangible no, we're not kidding, leave this alone while we're doing atomic operations stage. I'm not saying it's infeasible, just potentially more comlicated than you may realize.
Re: Cleanup needed after failed update
On Wed, Jun 13, 2012 at 12:20 PM, Justin Case send_lotsa_spam_h...@yahoo.com wrote: - Original Message - From: Ulrich Eckhardt ulrich.eckha...@dominolaser.com Sorry, but I'm afraid I didn't get across what I wanted to say. Correct. Let me simplify again my test case: 1. I run svn update 2. svn update finds a file in use, aborts 3. I free the file, oops it seems I have to cleanup Why should I have to cleanup??? svn update (see point 2) KNEW the file is in use, so instead of leaving locks around it could just have skipped that file and print a message that not everything have been updated. The problem is that, at the point where svn runs into this locked file, half of the work has already been done (the metadata in wc.db has already been updated). The remaining work (moving the file into place) is scheduled in a specific table called the work_queue. The work_queue *must* be run to completion to get back into a valid state. It cannot be rolled back (undoing the other part in wc.db), at least not with the current design. 'svn cleanup' removes any working copy locks, and runs whatever is left in the work_queue, thereby returning the working copy to a valid state. BTW, the work of moving the file into place has some sort of retry-loop, where it keeps retrying for a couple of seconds (to account for anti-virus scanners and such, where the file is locked for only a short time). But it can't keep waiting forever, so if the file is locked for a long time, update will have to give up. -- Johan
Re: Cleanup needed after failed update
From: Johan Corveleyn jcor...@gmail.com The problem is that, at the point where svn runs into this locked file, half of the work has already been done (the metadata in wc.db has already been updated). The remaining work (moving the file into place) is scheduled in a specific table called the work_queue. The work_queue *must* be run to completion to get back into a valid state. It cannot be rolled back (undoing the other part in wc.db), at least not with the current design. Ah I see now. Too bad then. Was it always that way, no rollback possible? Or maybe the ordering of operations used to be different so it gave up before updating the db? Because really I didn't run into this cleanup need until recently... Many thanks, JC
Re: svn copy vs svn add in pre-commit
On Wed, Jun 13, 2012 at 2:37 PM, ullrich.j...@elektrobit.com wrote: Hi, is there any way to determine if a commit to a repository is an svn copy or a shell level copy plus an svn add? I'm trying to limit people tagging to doing an svn copy, but I can't figure out how to determine if the current transaction (running in the pre-commit hook) is a copy or an add... Any hints? try 'svnlook changed --copy-info -t $TXN $REPOS' The --copy-info should show things like (from trunk/:rXXX). -- Johan
Re: Cleanup needed after failed update
On Wed, Jun 13, 2012 at 02:12:47PM +0200, Johan Corveleyn wrote: On Wed, Jun 13, 2012 at 12:20 PM, Justin Case send_lotsa_spam_h...@yahoo.com wrote: Why should I have to cleanup??? svn update (see point 2) KNEW the file is in use, so instead of leaving locks around it could just have skipped that file and print a message that not everything have been updated. The problem is that, at the point where svn runs into this locked file, half of the work has already been done (the metadata in wc.db has already been updated). The remaining work (moving the file into place) is scheduled in a specific table called the work_queue. The work_queue *must* be run to completion to get back into a valid state. It cannot be rolled back (undoing the other part in wc.db), at least not with the current design. So, the awkward external svn cleanup requirement is indeed simply a matter of implementation weakness in atomic transaction processing (i.e. application of a collected change only after *all* interim steps have been successfully completed in a *temporary* working area, or alternatively [when unable to implement it in such a definitely desireable way], a properly working rollback mechanism for partially modified data). 'svn cleanup' removes any working copy locks, and runs whatever is left in the work_queue, thereby returning the working copy to a valid state. Yeah, and ideally that currently running command itself would: - either instantiate the modified dataset only after everything has been successfully completed (data modification could be carried out atomically by an atomic rename of old dir vs. new dir or some such) - or execute a properly working rollback mechanism But as said before, that's possibly quite hard to achieve in light of an existing possibly multi-layered implementation which does things differently (and which possibly has some existing binding contracts to userspace which might get broken by a rewrite, perhaps special wc.db behaviour or so). Andreas Mohr
Re: svn copy vs svn add in pre-commit
On Wed, Jun 13, 2012 at 12:37:27PM +, ullrich.j...@elektrobit.com wrote: Hi, is there any way to determine if a commit to a repository is an svn copy or a shell level copy plus an svn add? I'm trying to limit people tagging to doing an svn copy, but I can't figure out how to determine if the current transaction (running in the pre-commit hook) is a copy or an add... Any hints? Cheers, Ulli Try 'svnlook changed --copy-info'.
RE: svn copy vs svn add in pre-commit
Hi, -Original Message- From: Johan Corveleyn [mailto:jcor...@gmail.com] try 'svnlook changed --copy-info -t $TXN $REPOS' The --copy-info should show things like (from trunk/:rXXX). That's exactly what I was looking for. :-) How could I have overlooked this!? Many thanks, I'll go and feel stupid now. Cheers, Ulli Please note: This e-mail may contain confidential information intended solely for the addressee. If you have received this e-mail in error, please do not disclose it to anyone, notify the sender promptly, and delete the message from your system. Thank you.
Retrieve pristine version of a replaced file via the svn api
Hi All, Developers in our organization need to have their changes reviewed before the commit is allowed. For this purpose a customized tool was created called createReviewChangeSet.exe. The tool does create a zip file containing a text file changeSet.txt which contains the change list with a explanation why the changes are needed. Beside this file two directories old and new are part of the zip file. The old directory contains the previous version of the file and the new directory contains the new version of the file. The complete file path is part of the zip file. Structure changeset.zip New dir file Old dir file Changeset.txt This tool was created for subversion 1.6 and based on the internals of subversion. Basically what happened the tool copied the new file and the file.svn-base to a directory and afterwards that directory is zipped. In case of a replaced file the copy is slightly different because the file.svn-revert was used. Modified file : actions copy new file - New/dir/file and copy file.svn-base - Old/dir/file Replaced file : actions copy new file - New/dir/file and copy file.svn-revert - Old/dir/file Currently the preparations are ongoing to move to subversion 1.7. The tool which was based on the internals of the working copy didn't work anymore. Decided was to rewrite the tool using sharpsvn, meaning use the API and don't depend on the subversion internals anymore. The new tool does work except for replaced files, I am unable to find a method to retrieve the pristine copy in that case. The following code is used FileInfo fileInfo = new FileInfo(targetOld); Directory.CreateDirectory(fileInfo.Directory.ToString()); SvnExportArgs svnExportArgs = new SvnExportArgs(); svnExportArgs.Revision = SvnRevision.Base; svnClient.Export(fileName, targetOld, svnExportArgs); filename is the changed file including path in the working copy. targetOld is the location where the file will end up in the exported directory structure. The above code does work fine for modified files. Unfortunate for a replaced file SvnRevision.Base doesn't return the pristine version. Is there something like SvnRevision.Pristine ? I did have contact with Bert Huijben, according to him this functionality is not available in the subversion API and therefore also not in the sharpsvn API. Did I miss something or can this be handled as a change request for a future release? Thanks in advance. With kind regards, Frank Roghair The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
Re: Commit size
Would be enough have the number bytes of changes. I did disk usage in pre-commit hook and disk usage in post-commit hook and then calculated the difference. But I commited the new file with size 20Kb and size of commit I recieved only 5Kb due some svn compression I guess. Thank you. Vlad. 2012/6/12 Cooke, Mark mark.co...@siemens.com: [Please add your reply at the bottom, it makes it easier to read] 2012/6/12 Andy Levy andy.l...@gmail.com: On Tue, Jun 12, 2012 at 5:21 AM, Vladimir Shun'kov shuny...@gmail.com wrote: Hello, Could you please help me with issue. Is it real to get commit size of user for statistic? How are you measuring size? Bytes? Lines? Number of files? And to what end? There are a lot of problems around measuring user activity by this sort of statistic. It's easily gamed, tends to ignore the effects of improving code in many ways[1], and in the case of binary files, it's pretty much meaningless. 1: http://folklore.org/StoryView.py?story=Negative_2000_Lines_Of_Code.txt On Tue, Jun 12, 2012 at 7:55 AM, Vladimir Shun'kov shuny...@gmail.com wrote: Hello, I need measure in bytes. I tried use pre-commit and post-commit hooks but I received not real size of commit due svn uses some compression. ...but what do you consider to be the real size of commit ~ the number of bytes of ...all affected files / ...just the changes / ...something completely different? What are you _actually_ trying to measure (and why)? Without knowing this, we cannot help you. Note: Subversion does not send all of the file(s), only the diffs (which includes all the file if new, of course!). This helps reduce network traffic and time. ~ mark c
Re: Commit size
On Wed, Jun 13, 2012 at 3:16 PM, Vladimir Shun'kov shuny...@gmail.com wrote: Would be enough have the number bytes of changes. I did disk usage in pre-commit hook and disk usage in post-commit hook and then calculated the difference. But I commited the new file with size 20Kb and size of commit I recieved only 5Kb due some svn compression I guess. In 1.7, there's a new svnlook subcommand: 'svnlook filesize'. This can give you the filesize of any file (from a revision or a transaction), without having to 'svnlook cat' it (i.e. more efficiently). Maybe you can use that directly, or use it to calculate the difference? Like, in the pre-commit hook: 1) 'svnlook changed -t $TXN $REPOS' to get the list of changes in this transaction 2) For every changed (or added) file, do 'svnlook filesize -t $TXN $REPOS' 3) For changed files, compare them to 'svnlook filesize -r $YOUNGEST $REPOS' where $YOUNGEST is the result of 'svnlook youngest $REPOS'. 4) Do some arithmetic on the result HTH -- Johan
Re: Cleanup needed after failed update
On Wed, Jun 13, 2012 at 7:12 AM, Johan Corveleyn jcor...@gmail.com wrote: Why should I have to cleanup??? svn update (see point 2) KNEW the file is in use, so instead of leaving locks around it could just have skipped that file and print a message that not everything have been updated. The problem is that, at the point where svn runs into this locked file, half of the work has already been done (the metadata in wc.db has already been updated). The remaining work (moving the file into place) is scheduled in a specific table called the work_queue. The work_queue *must* be run to completion to get back into a valid state. It cannot be rolled back (undoing the other part in wc.db), at least not with the current design. So a process that is supposed to be atomic isn't... 'svn cleanup' removes any working copy locks, and runs whatever is left in the work_queue, thereby returning the working copy to a valid state. BTW, the work of moving the file into place has some sort of retry-loop, where it keeps retrying for a couple of seconds (to account for anti-virus scanners and such, where the file is locked for only a short time). But it can't keep waiting forever, so if the file is locked for a long time, update will have to give up. So how is the user supposed to know better about what to do next than the program that is aware of the situation? -- Les Mikesell lesmikes...@gmail.com
How to create a tag from multiple revisions?
Hello, As the subject says, I want to create a tag consisting of at least 2 different revisions in the trunk. All revisions concern the same project. Reason is, I have several revisions in the trunk and I want to exclude some revisions from the tag because the code in those is not yet production ready. For example the trunk consists of this: trunk/ rev333 rev331 rev330 rev229 rev228 I want to create a tag based on rev333 and rev330 but not rev 331 since that code is not finished yet. Am I able to do this - using subclipse or tortoise? Thanks, Marc
RE: How to create a tag from multiple revisions?
-Original Message- From: marc [mailto:marc.at.comp...@gmail.com] Sent: 13 June 2012 16:23 To: subversion_us...@googlegroups.com Subject: How to create a tag from multiple revisions? Hello, As the subject says, I want to create a tag consisting of at least 2 different revisions in the trunk. All revisions concern the same project. Reason is, I have several revisions in the trunk and I want to exclude some revisions from the tag because the code in those is not yet production ready. For example the trunk consists of this: trunk/ rev333 rev331 rev330 rev229 rev228 I want to create a tag based on rev333 and rev330 but not rev 331 since that code is not finished yet. Am I able to do this - using subclipse or tortoise? Thanks, Marc I believe that you can only create a mixed-revision tag direct from a suitable working copy:- http://svnbook.red-bean.com/en/1.7/svn.branchmerge.tags.html#svn.branchmerge.tags.mkcomplex ~ mark c
Re: How to create a tag from multiple revisions?
Guten Tag marc, am Mittwoch, 13. Juni 2012 um 17:22 schrieben Sie: trunk/ rev333 rev331 rev330 rev229 rev228 I want to create a tag based on rev333 and rev330 but not rev 331 since that code is not finished yet. Am I able to do this - using subclipse or tortoise? Depending on your checkout, with Tortoise I would just right click and hold the button on trunk, move it over the tags folder, release the button, choose something like svn copy and delete the unneeded folders afterwards. The resulting commit will only have the folders you want in it. 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
Newer SSL libraries and TLSv1.2 incompatibilities
Regarding my question in the thread titled When connecting to an https server force use of TLS or SSLv3?. I asked that before I fully understood the problem, which is actually due to a backwards incompatibility in the newest OpenSSL libraries (1.0.1c) used by Subversion. Essentially, the newest client library can cause older servers to hang when it sends a TLSv1.2 handshake. The release notes for OpenSSL 1.0.1c contain (changes between 1.0.1 and 1.0.1a): *) Workarounds for some broken servers that hang if a client hello record length exceeds 255 bytes. 1. Do not use record version number TLS 1.0 in initial client hello: some (but not all) hanging servers will now work. 2. If we set OPENSSL_MAX_TLS1_2_CIPHER_LENGTH this will truncate the number of ciphers sent in the client hello. This should be set to an even number, such as 50, for example by passing: -DOPENSSL_MAX_TLS1_2_CIPHER_LENGTH=50 to config or Configure. Most broken servers should now work. 3. If all else fails setting OPENSSL_NO_TLS1_2_CLIENT will disable TLS 1.2 client support entirely. Is there any way, other than completely rebuilding svn locally, to use these workarounds?
Re: svn copy vs svn add in pre-commit
Sent from my iPhone On Jun 13, 2012, at 14:37, ullrich.j...@elektrobit.com wrote: Hi, is there any way to determine if a commit to a repository is an svn copy or a shell level copy plus an svn add? I'm trying to limit people tagging to doing an svn copy, but I can't figure out how to determine if the current transaction (running in the pre-commit hook) is a copy or an add... Any hints? Why do you want to do this? To assure that tags have been part of a QA release process?