[svnbook commit] r1749 - in trunk/src/ru: . book

dmitriy svnbook-dev at red-bean.com
Sun Oct 23 03:45:25 CDT 2005


Author: dmitriy
Date: Sun Oct 23 03:45:23 2005
New Revision: 1749

Modified:
   trunk/src/ru/book/appa.xml   (props changed)
   trunk/src/ru/book/appb.xml   (props changed)
   trunk/src/ru/book/appc.xml   (props changed)
   trunk/src/ru/book/book.xml   (props changed)
   trunk/src/ru/book/ch00.xml   (contents, props changed)
   trunk/src/ru/book/ch01.xml   (contents, props changed)
   trunk/src/ru/book/ch02.xml   (contents, props changed)
   trunk/src/ru/book/ch03.xml   (props changed)
   trunk/src/ru/book/ch04.xml   (props changed)
   trunk/src/ru/book/ch05.xml   (props changed)
   trunk/src/ru/book/ch06.xml   (props changed)
   trunk/src/ru/book/ch07.xml   (contents, props changed)
   trunk/src/ru/book/ch08.xml   (props changed)
   trunk/src/ru/book/copyright.xml   (props changed)
   trunk/src/ru/book/foreword.xml   (props changed)
   trunk/src/ru/book/styles.css   (props changed)
   trunk/src/ru/sync.py
Log:
* ru/sync.py: added new command line switches and capability to sync multiple files
  at once. More information in help output

* ru/[all-book-files]: sync with en/

Modified: trunk/src/ru/book/ch00.xml
==============================================================================
--- trunk/src/ru/book/ch00.xml	(original)
+++ trunk/src/ru/book/ch00.xml	Sun Oct 23 03:45:23 2005
@@ -713,26 +713,7 @@
 
         <!-- @ENGLISH {{{
         <varlistentry>
-          <term>Appendix B, <emphasis>Troubleshooting</emphasis></term>
-          <listitem>
-            <para>Addresses common problems and difficulties using and
-              building Subversion.</para>
-          </listitem>
-        </varlistentry>
-        @ENGLISH }}} -->
-        <varlistentry>
-          <term>Приложение B. <emphasis>Поиск и устранение
-              неисправностей</emphasis>.</term>
-          <listitem>
-            <para>В приложении рассматриваются основные проблемы и
-              трудности, возникающие при установке и использовании
-              Subversion.</para>
-          </listitem>
-        </varlistentry>
-
-        <!-- @ENGLISH {{{
-        <varlistentry>
-          <term>Appendix C, <emphasis>WebDAV and
+          <term>Appendix B, <emphasis>WebDAV and
             Autoversioning</emphasis></term>
           <listitem>
             <para>Describes the details of WebDAV and DeltaV, and how
@@ -742,7 +723,7 @@
         </varlistentry>
         @ENGLISH }}} -->
         <varlistentry>
-          <term>Приложение C. <emphasis>WebDAV и автоматическое управление
+          <term>Приложение B. <emphasis>WebDAV и автоматическое управление
               версиями</emphasis>.</term>
           <listitem>
             <para>Это приложение подробно рассматривает WebDAV и DeltaV
@@ -754,7 +735,7 @@
 
         <!-- @ENGLISH {{{
         <varlistentry>
-          <term>Appendix D, <emphasis>Third Party Tools</emphasis></term>
+          <term>Appendix C, <emphasis>Third Party Tools</emphasis></term>
           <listitem>
             <para>Discusses tools that support or use Subversion,
               including alternative client programs, repository
@@ -763,7 +744,7 @@
         </varlistentry>
         @ENGLISH }}} -->
         <varlistentry>
-          <term>Приложение D. <emphasis>Инструменты от сторонних
+          <term>Приложение C. <emphasis>Инструменты от сторонних
               разработчиков</emphasis>.</term>
           <listitem>
             <para>Здесь представлены некоторые программы, которые

