Re: Issue parsing url with '+' in it
On 30.12.2017 20:35, John McClean wrote: > I'm trying to checkout/export part of a github repo. > > svn export "https://github.com/apache/avro.git/trunk/lang/c++"; > > This creates a directory but doesn't get any files. It work fine for > urls which don't have a '+' in them. > > URI encoding the '+'s doesn't change the behavior. > > Any ideas? Report a bug to GitHub, their Subversion protocol is a custom implementation that AFAIK is not based on our code. -- Brane
Re: How to see when an item was added using svnlook?
On 01.01.2018 21:28, Bo Berglund wrote: > I am trying to use svnlook to find the revision when a directory was > created. I want to use this to dig out the timestamps of tags and > branches. My svn version is 1.9.7 (both server and client). > > So far I have not found a way to do it... > > svnlook history /branches/ > shows a lot of revisions which are for changes to any file within the > directory, but not the addition commit for the actual directory itself > AND unrelated directories (the command below is on one line): The directories are not unrelated. > D:\>svnlook history D:\SVN\test\bosse > /CVSMailer/branches/Branch_Rel_1-2-9 -l 5 > REVISION PATH > > 120 /CVSMailer/branches/Branch_Rel_1-2-9 > 119 /CVSMailer/branches/Branch_Rel_1-2-9 > 103 /CVSMailer/branches/Branch_Rel_1-2-9 > 100 /CVSMailer/trunk > 98 /CVSMailer/trunk > ... and the list continues in *trunk* for about 50 lines ... Yes, that is correct. You asked for the history of the item; it was copied (branched) from trunk in r103, and svnlook is showing the whole history. > Is there a command to show the revision when an item (directory or > file) was actually created in svn? Currently the only hack to do this is by using 'svn log --stop-on-copy' in a working copy. > I have read the whole SVNBook 1.7 chapter on svnlook but did not find > an obvious candidate. > > If I know the revision I can get additional information using svnlook: > > D:\>svnlook info -r 699 D:\SVN\test\bosse > cvs2svn > 2006-04-22 23:17:29 +0200 (lö, 22 apr 2006) > 79 > This commit was manufactured by cvs2svn to create tag > 'Rel_1-5-2-50_20060422'. > > D:\>svnlook changed -r 699 D:\SVN\test\bosse --copy-info > A + CVSMailer/tags/Rel_1-5-2-50_20060422/ > (from CVSMailer/trunk/:r698) > > But lacking the revision number when it was added I cannot find the > extra info like the date... "The date" is a revision property. What are you actually trying to achieve? There's a good chance that whatever you're trying to use svnlook for has already been implemented half a dozen times, using an existing tool might get you to your goal quite a bit faster. -- Brane
Re: How to see when an item was added using svnlook?
Branko Čibej wrote on Tue, 02 Jan 2018 09:42 +0100: > On 01.01.2018 21:28, Bo Berglund wrote: > > Is there a command to show the revision when an item (directory or > > file) was actually created in svn? > > Currently the only hack to do this is by using 'svn log --stop-on-copy' > in a working copy. Wouldn't 'svn log --stop-on-copy URL' work? There's also this (not immediately obvious) command for showing the revision that created TARGET at that location, via a copy or otherwise: svn log -r 0:HEAD -q -v --stop-on-copy --limit=1 -- TARGET
Re: Issue parsing url with '+' in it
Branko Čibej wrote on Tue, 02 Jan 2018 09:35 +0100: > On 30.12.2017 20:35, John McClean wrote: > > svn export "https://github.com/apache/avro.git/trunk/lang/c++"; > > > > Any ideas? > > Report a bug to GitHub, their Subversion protocol is a custom > implementation that AFAIK is not based on our code. Skip the middleman and export https://svn.apache.org/repos/asf/avro/trunk/lang/c++/ ?
Re: How to see when an item was added using svnlook?
On 02.01.2018 10:59, Daniel Shahaf wrote: > Branko Čibej wrote on Tue, 02 Jan 2018 09:42 +0100: >> On 01.01.2018 21:28, Bo Berglund wrote: >>> Is there a command to show the revision when an item (directory or >>> file) was actually created in svn? >> Currently the only hack to do this is by using 'svn log --stop-on-copy' >> in a working copy. > Wouldn't 'svn log --stop-on-copy URL' work? It would ... I just didn't want to confuse the issue by introducing the not-so-subtle difference between the "client" and the "working copy." > There's also this (not immediately obvious) command for showing the > revision that created TARGET at that location, via a copy or otherwise: > > svn log -r 0:HEAD -q -v --stop-on-copy --limit=1 -- TARGET Indeed, that's a better hack. -- Brane
Re: How to see when an item was added using svnlook?
On Tue, 2 Jan 2018 09:42:07 +0100, Branko ?ibej wrote: >On 01.01.2018 21:28, Bo Berglund wrote: >> I am trying to use svnlook to find the revision when a directory was >> created. I want to use this to dig out the timestamps of tags and >> branches. My svn version is 1.9.7 (both server and client). >> ... and the list continues in *trunk* for about 50 lines ... > >Yes, that is correct. You asked for the history of the item; it was >copied (branched) from trunk in r103, and svnlook is showing the whole >history. I noted this and asked if there is a way to get the revision when the directory was actually ADDED thus making it possible to extract the timestamp. I should probably have asked in the subject for the *revision* it was added and that would have given me the tool to get the other info... >> Is there a command to show the revision when an item (directory or >> file) was actually created in svn? > >Currently the only hack to do this is by using 'svn log --stop-on-copy' >in a working copy. This is not going to work on the server using svnlook then >> If I know the revision I can get additional information using svnlook: >> >> D:\>svnlook changed -r 699 D:\SVN\test\bosse --copy-info >> A + CVSMailer/tags/Rel_1-5-2-50_20060422/ >> (from CVSMailer/trunk/:r698) >> >> But lacking the revision number when it was added I cannot find the >> extra info like the date... > >"The date" is a revision property. But I am looking for a way to find the revision so this timestamp I am after can be extracted... > >What are you actually trying to achieve? Apart from the timestamp I want for other purposes I am also after the revision for a changed file when it was last changed (forgot this when posting). So I want to create a commit email including info that we are used to having in the emails we get from our earlier system. This includes a list with the following for each changed item: -Item that was changed (dir or file, available in svnlook changed) -revision it was changed (i.e. the commit revision - simple) -revision it was last changed before this commit (how to do this?) -a command to diff the new file version with the previous So my mail will contain this tabular list: Op Itemrev previous_rev diff_revs (Op is D U _U or UU from svnlook changed) All but the two last items are simple >> There's a good chance that >whatever you're trying to use svnlook for has already been implemented >half a dozen times, using an existing tool might get you to your goal >quite a bit faster. Not for me because all the hook scripts I have looked at are either too simplistic (basically pushing svnlook info and svnlook changed into the mail body) or they are written in a language I do not master... I am almost done now, only lacking a way to find the revision of the last change before the current for all file items in the list of changes. I will skip the diff-revs link for now because it relied on the ViewVc service for the CVS repository where a diff was available and I only had to calculate the url of the proper diff to put into the email. Now I first have to install and make working the ViewVc version which is able to work with svn -- Bo Berglund Developer in Sweden
Re: How to see when an item was added using svnlook?
On Tue, 02 Jan 2018 09:59:15 +, Daniel Shahaf wrote: >Branko ?ibej wrote on Tue, 02 Jan 2018 09:42 +0100: >> On 01.01.2018 21:28, Bo Berglund wrote: >> > Is there a command to show the revision when an item (directory or >> > file) was actually created in svn? >> >> Currently the only hack to do this is by using 'svn log --stop-on-copy' >> in a working copy. > >Wouldn't 'svn log --stop-on-copy URL' work? > >There's also this (not immediately obvious) command for showing the >revision that created TARGET at that location, via a copy or otherwise: > >svn log -r 0:HEAD -q -v --stop-on-copy --limit=1 -- TARGET I believe this only works in a working copy, not on the server in a hook... -- Bo Berglund Developer in Sweden
Re: How to see when an item was added using svnlook?
On Tue, Jan 2, 2018 at 1:29 PM, Bo Berglund wrote: > On Tue, 02 Jan 2018 09:59:15 +, Daniel Shahaf > wrote: > >>Branko ?ibej wrote on Tue, 02 Jan 2018 09:42 +0100: >>> On 01.01.2018 21:28, Bo Berglund wrote: >>> > Is there a command to show the revision when an item (directory or >>> > file) was actually created in svn? >>> >>> Currently the only hack to do this is by using 'svn log --stop-on-copy' >>> in a working copy. >> >>Wouldn't 'svn log --stop-on-copy URL' work? >> >>There's also this (not immediately obvious) command for showing the >>revision that created TARGET at that location, via a copy or otherwise: >> >>svn log -r 0:HEAD -q -v --stop-on-copy --limit=1 -- TARGET > > I believe this only works in a working copy, not on the server in a > hook... As Daniel suggested, this also works with a URL as target. You don't need a working copy. It's fine to run 'svn' with a URL from within a hook: svn log -r 0:HEAD -q -v --stop-on-copy --limit=1 -- $URL_TO_BRANCH Some svn admins only try to limit their hooks to svnlook, but at some point that falls short of what you need to do ('svn' is often more powerful). I see no problem using the 'svn' executable. -- Johan
Re: How to see when an item was added using svnlook?
On Tue, Jan 2, 2018 at 1:42 PM, Johan Corveleyn wrote: > On Tue, Jan 2, 2018 at 1:29 PM, Bo Berglund wrote: >> On Tue, 02 Jan 2018 09:59:15 +, Daniel Shahaf >> wrote: >> >>>Branko ?ibej wrote on Tue, 02 Jan 2018 09:42 +0100: On 01.01.2018 21:28, Bo Berglund wrote: > Is there a command to show the revision when an item (directory or > file) was actually created in svn? Currently the only hack to do this is by using 'svn log --stop-on-copy' in a working copy. >>> >>>Wouldn't 'svn log --stop-on-copy URL' work? >>> >>>There's also this (not immediately obvious) command for showing the >>>revision that created TARGET at that location, via a copy or otherwise: >>> >>>svn log -r 0:HEAD -q -v --stop-on-copy --limit=1 -- TARGET >> >> I believe this only works in a working copy, not on the server in a >> hook... > > As Daniel suggested, this also works with a URL as target. You don't > need a working copy. It's fine to run 'svn' with a URL from within a > hook: > > svn log -r 0:HEAD -q -v --stop-on-copy --limit=1 -- $URL_TO_BRANCH > > Some svn admins only try to limit their hooks to svnlook, but at some > point that falls short of what you need to do ('svn' is often more > powerful). I see no problem using the 'svn' executable. Forgot to add: an important difference, of course, is that 'svn' can only be used to inspect revisions that have already been committed (like from a post-commit hook, or from tools that run in a cron job and inspect committed revisions). If you want to inspect an uncommitted transaction, as you would do in the pre-commit hook, then you have no alternative, you have to use svnlook. -- Johan
Re: How to see when an item was added using svnlook?
On 02.01.2018 13:29, Bo Berglund wrote: > On Tue, 02 Jan 2018 09:59:15 +, Daniel Shahaf > wrote: > >> Branko ?ibej wrote on Tue, 02 Jan 2018 09:42 +0100: >>> On 01.01.2018 21:28, Bo Berglund wrote: Is there a command to show the revision when an item (directory or file) was actually created in svn? >>> Currently the only hack to do this is by using 'svn log --stop-on-copy' >>> in a working copy. >> Wouldn't 'svn log --stop-on-copy URL' work? >> >> There's also this (not immediately obvious) command for showing the >> revision that created TARGET at that location, via a copy or otherwise: >> >>svn log -r 0:HEAD -q -v --stop-on-copy --limit=1 -- TARGET > I believe this only works in a working copy, not on the server in a > hook... Yes it does work on the server in a hook if TARGET is an URL. $ svn log -r 0:HEAD -q -v --stop-on-copy --limit=1 https://svn.apache.org/repos/asf/subversion/branches/1.10.x r1817773 | julianfoad | 2017-12-11 14:22:31 +0100 (Mon, 11 Dec 2017) Changed paths: A /subversion/branches/1.10.x (from /subversion/trunk:1817772) Of course, on the server, you can use a file:// URL to avoid looping through HTTP(S). -- Brane
Re: How to see when an item was added using svnlook?
On 02.01.2018 13:27, Bo Berglund wrote: > On Tue, 2 Jan 2018 09:42:07 +0100, Branko ?ibej > wrote: > >> On 01.01.2018 21:28, Bo Berglund wrote: >>> I am trying to use svnlook to find the revision when a directory was >>> created. I want to use this to dig out the timestamps of tags and >>> branches. My svn version is 1.9.7 (both server and client). >>> ... and the list continues in *trunk* for about 50 lines ... >> Yes, that is correct. You asked for the history of the item; it was >> copied (branched) from trunk in r103, and svnlook is showing the whole >> history. > I noted this and asked if there is a way to get the revision when the > directory was actually ADDED thus making it possible to extract the > timestamp. I should probably have asked in the subject for the > *revision* it was added and that would have given me the tool to get > the other info... > >>> Is there a command to show the revision when an item (directory or >>> file) was actually created in svn? >> Currently the only hack to do this is by using 'svn log --stop-on-copy' >> in a working copy. > This is not going to work on the server using svnlook then > >>> If I know the revision I can get additional information using svnlook: >>> >>> D:\>svnlook changed -r 699 D:\SVN\test\bosse --copy-info >>> A + CVSMailer/tags/Rel_1-5-2-50_20060422/ >>> (from CVSMailer/trunk/:r698) >>> >>> But lacking the revision number when it was added I cannot find the >>> extra info like the date... >> "The date" is a revision property. > But I am looking for a way to find the revision so this timestamp I am > after can be extracted... > >> What are you actually trying to achieve? > Apart from the timestamp I want for other purposes I am also after the > revision for a changed file when it was last changed (forgot this when > posting). > So I want to create a commit email including info that we are used to > having in the emails we get from our earlier system. > This includes a list with the following for each changed item: > > -Item that was changed (dir or file, available in svnlook changed) > -revision it was changed (i.e. the commit revision - simple) > -revision it was last changed before this commit (how to do this?) > -a command to diff the new file version with the previous Oh for goodness' sake, please use an existing mailer script that already does all of that. Don't reinvent the wheel. The mailer we have in the Subversion repository shows the log message, what changed in the commit and the complete diff; you could easily adapt it for your needs. ("revision it was last changed before this commit ... I'm not sure why you need this info; you don't need it to generate the diff.) > Not for me because all the hook scripts I have looked at are either > too simplistic (basically pushing svnlook info and svnlook changed > into the mail body) or they are written in a language I do not > master... Well here I can't help you other than to suggest that "mastering" a language is not a prerequisite to customizing a script. Python isn't that hard to understand. Alternatively, you could investigate some existing freely (or not so freely) available development tools that have all this integrated. I won't post links to commercial offers on this list, but they're just one search away. -- Brane
Re: How to combine files from different svn locations into a working copy?�
On Sat, 09 Dec 2017 18:02:20 +0100, Bo Berglund wrote: >vProject > |--- src (all sources from the physical project module) > |--- bin (the binary output from the project) > |--- cmn (selected files from a "Common" project module) > |--- lib (maybe some selected binaries needed by the project) So I have found that using externals in the "normal" projects sort of solves my main problem of including library and common files into different real projects. However I have now run into a slightly different problem: When I declare the external I have not found a way to limit the depth of recursion such that only the top directory of the external gets checked out.. I use an open-source library in several projects and it contains a doc subdirectory with essentially a website of html and image files. I don't want these 77 files to be checked out as externals if I can avoid it, but limit to the 8-10 source files in the top level code directory. Can this be done using some externals flag? Or should I create a branch of the library where I only hold the top level directory (svn remove the doc dir in the branch) and use this as the external? -- Bo Berglund Developer in Sweden
Re: How to combine files from different svn locations into a working copy?§
On Tue, Jan 2, 2018 at 4:38 PM, Bo Berglund wrote: > On Sat, 09 Dec 2017 18:02:20 +0100, Bo Berglund > wrote: >>vProject >> |--- src (all sources from the physical project module) >> |--- bin (the binary output from the project) >> |--- cmn (selected files from a "Common" project module) >> |--- lib (maybe some selected binaries needed by the project) > > So I have found that using externals in the "normal" projects sort of > solves my main problem of including library and common files into > different real projects. > However I have now run into a slightly different problem: > When I declare the external I have not found a way to limit the depth > of recursion such that only the top directory of the external gets > checked out.. > > I use an open-source library in several projects and it contains a doc > subdirectory with essentially a website of html and image files. I > don't want these 77 files to be checked out as externals if I can > avoid it, but limit to the 8-10 source files in the top level code > directory. > > Can this be done using some externals flag? No, I'm afraid that's not possible at the moment. See https://issues.apache.org/jira/browse/SVN-3216. -- Johan
Re: How to combine files from different svn locations into a working copy?§
On Jan 2, 2018, at 11:31 AM, Johan Corveleyn wrote: > >> On Tue, Jan 2, 2018 at 4:38 PM, Bo Berglund wrote: >> On Sat, 09 Dec 2017 18:02:20 +0100, Bo Berglund >> wrote: >>> vProject >>> |--- src (all sources from the physical project module) >>> |--- bin (the binary output from the project) >>> |--- cmn (selected files from a "Common" project module) >>> |--- lib (maybe some selected binaries needed by the project) >> >> So I have found that using externals in the "normal" projects sort of >> solves my main problem of including library and common files into >> different real projects. >> However I have now run into a slightly different problem: >> When I declare the external I have not found a way to limit the depth >> of recursion such that only the top directory of the external gets >> checked out.. >> >> I use an open-source library in several projects and it contains a doc >> subdirectory with essentially a website of html and image files. I >> don't want these 77 files to be checked out as externals if I can >> avoid it, but limit to the 8-10 source files in the top level code >> directory. >> >> Can this be done using some externals flag? > > No, I'm afraid that's not possible at the moment. See > https://issues.apache.org/jira/browse/SVN-3216. > > -- > Johan We developed an internal library which is used by several programs. The library and the programs are all in a single repository, and each is treated as its own self-contained project, meaning they each have their own trunk/branches/tags, their own version number (not to be confused with svn revision numbers), their own release cycle, etc. We use externals to get the library sources into the working copy of the program sources, much like you describe. And we avoid pulling in docs and other non-source files: The program src directory contains a subdirectory called Externals. On this subdirectory we set the svn:externals property to get all dependencies. Each dependency ends up in its own subdirectory of Externals. To solve the same issue you're having now, which is to avoid checking out potentially a lot of unnecessary data like docs, etc., we structured the library project to keep all its sources in a src directory; so we have for example: Library Library/trunk Library/trunk/src Library/trunk/doc etc. In our externals property we fetch only that src directory, and we call the working copy, say, Library (or whatever the name of the library is): Program Program/trunk Program/trunk/Externals Program/trunk/Externals/Library Since the library you're using comes from a third party and is tracked in your repo, you should see the svn-book section on vendor drops (sorry, I don't have the link handy). Contrary to what the book suggests, I would probably keep the vendor's original distribution separate from our internal customizations, treating them like two different branches (because that's essentially what they are). The first such customization would be to move the sources into a src subdirectory, so we could external it like I described above. Perhaps others have better ideas. Not sure if others mentioned this (in fact I'm not even sure if I mentioned it) but here are a couple of additional externals-related suggestions: In the externals property, we use the caret notation '^' which tells svn that the external URL is relative to the repository root. This is because (1) they are in the same repository anyway and (2) we avoid using an absolute URL to avoid future breakage should we move the repository to a different address in the future. Furthermore even though we are generally fetching a tag (that is, a specific tagged release of our library), we use the '@' notation to fetch the tag in the specific revision where it was created. The reason for this is subtle but important: suppose someone later commits to the tag directory of the library, and suppose that in the future we check out today's revision of the program that uses that tagged version of the library; we want that future checkout to look identical to today's checkout. The '@' notation guarantees that. It also gives us the option, instead of using a tag, to use a specific trunk revision of the library without worrying that the library will change without the program devs knowing. I think that's sometimes done when they hack on both at the same time. By structuring our repo this way, the library can be developed independently without fear of rippling effects through dependent programs, and the dependent programs can choose to update to a newer version of the library when they're ready to do so. Hope this helps.
inodes usage of svn server
inodes usage of my svn server grows up quickly as repositories commits increasing. there are many reversion files in xx/db/revs/[0-9]+/[0-9]+. is there any way storing all version files into one file? or any other way to solve this problem. -- . Vanity...My favourite sin. --<>
Re: inodes usage of svn server
On Jan 2, 2018, at 9:37 PM, Keva-Slient <356730...@qq.com> wrote: > > > inodes usage of my svn server grows up quickly as repositories commits > increasing. > there are many reversion files in xx/db/revs/[0-9]+/[0-9]+. > > is there any way storing all version files into one file? or any other way > to solve this problem. See "svnadmin pack" command in svn-book. I don't have the link handy unfortunately.
Re: inodes usage of svn server
On Tue, Jan 2, 2018 at 9:37 PM, Keva-Slient <356730...@qq.com> wrote: > > inodes usage of my svn server grows up quickly as repositories commits > increasing. > there are many reversion files in xx/db/revs/[0-9]+/[0-9]+. There is "svnadmin pack", which needs to run on the Subversion repository server. > > is there any way storing all version files into one file? or any other way > to solve this problem. > > > -- > . > Vanity...My favourite sin. > --<> >
?????? inodes usage of svn server
thank you very much. that's exact what i want. -- . Vanity...My favourite sin. --<> -- -- ??: "Nico Kadel-Garcia";; : 2018??1??3??(??) 11:20 ??: "Keva-Slient"<356730...@qq.com>; : "users"; : Re: inodes usage of svn server On Tue, Jan 2, 2018 at 9:37 PM, Keva-Slient <356730...@qq.com> wrote: > > inodes usage of my svn server grows up quickly as repositories commits > increasing. > there are many reversion files in xx/db/revs/[0-9]+/[0-9]+. There is "svnadmin pack", which needs to run on the Subversion repository server. > > is there any way storing all version files into one file? or any other way > to solve this problem. > > > -- > . > Vanity...My favourite sin. > --<> >
Re: inodes usage of svn server
thank you very much. that's what i want -- . Vanity...My favourite sin. --<> -- Original -- From: "Nathan Hartman";; Date: Wed, Jan 3, 2018 11:08 AM To: "users"; Cc: "Keva-Slient"<356730...@qq.com>; Subject: Re: inodes usage of svn server On Jan 2, 2018, at 9:37 PM, Keva-Slient <356730...@qq.com> wrote: > > > inodes usage of my svn server grows up quickly as repositories commits > increasing. > there are many reversion files in xx/db/revs/[0-9]+/[0-9]+. > > is there any way storing all version files into one file? or any other way > to solve this problem. See "svnadmin pack" command in svn-book. I don't have the link handy unfortunately.
Re: inodes usage of svn server
On Tue, 2 Jan 2018 22:20:13 -0500, Nico Kadel-Garcia wrote: >On Tue, Jan 2, 2018 at 9:37 PM, Keva-Slient <356730...@qq.com> wrote: >> >> inodes usage of my svn server grows up quickly as repositories commits >> increasing. >> there are many reversion files in xx/db/revs/[0-9]+/[0-9]+. > >There is "svnadmin pack", which needs to run on the Subversion >repository server. > Is this a one-time cleanup operation or does it need to be executed regularly? I.e. does running "svnadmin pack" on the repo consolidate the many files into a smaller number of big files and set some repository property such that it will work that way in the future? This is what I found in svnbook 1.7 page 178: "By concatenating all the files of a completed shard into a single pack file and then removing the original per-revision files, svnadmin pack reduces the file count within a given shard down to just a single file." and "Repacking packed shards is legal, but will have no effect on the disk usage of the repository." What exactly is a "shard"? Is it one of the numerical directories each containing exactly 1000 files? If so the "shard" storage on my repos seem to only cost at most 4% extra disk space compared to using a single file (comparing file sizes against disk usage). Or will compression of the "svnadmin pack" operation make the combined size of the files even smaller? I.e. it does not only save unused file allocation space but actually packs the content even better? -- Bo Berglund Developer in Sweden