SVN__UpdateLikeCommand.st
changeset 679 450507ce7790
parent 411 96f9a0d08a96
child 906 206a0f5cb6c9
equal deleted inserted replaced
678:b63530301573 679:450507ce7790
       
     1 "
       
     2  Copyright (c) 2007-2010 Jan Vrany
       
     3  Copyright (c) 2009-2010 eXept Software AG
       
     4 
       
     5  Permission is hereby granted, free of charge, to any person
       
     6  obtaining a copy of this software and associated documentation
       
     7  files (the 'Software'), to deal in the Software without
       
     8  restriction, including without limitation the rights to use,
       
     9  copy, modify, merge, publish, distribute, sublicense, and/or sell
       
    10  copies of the Software, and to permit persons to whom the
       
    11  Software is furnished to do so, subject to the following
       
    12  conditions:
       
    13 
       
    14  The above copyright notice and this permission notice shall be
       
    15  included in all copies or substantial portions of the Software.
       
    16 
       
    17  THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
       
    18  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
       
    19  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
       
    20  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
       
    21  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
       
    22  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
       
    23  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
       
    24  OTHER DEALINGS IN THE SOFTWARE.
       
    25 "
     1 "{ Package: 'stx:libsvn' }"
    26 "{ Package: 'stx:libsvn' }"
     2 
    27 
     3 "{ NameSpace: SVN }"
    28 "{ NameSpace: SVN }"
     4 
    29 
     5 BranchCommand subclass:#UpdateLikeCommand
    30 BranchCommand subclass:#UpdateLikeCommand
     6 	instanceVariableNames:'workingCopy'
    31 	instanceVariableNames:'workingCopy depth'
     7 	classVariableNames:''
    32 	classVariableNames:''
     8 	poolDictionaries:''
    33 	poolDictionaries:''
     9 	category:'SVN-Private-Commands'
    34 	category:'SVN-Private-Commands'
    10 !
    35 !
    11 
    36 
       
    37 !UpdateLikeCommand class methodsFor:'documentation'!
       
    38 
       
    39 copyright
       
    40 "
       
    41  Copyright (c) 2007-2010 Jan Vrany
       
    42  Copyright (c) 2009-2010 eXept Software AG
       
    43 
       
    44  Permission is hereby granted, free of charge, to any person
       
    45  obtaining a copy of this software and associated documentation
       
    46  files (the 'Software'), to deal in the Software without
       
    47  restriction, including without limitation the rights to use,
       
    48  copy, modify, merge, publish, distribute, sublicense, and/or sell
       
    49  copies of the Software, and to permit persons to whom the
       
    50  Software is furnished to do so, subject to the following
       
    51  conditions:
       
    52 
       
    53  The above copyright notice and this permission notice shall be
       
    54  included in all copies or substantial portions of the Software.
       
    55 
       
    56  THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
       
    57  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
       
    58  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
       
    59  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
       
    60  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
       
    61  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
       
    62  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
       
    63  OTHER DEALINGS IN THE SOFTWARE.
       
    64 
       
    65 "
       
    66 ! !
       
    67 
       
    68 !UpdateLikeCommand class methodsFor:'others'!
       
    69 
       
    70 version_CVS
       
    71     ^ '$ÂHeader: /cvs/stx/stx/libsvn/SVN__UpdateLikeCommand.st,v 1.4 2009/10/19 12:22:25 fm Exp Â$'
       
    72 ! !
    12 
    73 
    13 !UpdateLikeCommand methodsFor:'accessing'!
    74 !UpdateLikeCommand methodsFor:'accessing'!
       
    75 
       
    76 depth:aString
       
    77 
       
    78     self assert: 
       
    79         (#('empty' 'files' 'immediates' 'infinity') includes: aString).
       
    80     
       
    81     depth := aString.
       
    82 
       
    83     "Modified: / 23-04-2011 / 18:50:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
       
    84 !
    14 
    85 
    15 workingCopy
    86 workingCopy
    16     ^ workingCopy
    87     ^ workingCopy
    17 
    88 
    18     "Created: / 19-03-2008 / 12:44:24 / janfrog"
    89     "Created: / 19-03-2008 / 12:44:24 / janfrog"
    58 
   129 
    59 svnCmdArgumentsOn:arg 
   130 svnCmdArgumentsOn:arg 
    60     "raise an error: must be redefined in concrete subclass(es)"
   131     "raise an error: must be redefined in concrete subclass(es)"
    61 
   132 
    62     arg
   133     arg
    63         nextPut: '-r'; nextPut: self revision printString
   134         nextPut: '-r'; nextPut: self revision printString.
       
   135     arg
       
   136         nextPut: '--depth'; nextPut: depth ? 'infinity'.
    64 
   137 
    65     "Created: / 16-03-2008 / 10:00:34 / janfrog"
   138     "Created: / 16-03-2008 / 10:00:34 / janfrog"
       
   139     "Modified: / 23-04-2011 / 18:48:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    66 !
   140 !
    67 
   141 
    68 svnCmdWorkdir
   142 svnCmdWorkdir
    69 
   143 
    70     ^workingCopy path pathName
   144     ^workingCopy path pathName
    71 
   145 
    72     "Created: / 19-03-2008 / 12:43:21 / janfrog"
   146     "Created: / 19-03-2008 / 12:43:21 / janfrog"
    73     "Modified: / 19-08-2009 / 12:47:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
   147     "Modified: / 19-08-2009 / 12:47:54 / Jan Vrany <vranyj1@fel.cvut.cz>"
    74 !
   148 !
    75 
   149 
    76 svnProcessCommandOutput: arg1 err: arg2 
   150 svnProcessCommandOutput: stdout err: stderr 
    77     "Superclass says that I am responsible to implement this method"
   151     "Superclass says that I am responsible to implement this method"
    78     
   152 
    79     ^ arg1 contents asStringCollection asArray allButLast 
   153     | notifications |
    80         collect: [:line | (WCActionNotification readFromString: line) wc: workingCopy; yourself ].
   154     notifications := OrderedCollection new: 8.
       
   155     stdout contents asStringCollection do:
       
   156         [:line|
       
   157         line isEmpty ifFalse:[
       
   158             (line startsWith:'Summary of conflicts')       
       
   159                 ifTrue:[^notifications].
       
   160             ((line startsWith:'--- Merging') or:[line startsWith:'Fetching external item into'])
       
   161                 ifFalse:[notifications add: ((WCActionNotification readFromString: line) wc: workingCopy; yourself)]]].
       
   162     ^notifications.
    81 
   163 
    82     "Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
   164     "Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
    83     "Modified: / 18-08-2009 / 14:38:55 / Jan Vrany <vranyj1@fel.cvut.cz>"
   165     "Modified: / 18-08-2009 / 14:38:55 / Jan Vrany <vranyj1@fel.cvut.cz>"
    84     "Modified: / 27-08-2009 / 09:51:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
   166     "Modified: / 09-04-2010 / 14:12:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
    85 ! !
   167 ! !
    86 
   168 
    87 !UpdateLikeCommand class methodsFor:'documentation'!
   169 !UpdateLikeCommand class methodsFor:'documentation'!
    88 
   170 
    89 version
   171 version
    90     ^ '$Header$'
   172     ^ '$Id$'
    91 !
       
    92 
       
    93 version_CVS
       
    94     ^ '$Header$'
       
    95 !
   173 !
    96 
   174 
    97 version_SVN
   175 version_SVN
    98     ^'§Id: SVN__UpdateLikeCommand.st 113 2009-08-28 11:43:01Z vranyj1 §'
   176     ^ '§Id: SVN__UpdateLikeCommand.st 350 2011-07-07 18:42:56Z vranyj1 §'
    99 ! !
   177 ! !