Modified: trunk/src/ru/book/ch01.xml
==============================================================================
--- trunk/src/ru/book/ch01.xml	(original)
+++ trunk/src/ru/book/ch01.xml	Sun Oct 23 03:45:23 2005
@@ -142,26 +142,34 @@
     <para>In early 2000, CollabNet, Inc. (<systemitem
       class="url">http://www.collab.net</systemitem>) began seeking
       developers to write a replacement for CVS.  CollabNet offers a
-      collaboration software suite called SourceCast, of which one
-      component is version control.  Although SourceCast used CVS as
-      its initial version control system, CVS's limitations were
-      obvious from the beginning, and CollabNet knew it would
-      eventually have to find something better.  Unfortunately, CVS
-      had become the <foreignphrase>de facto</foreignphrase> standard
-      in the open source world largely because there
-      <emphasis>wasn't</emphasis> anything better, at least not under
-      a free license.  So CollabNet determined to write a new version
-      control system from scratch, retaining the basic ideas of CVS,
-      but without the bugs and misfeatures.</para>
+      collaboration software suite called CollabNet Enterprise
+      Edition (CEE)
+      <footnote>
+        <para>There's also a CollabNet Team Edition (CTE)
+          offering aimed at smaller groups.</para>
+      </footnote>
+      of which one component is version control.  Although
+      CEE used CVS as its initial version control system, CVS's
+      limitations were obvious from the beginning, and CollabNet knew
+      it would eventually have to find something better.
+      Unfortunately, CVS had become the <foreignphrase>de
+      facto</foreignphrase> standard in the open source world largely
+      because there <emphasis>wasn't</emphasis> anything better, at
+      least not under a free license.  So CollabNet determined to
+      write a new version control system from scratch, retaining the
+      basic ideas of CVS, but without the bugs and misfeatures.</para>
     @ENGLISH }}} -->
     <para>В начале 2000 года компания CollabNet, Inc. (<systemitem
         class="url">http://www.collab.net</systemitem>) решила начать
       разработку программного обеспечения, призванного прийти на смену
       CVS, и стала искать людей, способных решить эту задачу. CollabNet
       предлагает комплекс программных средств для совместной работы,
-      известный под названием SourceCast, одним из компонентов которого
+      известный под названием CollabNet Enterprise Edition (CEE)
+      <footnote><para>Кроме того, еще существует CollabNet Enterprise
+      Edition, предназначенный главным образом для небольших групп
+      разработчиков.</para></footnote>, одним из компонентов которого
       является средство для управления версиями. В качестве такого
-      средства в SourceCast использовалась CVS, хотя её недостатки были
+      средства в CEE использовалась CVS, хотя её недостатки были
       очевидны с самого начала, и для CollabNet было ясно, что рано или
       поздно придётся искать замену. К сожалению, CVS стала стандартом
       <foreignphrase>де-факто</foreignphrase> в мире программного

Modified: trunk/src/ru/book/ch02.xml
==============================================================================
--- trunk/src/ru/book/ch02.xml	(original)
+++ trunk/src/ru/book/ch02.xml	Sun Oct 23 03:45:23 2005
@@ -1353,9 +1353,11 @@
           users would expect the working copy to be entirely at
           revision 15, but that's not the case!  Any number of changes
           might have happened in the repository between revisions 10
-          and 15.  It would be a lie to claim that we had a working
-          copy of revision 15, the client simply doesn't know.  If, on
-          the other hand, <command>svn commit</command> were to
+          and 15.  The client knows nothing of those changes in the
+          repository, since you haven't yet run <command>svn
+          update</command>, and <command>svn commit</command> doesn't
+          pull down new changes.  If, on the other hand,
+          <command>svn commit</command> <emphasis>were</emphasis> to
           automatically download the newest changes, then it would be
           possible to set the entire working copy to revision
           15—but then we'd be breaking the fundamental rule
@@ -1373,14 +1375,15 @@
           после чего выполняется команда <command>svn commit</command>,
           которая создает в хранилище правку 15. После выполнения
           фиксации большинство новых пользователей ожидают, что вся
-          рабочая копия будет иметь правку 15, однако это не тот случай.
+          рабочая копия будет иметь правку 15, однако это не так.
           Между правками 10 и 15 в хранилище могло быть внесено любое
-          количество изменений. Клиент этого просто не знает и будет
-          неправдой заявить, что рабочая копия будет иметь правку 15.
-          С другой стороны, если <command>svn commit</command> будет
-          автоматически загружать последние изменения, то тогда для
-          всей рабочей копии можно назначить соответствие правки 15
-          — но тем самым нарушится фундаментальное правило,
+	  количество изменений. Так как не выполнялась команда
+	  <command>svn update</command>, а <command>svn commit</command>
+	  не загружает изменений, клиент ничего не знает о находящихся в
+          хранилище изменениях. С другой стороны, если <command>svn
+	  commit</command> будет автоматически загружать последние изменения,
+          то в этом случае, для всей рабочей копии можно назначить соответствие
+          правке 15 — однако нарушится фундаментальное правило,
           согласно которому <quote>выталкивание</quote> и
           <quote>затаскивание</quote> являются независимыми операциями.
           Следовательно, все, что может сделать Subversion клиент, это

Modified: trunk/src/ru/book/ch07.xml
==============================================================================
--- trunk/src/ru/book/ch07.xml	(original)
+++ trunk/src/ru/book/ch07.xml	Sun Oct 23 03:45:23 2005
@@ -1321,7 +1321,7 @@
       <para>How (and if) you use Subversion properties is up to you.
         As we mentioned, Subversion has it own uses for properties,
         which we'll discuss a little later in this chapter.  But
-        first, let's discuss how to manipulate options using the
+        first, let's discuss how to manipulate properties using the
         <command>svn</command> program.</para>
       @ENGLISH }}} -->
       <para>Представим эту же ситуацию при использовании Subversion-свойств

