SVN__StatusCommand.st
author Claus Gittinger <cg@exept.de>
Tue, 16 Jan 2018 22:26:58 +0100
changeset 1183 8af078552bae
parent 904 b4bd6c1c11fd
permissions -rw-r--r--
flyByHelpSpec -> helpSpec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
742
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
     1
"
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
     2
 Copyright (c) 2007-2010 Jan Vrany
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
     3
 Copyright (c) 2009-2010 eXept Software AG
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
     4
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
     5
 Permission is hereby granted, free of charge, to any person
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
     6
 obtaining a copy of this software and associated documentation
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
     7
 files (the 'Software'), to deal in the Software without
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
     8
 restriction, including without limitation the rights to use,
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
     9
 copy, modify, merge, publish, distribute, sublicense, and/or sell
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    10
 copies of the Software, and to permit persons to whom the
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    11
 Software is furnished to do so, subject to the following
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    12
 conditions:
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    13
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    14
 The above copyright notice and this permission notice shall be
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    15
 included in all copies or substantial portions of the Software.
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    16
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    17
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    18
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    19
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    20
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    21
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    22
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    23
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    24
 OTHER DEALINGS IN THE SOFTWARE.
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    25
"
477
76a616efa545 *** empty log message ***
fm
parents: 283
diff changeset
    26
"{ Package: 'stx:libsvn' }"
39
e8b70684885f initial checkin
fm
parents:
diff changeset
    27
e8b70684885f initial checkin
fm
parents:
diff changeset
    28
"{ NameSpace: SVN }"
e8b70684885f initial checkin
fm
parents:
diff changeset
    29
492
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
    30
WCPathCommand subclass:#StatusCommand
39
e8b70684885f initial checkin
fm
parents:
diff changeset
    31
	instanceVariableNames:''
e8b70684885f initial checkin
fm
parents:
diff changeset
    32
	classVariableNames:''
e8b70684885f initial checkin
fm
parents:
diff changeset
    33
	poolDictionaries:''
e8b70684885f initial checkin
fm
parents:
diff changeset
    34
	category:'SVN-Private-Commands'
e8b70684885f initial checkin
fm
parents:
diff changeset
    35
!
e8b70684885f initial checkin
fm
parents:
diff changeset
    36
742
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    37
!StatusCommand class methodsFor:'documentation'!
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    38
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    39
copyright
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    40
"
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    41
 Copyright (c) 2007-2010 Jan Vrany
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    42
 Copyright (c) 2009-2010 eXept Software AG
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    43
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    44
 Permission is hereby granted, free of charge, to any person
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    45
 obtaining a copy of this software and associated documentation
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    46
 files (the 'Software'), to deal in the Software without
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    47
 restriction, including without limitation the rights to use,
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    48
 copy, modify, merge, publish, distribute, sublicense, and/or sell
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    49
 copies of the Software, and to permit persons to whom the
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    50
 Software is furnished to do so, subject to the following
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    51
 conditions:
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    52
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    53
 The above copyright notice and this permission notice shall be
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    54
 included in all copies or substantial portions of the Software.
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    55
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    56
 THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    57
 EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    58
 OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    59
 NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    60
 HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    61
 WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    62
 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    63
 OTHER DEALINGS IN THE SOFTWARE.
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    64
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    65
"
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    66
! !
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    67
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    68
!StatusCommand class methodsFor:'others'!
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    69
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    70
version_CVS
904
b4bd6c1c11fd checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 742
diff changeset
    71
    ^ '$Header$'
742
4843e1571574 Updates from SVN
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 492
diff changeset
    72
! !
39
e8b70684885f initial checkin
fm
parents:
diff changeset
    73
e8b70684885f initial checkin
fm
parents:
diff changeset
    74
!StatusCommand methodsFor:'executing - private'!
e8b70684885f initial checkin
fm
parents:
diff changeset
    75
e8b70684885f initial checkin
fm
parents:
diff changeset
    76
svnCmd
e8b70684885f initial checkin
fm
parents:
diff changeset
    77
    "raise an error: must be redefined in concrete subclass(es)"
e8b70684885f initial checkin
fm
parents:
diff changeset
    78
e8b70684885f initial checkin
fm
parents:
diff changeset
    79
    ^'status'
