[SvnBook] #60: Make svndumpfilter example commandlines work for both Unix and Windows
SvnBook
noreply at red-bean.com
Fri Aug 10 21:03:14 CDT 2007
#60: Make svndumpfilter example commandlines work for both Unix and Windows
-------------------------+--------------------------------------------------
Reporter: cmpilato | Owner: cmpilato
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: content | Version:
Keywords: |
-------------------------+--------------------------------------------------
Ryan Schmidt <subversion-2007a at ryandesign.com> wrote:
> Dear Subversion Booklers!
>
> In this thread on the Subversion Users mailing list...
>
> http://svn.haxx.se/users/archive-2007-03/1330.shtml
>
> ...someone noticed that the example in the book for using svndumpfilter
> does not work as written on Windows, because the example uses the "cat"
> command, which does not exist on Windows. While the Windows equivalent
> to "cat" would be "type", one can simply use input redirection to give a
> syntax that works just as well on Windows as it does on Unix.
>
> I recognize that other parts of the book still use "cat", or possibly
> other syntax that doesn't work on Windows, and imagine that it probably
> says somewhere in the book's introduction that syntax given is for Unix.
> However, not everyone will read the book's introduction, especially when
> being referred to a specific page by someone on the mailing list. And
> since at least in this case it's possible to give syntax that works on
> both Windows and Unix, I recommend doing so.
>
> The attached patch should take care of it. I made it by searching all
> .xml files for the regular expression "cat repos-dumpfile \|
> (svndumpfilter include [a-z]+) > ([a-z]+-dumpfile?)" and replacing
> with "\1 \< repos-dumpfile \> \2".
----
{{{
Index: src/en/book/ch05-repository-admin.xml
===================================================================
--- src/en/book/ch05-repository-admin.xml (revision 2755)
+++ src/en/book/ch05-repository-admin.xml (working copy)
@@ -2155,11 +2155,11 @@
resulting in three new dump files:</para>
<screen>
-$ cat repos-dumpfile | svndumpfilter include calc > calc-dumpfile
+$ svndumpfilter include calc < repos-dumpfile > calc-dumpfile
…
-$ cat repos-dumpfile | svndumpfilter include calendar > cal-dumpfile
+$ svndumpfilter include calendar < repos-dumpfile > cal-dumpfile
…
-$ cat repos-dumpfile | svndumpfilter include spreadsheet > ss-dumpfile
+$ svndumpfilter include spreadsheet < repos-dumpfile > ss-dumpfile
…
$
</screen>
}}}
--
Ticket URL: <http://svnbook.red-bean.com/trac/ticket/60>
SvnBook <http://svnbook.red-bean.com/>
More information about the svnbook-dev
mailing list