Modified: trunk/src/ru/sync.py
==============================================================================
--- trunk/src/ru/sync.py	(original)
+++ trunk/src/ru/sync.py	Sun Oct 23 03:45:23 2005
@@ -11,11 +11,14 @@
   stream = err_msg and sys.stderr or sys.stdout
   if err_msg:
     stream.write("ERROR: %s\n\n" % (err_msg))
-  stream.write("""Usage: %s [-f <filename>] [-l]
+  stream.write("""Usage: %s [-a] [-l] [-f <filename(s)>] [--dry-run]
 
 Options:
-    -f:    File which needs to be synchronized
-    -l:    List all files and revisions with which they are sinchronized
+    -a:  Synchronizing all files
+    -f:  File which needs to be synchronized
+    -l:  List all files and revisions with which they are sinchronized
+    
+    --dry-run:  Execute a command, but don't make actual changes
 """ % (os.path.basename(sys.argv[0])))
   sys.exit(err_msg and 1 or 0)
 
@@ -92,34 +95,49 @@
   global bfiles
   if len(sys.argv) < 2:
     usage(None)
-  os.chdir('book')
   try:
-    opts, args = getopt.getopt(sys.argv[1:], "f:l")
+    os.chdir('book')
+  except:
+    pass
+  try:
+    opts, args = getopt.getopt(sys.argv[1:], 'af:l', ['dry-run'])
   except:
     usage('Invalid syntax')
-  fname = ''
+  sync_list = []
+  dry_run = False
   for o, a in opts:
-    if o == '-f':
-      a = os.path.basename(a)
-      if a in bfiles:
-        fname = a
-      else:
-        usage('Invalid syntax')
+    if o == '-a':
+      sync_list = bfiles
+    elif o == '-f':
+      for f in a.split(','):
+        f = os.path.basename(f)
+        if f in bfiles:
+          sync_list.append(f)
+        else:
+          usage('Invalid syntax')
     elif o == '-l':
       return get_list()
+    elif o == '--dry-run':
+      dry_run = True
   cmd = string.Template('svn $a -r $r1:$r2 https://svn.red-bean.com/svnbook/trunk/src/en/book/$t')
-  last = get_last(fname)
-  base = get_base(fname)
-  print ('########################################################################')
-  print 'Sync r%(r1)s:r%(r2)s' % { 'r1' :  last, 'r2' : base }
-  diff = os.popen(cmd.substitute(a='diff', r1=last, r2=base, t=fname)).read()
-  if len(diff) != 0:
-    os.system(cmd.substitute(a='log', r1=last, r2=base, t=fname))
-#    raw_input('Above is log message, to see diff press ENTER')
-#    print diff
-    f = file('../'+fname+'.diff', 'w'); f.write(diff); f.close()
-    os.system(cmd.substitute(a='merge', r1=last, r2=base, t=fname))
-  set_last(fname, str(base))
+  for fname in sync_list:
+    last = get_last(fname)
+    base = get_base(fname)
+    print ('########################################################################')
+    print 'Sync r%s:r%s of %s' % (last, base, fname)
+    diff = os.popen(cmd.substitute(a='diff', r1=last, r2=base, t=fname)).read()
+    if len(diff) != 0:
+      os.system(cmd.substitute(a='log', r1=last, r2=base, t=fname))
+      f = file('../'+fname+'.diff', 'w'); f.write(diff); f.close()
+      if not dry_run:
+        os.system(cmd.substitute(a='merge', r1=last, r2=base, t=fname))
+    if not dry_run:
+      set_last(fname, str(base))
 
 if __name__ == "__main__":
   main()
+
+"""
+ vim: tabstop=2 shiftwidth=2 expandtab smarttab
+"""
+



More information about the svnbook-dev mailing list