e8b70684885f initial checkin
fm
parents:
diff changeset
    80
e8b70684885f initial checkin
fm
parents:
diff changeset
    81
    "Created: / 15-03-2008 / 21:56:01 / janfrog"
e8b70684885f initial checkin
fm
parents:
diff changeset
    82
!
e8b70684885f initial checkin
fm
parents:
diff changeset
    83
492
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
    84
svnCmdArgumentsOn:arg
39
e8b70684885f initial checkin
fm
parents:
diff changeset
    85
    "raise an error: must be redefined in concrete subclass(es)"
e8b70684885f initial checkin
fm
parents:
diff changeset
    86
492
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
    87
    arg
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
    88
	nextPut:'--xml';
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
    89
	nextPut:'--verbose'
39
e8b70684885f initial checkin
fm
parents:
diff changeset
    90
e8b70684885f initial checkin
fm
parents:
diff changeset
    91
    "Created: / 15-03-2008 / 21:56:01 / janfrog"
e8b70684885f initial checkin
fm
parents:
diff changeset
    92
!
e8b70684885f initial checkin
fm
parents:
diff changeset
    93
e8b70684885f initial checkin
fm
parents:
diff changeset
    94
svnParseXML: doc
e8b70684885f initial checkin
fm
parents:
diff changeset
    95
e8b70684885f initial checkin
fm
parents:
diff changeset
    96
    ^((doc root childNodes anyOne childNodes
492
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
    97
	collect:
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
    98
	    [:entryNode|
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
    99
	    (WCEntry readFromXml: entryNode) wc: workingCopy; yourself]) asSortedCollection:[:a :b|a path < b path])
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
   100
	    asOrderedCollection
39
e8b70684885f initial checkin
fm
parents:
diff changeset
   101
e8b70684885f initial checkin
fm
parents:
diff changeset
   102
    "Created: / 15-03-2008 / 22:05:01 / janfrog"
e8b70684885f initial checkin
fm
parents:
diff changeset
   103
    "Modified: / 16-03-2008 / 08:44:49 / janfrog"
e8b70684885f initial checkin
fm
parents:
diff changeset
   104
    "Modified: / 18-08-2009 / 14:28:44 / Jan Vrany <vranyj1@fel.cvut.cz>"
e8b70684885f initial checkin
fm
parents:
diff changeset
   105
    "Modified: / 27-08-2009 / 09:51:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
e8b70684885f initial checkin
fm
parents:
diff changeset
   106
!
e8b70684885f initial checkin
fm
parents:
diff changeset
   107
492
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
   108
svnProcessCommandOutput:out err:err
39
e8b70684885f initial checkin
fm
parents:
diff changeset
   109
    ^ self svnParseXML:((XML::XMLParser on:out)
492
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
   110
		validate:false;
74ff0960961c *** empty log message ***
fm
parents: 477
diff changeset
   111
		scanDocument)
39
e8b70684885f initial checkin
fm
parents:
diff changeset
   112
e8b70684885f initial checkin
fm
parents:
diff changeset
   113
    "Created: / 03-10-2008 / 16:31:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
e8b70684885f initial checkin
fm
parents:
diff changeset
   114
! !
e8b70684885f initial checkin
fm
parents:
diff changeset
   115
e8b70684885f initial checkin
fm
parents:
diff changeset
   116
!StatusCommand class methodsFor:'documentation'!
e8b70684885f initial checkin
fm
parents:
diff changeset
   117
e8b70684885f initial checkin
fm
parents:
diff changeset
   118
version
904
b4bd6c1c11fd checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 742
diff changeset
   119
    ^ '$Header$'
227
7c77e2b80467 changed: #version_SVN
fm
parents: 39
diff changeset
   120
!
7c77e2b80467 changed: #version_SVN
fm
parents: 39
diff changeset
   121
7c77e2b80467 changed: #version_SVN
fm
parents: 39
diff changeset
   122
version_SVN
904
b4bd6c1c11fd checkin to get version methods correct
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 742
diff changeset
   123
    ^ '§Id: SVN__StatusCommand.st 372 2011-09-29 10:47:58Z vranyj1 §'
39
e8b70684885f initial checkin
fm
parents:
diff changeset
   124
! !