mercurial/HGWorkingCopyFile.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Sun, 03 Mar 2013 23:58:51 +0000
branchhg-command-server-support
changeset 235 3d8ef499d7d9
parent 234 a9ef61b902ae
child 261 14855fd7632d
permissions -rw-r--r--
Command server is now used by default. All HGTests exept 2 passes. Further invesitgation on those two is required.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
     1
"
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
     2
 COPYRIGHT (c) 2012-2013 by Jan Vrany
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
     3
              All Rights Reserved
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
     4
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
     5
 This software is furnished under a license and may be used
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
     6
 only in accordance with the terms of that license and with the
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
     8
 be provided or otherwise made available to, or used by, any
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
     9
 other person.  No title to or ownership of the software is
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    10
 hereby transferred.
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    11
"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    12
"{ Package: 'stx:libscm/mercurial' }"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    13
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    14
Object subclass:#HGWorkingCopyFile
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
    15
	instanceVariableNames:'wc children filename revisions'
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    16
	classVariableNames:''
63
77b0d42eebd0 Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 61
diff changeset
    17
	poolDictionaries:''
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    18
	category:'SCM-Mercurial-Core'
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    19
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    20
190
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    21
Object subclass:#LazyRevision
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    22
	instanceVariableNames:'collection index changeset wc path'
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    23
	classVariableNames:''
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    24
	poolDictionaries:''
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    25
	privateIn:HGWorkingCopyFile
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    26
!
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
    27
69
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    28
!HGWorkingCopyFile class methodsFor:'documentation'!
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    29
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    30
copyright
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    31
"
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    32
 COPYRIGHT (c) 2012-2013 by Jan Vrany
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    33
              All Rights Reserved
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    34
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    35
 This software is furnished under a license and may be used
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    36
 only in accordance with the terms of that license and with the
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    37
 inclusion of the above copyright notice.   This software may not
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    38
 be provided or otherwise made available to, or used by, any
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    39
 other person.  No title to or ownership of the software is
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    40
 hereby transferred.
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    41
"
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    42
!
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 190
diff changeset
    43
69
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    44
documentation
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    45
"
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    46
    A representation on a file in working copy. It behaves just like 
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    47
    ordinary filename but also provides methods for quering it's
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    48
    state (added/removed/modified...), access to previous versions
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    49
    and so on.
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    50
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    51
    [author:]
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    52
        Jan Vrany <jan.vrany@fit.cvut.cz>
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    53
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    54
    [instance variables:]
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    55
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    56
    [class variables:]
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    57
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    58
    [see also:]
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    59
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    60
"
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 67
diff changeset
    61
! !
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    62
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    63
!HGWorkingCopyFile class methodsFor:'instance creation'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    64
63
77b0d42eebd0 Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 61
diff changeset
    65
wc: aHGWorkingCopy path: aStringOrFilename
77b0d42eebd0 Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 61
diff changeset
    66
    ^self new setWorkingCopy: aHGWorkingCopy path: aStringOrFilename
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    67
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    68
    "Created: / 24-09-2012 / 13:52:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    69
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    70
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    71
!HGWorkingCopyFile methodsFor:'accessing'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    72
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
    73
changeset
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
    74
    ^wc changeset
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
    75
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
    76
    "Created: / 05-12-2012 / 19:23:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
    77
!
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
    78
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    79
pathName
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    80
    ^filename pathName
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    81
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    82
    "Created: / 12-11-2012 / 22:43:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    83
!
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    84
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    85
pathNameRelative
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    86
    ^self == wc root
67
985488894699 HGCommitDialog: nicer icons, fix for file list
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
    87
        ifTrue:['']
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    88
        ifFalse:[filename pathName copyFrom: (wc root pathName size + 2)]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    89
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    90
    "Created: / 25-09-2012 / 00:28:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
67
985488894699 HGCommitDialog: nicer icons, fix for file list
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
    91
    "Modified: / 16-11-2012 / 11:23:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    92
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    93
142
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
    94
pathNameRelativeSlashed
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
    95
    | p |
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
    96
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
    97
    p := self pathNameRelative.
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
    98
    (p includes:$\) ifTrue:[
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
    99
        p := p copyReplaceAll:$\ with:$/.
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
   100
    ].
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
   101
    ^p
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
   102
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
   103
    "Created: / 06-12-2012 / 17:11:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
   104
!
67e8c5ab8db2 Initial support for config parsing (not yet integrated). UI improvements in commit dialog (comparing).
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 140
diff changeset
   105
234
a9ef61b902ae Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   106
repository
a9ef61b902ae Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   107
    ^wc repository
a9ef61b902ae Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   108
a9ef61b902ae Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   109
    "Created: / 03-03-2013 / 20:40:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a9ef61b902ae Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   110
!
a9ef61b902ae Most commands are now executeb using executeInRepository:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   111
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   112
revisions
140
feab684bc4dc Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   113
    | path pathS |
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   114
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   115
    path := self pathNameRelative.
140
feab684bc4dc Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   116
    pathS := OperatingSystem isMSWINDOWSlike 
feab684bc4dc Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   117
                ifTrue:[path copyReplaceAll:$\ with: $/]
feab684bc4dc Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   118
                ifFalse:[path].
feab684bc4dc Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   119
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   120
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   121
    revisions isNil ifTrue:[
190
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   122
        | old oldIds |
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   123
        oldIds := self repository execute:
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   124
                    (HGCommand log
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   125
                        workingDirectory: wc pathName;
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   126
                        path: path;
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   127
                        yourself).
190
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   128
        pathS.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   129
        old := OrderedCollection new.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   130
        oldIds withIndexDo: [:id :index|
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   131
            old add: (
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   132
                LazyRevision new
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   133
                    setCollection: old index: index changesetId: id workingCopy: wc path: pathS)
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   134
"/            | cs f |
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   135
"/
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   136
"/            f := (cs := wc repository changesetWithId: id) / p.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   137
"/
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   138
"/            cs changes do:[:chg|
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   139
"/                "/Catch renames...
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   140
"/                (chg isCopied and:[chg path = p]) ifTrue:[
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   141
"/                    p := chg source.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   142
"/                ]
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   143
"/            ].
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   144
"/            f.
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   145
        ].
138
c66a831e131b Make HGWorkingCopy>>revisions dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   146
c66a831e131b Make HGWorkingCopy>>revisions dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   147
        revisions := old.
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   148
    ].
190
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   149
    "/older revisions are cached, newer not since they may change...
138
c66a831e131b Make HGWorkingCopy>>revisions dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   150
140
feab684bc4dc Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   151
    ^((wc changeset / pathS) newer:true) , revisions
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   152
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   153
    "Created: / 05-12-2012 / 19:09:48 / Jan Vrany <jan.vrany@fit.cvut.cz>"
140
feab684bc4dc Bugfix in HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 138
diff changeset
   154
    "Modified: / 06-12-2012 / 03:50:58 / jv"
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   155
    "Modified: / 03-03-2013 / 23:03:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   156
!
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 121
diff changeset
   157
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   158
status
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 36
diff changeset
   159
    | cmd statuses  |
36
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   160
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   161
    cmd := HGCommand status.
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 36
diff changeset
   162
    cmd workingDirectory: filename directory.
36
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   163
    cmd path: filename pathName.
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   164
    statuses := self repository execute: cmd.
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 36
diff changeset
   165
    self assert: statuses size == 1.
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 36
diff changeset
   166
    self assert: statuses first second = filename baseName.
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 36
diff changeset
   167
    ^statuses first first.
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   168
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   169
    "Created: / 24-09-2012 / 22:27:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   170
    "Modified: / 03-03-2013 / 23:04:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   171
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   172
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   173
!HGWorkingCopyFile methodsFor:'delegating'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   174
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   175
doesNotUnderstand: aMessage
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   176
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   177
    ^(filename respondsTo: aMessage selector) ifTrue:[
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   178
        aMessage sendTo: filename
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   179
    ] ifFalse:[
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   180
        super doesNotUnderstand: aMessage
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   181
    ].
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   182
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   183
    "Created: / 24-09-2012 / 13:46:49 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   184
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   185
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   186
!HGWorkingCopyFile methodsFor:'enumerating-contents'!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   187
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   188
directoryContentsAsFilenamesDo:aBlock
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   189
    "evaluate aBlock for each file in the directory represented by the receiver.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   190
     The block is invoked with a filename-argument.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   191
     The enumerations order is undefined - i.e. usually NOT sorted by
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   192
     filenames (but by creation time - on some systems).
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   193
     This excludes entries for '.' or '..'.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   194
     NoOp for non-existing directories; however, this behavior
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   195
     may be changed in the near future, to raise an exception instead.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   196
     So users of this method better test for existing directory before.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   197
     Notice: this enumerates fileName objects; see also
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   198
     #directoryContentsDo:, which enumerates strings."
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   199
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   200
    self directoryContentsDo:[:entry |
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   201
        aBlock value:(self construct:entry).
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   202
    ]
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   203
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   204
    "
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   205
     '.' asFilename directoryContentsAsFilenamesDo:[:fn | Transcript showCR:fn pathName].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   206
    "
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   207
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   208
    "Modified: / 18.9.1997 / 18:42:23 / stefan"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   209
    "Modified: / 23.12.1999 / 20:56:35 / cg"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   210
! !
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   211
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   212
!HGWorkingCopyFile methodsFor:'initialization'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   213
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   214
setWorkingCopy: aHGWorkingCopy path: aStringOrFilename
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   215
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   216
    wc := aHGWorkingCopy.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   217
    filename := aStringOrFilename asFilename.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   218
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   219
    "Created: / 24-09-2012 / 13:53:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   220
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   221
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   222
!HGWorkingCopyFile methodsFor:'inspecting'!
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   223
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   224
browse
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   225
    "Opens a file browser on the working copy"
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   226
162
108fc9ee061e Added HGWorkingCopyBrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 142
diff changeset
   227
    HGSourceCodeManager workingCopyBrowserClass openOnDirectory: filename
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   228
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   229
    "Created: / 04-02-2012 / 17:14:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
162
108fc9ee061e Added HGWorkingCopyBrowser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 142
diff changeset
   230
    "Modified: / 14-12-2012 / 15:48:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   231
! !
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   232
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   233
!HGWorkingCopyFile methodsFor:'instance creation'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   234
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   235
/ aString
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   236
    ^self construct: aString
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   237
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   238
    "Created: / 24-09-2012 / 13:49:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   239
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   240
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   241
construct: aString
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   242
    ^(aString includes: Filename separator) ifTrue:[
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   243
        self components: (aString tokensBasedOn: Filename separator)
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   244
    ] ifFalse:[
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   245
        self component: aString
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   246
    ]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   247
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   248
    "Created: / 24-09-2012 / 13:50:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   249
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   250
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   251
!HGWorkingCopyFile methodsFor:'instance creation-private'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   252
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   253
component: aString
121
f7cac3dae028 Basic revision log support in HGSourceCodeManager.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   254
f7cac3dae028 Basic revision log support in HGSourceCodeManager.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   255
    aString = '.' ifTrue:[ ^ self ].
f7cac3dae028 Basic revision log support in HGSourceCodeManager.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   256
    aString = '..' ifTrue:[ ^ self error:'Not yet supported' ].
f7cac3dae028 Basic revision log support in HGSourceCodeManager.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   257
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   258
    children isNil ifTrue: [ children := Dictionary new ].
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   259
    ^children 
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   260
        at: aString 
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   261
        ifAbsentPut:[HGWorkingCopyFile wc: wc path: (filename construct: aString)]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   262
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   263
    "Created: / 24-09-2012 / 23:26:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
121
f7cac3dae028 Basic revision log support in HGSourceCodeManager.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   264
    "Modified: / 01-12-2012 / 02:09:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   265
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   266
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   267
components: anArray"OfStrings"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   268
    ^anArray inject: self into:[:entry :name | entry component: name ]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   269
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   270
    "Created: / 24-09-2012 / 23:25:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   271
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   272
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   273
!HGWorkingCopyFile methodsFor:'operations'!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   274
180
7b70d26f28da More work on merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
   275
markResolved
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   276
    self repository execute:
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   277
        (HGCommand resolve
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   278
            workingDirectory: filename directory;
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   279
            mark: true;
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   280
            files: (Array with: filename baseName);
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   281
            yourself)
180
7b70d26f28da More work on merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
   282
7b70d26f28da More work on merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
   283
    "Created: / 15-01-2013 / 10:22:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   284
    "Modified: / 03-03-2013 / 23:01:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
180
7b70d26f28da More work on merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
   285
!
7b70d26f28da More work on merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
   286
7b70d26f28da More work on merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
   287
markUnresolved
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   288
    self repository execute:
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   289
        (HGCommand resolve
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   290
            workingDirectory: filename directory;
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   291
            unmark: true;
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   292
            files: (Array with: filename baseName);
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   293
            yourself).
180
7b70d26f28da More work on merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
   294
7b70d26f28da More work on merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
   295
    "Created: / 15-01-2013 / 10:22:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   296
    "Modified: / 03-03-2013 / 23:02:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
180
7b70d26f28da More work on merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
   297
!
7b70d26f28da More work on merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 177
diff changeset
   298
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   299
moveTo: destination
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   300
    "Make sure that this entry is tracked by Mercurial"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   301
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   302
    self isTracked ifTrue:[
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   303
        self repository execute:
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   304
            (HGCommand mv
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   305
                workingDirectory: filename directory;
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   306
                source: filename pathName;
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   307
                destination: destination pathName;
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   308
                yourself)
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   309
    ].
88
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 69
diff changeset
   310
    filename exists ifTrue:[
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 69
diff changeset
   311
        filename moveTo: destination pathName
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 69
diff changeset
   312
    ].
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   313
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   314
    "Created: / 15-11-2012 / 00:23:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   315
    "Modified: / 03-03-2013 / 23:02:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   316
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   317
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   318
remove
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   319
    "Make sure that this entry is tracked by Mercurial"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   320
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   321
    self isTracked ifTrue:[
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   322
        self repository execute:
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   323
            (HGCommand remove
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   324
               workingDirectory: filename directory;
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   325
               paths: { filename baseName };
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   326
               yourself)
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   327
    ].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   328
    filename remove
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   329
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   330
    "Created: / 15-11-2012 / 00:08:59 / Jan Vrany <jan.vrany@fit.cvut.cz>"
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   331
    "Modified: / 03-03-2013 / 23:03:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   332
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   333
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   334
track
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   335
    "Make sure that this entry is tracked by Mercurial"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   336
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   337
    self isUntracked ifTrue:[
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   338
        self repository execute:
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   339
            (HGCommand add
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   340
                workingDirectory: filename directory;
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   341
                paths: { filename baseName };
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   342
                yourself)
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   343
    ]
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   344
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   345
    "Created: / 15-11-2012 / 00:08:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
235
3d8ef499d7d9 Command server is now used by default.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 234
diff changeset
   346
    "Modified: / 03-03-2013 / 23:04:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   347
! !
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   348
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   349
!HGWorkingCopyFile methodsFor:'printing & storing'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   350
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   351
printOn:aStream
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   352
    "append a printed representation if the receiver to the argument, aStream"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   353
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   354
    | path |
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   355
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   356
    aStream nextPut:$[.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   357
    path := filename pathName.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   358
    path := path copyFrom: wc path pathName size + 1.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   359
    aStream nextPutAll: path.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   360
    aStream nextPut:$].
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   361
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   362
    "Modified: / 17-10-2012 / 13:51:44 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   363
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   364
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   365
!HGWorkingCopyFile methodsFor:'reading-directories'!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   366
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   367
directoryContentsAsFilenames
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   368
    "return the contents of the directory as a collection of filenames.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   369
     This excludes any entries for '.' or '..'.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   370
     Returns nil for non-existing directories; however, this behavior
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   371
     may be changed in the near future, to raise an exception instead.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   372
     So users of this method better test for existing directory before.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   373
     Notice: 
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   374
        this returns the file-names as fileName instances; 
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   375
        see also #directoryContents, which returns strings."
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   376
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   377
    |names|
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   378
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   379
    names := filename directoryContents.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   380
    names isNil ifTrue:[^ nil].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   381
    ^ names collect:[:entry | self construct:entry].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   382
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   383
    "
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   384
     '.' asFilename directoryContentsAsFilenames   
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   385
     '/XXXdoesNotExist' asFilename directoryContentsAsFilenames
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   386
    "
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   387
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   388
    "Modified: / 15-11-2012 / 01:13:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   389
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   390
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   391
directoryContentsAsFilenamesMatching: patternOrCollectionOfThose
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   392
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   393
    "
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   394
        Same as directoryContentsAsFilenames, but returns only files
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   395
        that matches given patterns. This uses String>>matches:
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   396
        for pattern matching
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   397
    "
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   398
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   399
    |names|
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   400
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   401
    names := filename directoryContentsMatching: patternOrCollectionOfThose .
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   402
    names isNil ifTrue:[^ nil].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   403
    ^ names asOrderedCollection collect:[:entry | self construct:entry].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   404
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   405
    "
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   406
    '/etc' asFilename
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   407
        directoryContentsAsFilenamesMatching: 'pass*'
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   408
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   409
    '/etc' asFilename
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   410
            directoryContentsAsFilenamesMatching: #('pass*' 'nsswitch.conf')
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   411
    "
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   412
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   413
    "Created: / 03-06-2009 / 09:57:45 / Jan Vrany <vranyj1@fel.cvut.cz>"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   414
    "Modified: / 15-11-2012 / 01:13:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   415
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   416
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   417
recursiveDirectoryContentsAsFilenames
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   418
    "return the contents of the directory and all subdirectories
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   419
     as a collection of filenames.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   420
     This excludes any entries for '.' or '..'.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   421
     Returns nil for non-existing directories; however, this behavior
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   422
     may be changed in the near future, to raise an exception instead.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   423
     So users of this method better test for existing directory before.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   424
     Notice: 
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   425
        this returns the file-names as fileName instances; 
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   426
        see also #recursiveDirectoryContents, which returns strings.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   427
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   428
     Warning: this may take a long time to execute."
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   429
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   430
    |names|
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   431
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   432
    names := filename recursiveDirectoryContents.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   433
    names isNil ifTrue:[^ nil].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   434
    ^ names collect:[:entry | self construct:entry].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   435
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   436
    "Created: / 15-11-2012 / 01:11:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   437
! !
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   438
36
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   439
!HGWorkingCopyFile methodsFor:'testing'!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   440
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   441
isAdded
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   442
    ^ self status isAdded
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   443
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   444
    "Modified: / 23-10-2012 / 11:13:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   445
!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   446
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   447
isClean
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   448
    ^ self status isClean
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   449
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   450
    "Modified: / 23-10-2012 / 11:13:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   451
!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   452
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   453
isCleanOrIgnored
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   454
    | s |
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   455
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   456
    s := self status.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   457
    ^s isClean or:[s isIgnored]
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   458
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   459
    "Created: / 15-11-2012 / 01:25:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   460
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   461
177
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   462
isConflict
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   463
    "Return true, if the file had a conflict during merge or update.
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   464
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   465
     Note, that this return true even if the file was later merged
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   466
     and conflicts resolved. To check whether conflicts are resolved or
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   467
     not, use #isResolved or isUnresolved"
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   468
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   469
    ^wc mergeState includesKey: self pathNameRelative.
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   470
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   471
    "Created: / 14-01-2013 / 16:54:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   472
!
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   473
36
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   474
isIgnored
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   475
    ^ self status isIgnored
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   476
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   477
    "Modified: / 23-10-2012 / 11:13:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   478
!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   479
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   480
isMissing
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   481
    ^ self status isMissing
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   482
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   483
    "Modified: / 23-10-2012 / 11:12:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   484
!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   485
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   486
isModified
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   487
    ^ self status isModified
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   488
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   489
    "Modified: / 23-10-2012 / 11:13:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   490
!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   491
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   492
isNotTracked
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   493
    ^ self status isNotTracked
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   494
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   495
    "Modified: / 23-10-2012 / 11:13:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   496
!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   497
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   498
isRemoved
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   499
    ^ self status isRemoved
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   500
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   501
    "Modified: / 23-10-2012 / 11:13:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   502
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   503
177
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   504
isResolved
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   505
    "Return true, if the file had a conflict during merge or update
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   506
     and is marked as resolved."
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   507
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   508
    ^(wc mergeState at: self pathNameRelative) == $R
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   509
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   510
    "Created: / 14-01-2013 / 16:56:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   511
!
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   512
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   513
isTracked
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   514
    | s |
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   515
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   516
    s := self status.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   517
    ^s isNotTracked not and:[s isIgnored not and:[s isRemoved not]]
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   518
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   519
    "Created: / 15-11-2012 / 00:11:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   520
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   521
177
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   522
isUnresolved
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   523
    "Return true, if the file had a conflict during merge or update
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   524
     and is marked as not yet resolved."
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   525
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   526
    ^(wc mergeState at: self pathNameRelative) == $U
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   527
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   528
    "Created: / 14-01-2013 / 16:56:18 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   529
!
1b0ddad9770e Initial support for merging.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 165
diff changeset
   530
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   531
isUntracked
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   532
    "An alias for not-tracked"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   533
    ^ self isNotTracked
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   534
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   535
    "Created: / 14-11-2012 / 23:56:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   536
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   537
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   538
isUntrackedOrIgnored
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   539
    | s |
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   540
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   541
    s := self status.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   542
    ^s isNotTracked or:[s isIgnored]
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   543
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   544
    "Created: / 15-11-2012 / 01:23:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   545
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   546
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   547
isUnversioned
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   548
    "An alias for not-tracked"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   549
    ^ self isNotTracked
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   550
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   551
    "Created: / 14-11-2012 / 23:56:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
36
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   552
! !
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   553
190
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   554
!HGWorkingCopyFile::LazyRevision methodsFor:'accessing'!
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   555
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   556
changeset
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   557
    ^changeset isHGChangeset 
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   558
        ifTrue:[changeset]
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   559
        ifFalse:[changeset := wc repository changesetWithId: changeset]
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   560
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   561
    "Created: / 22-01-2013 / 13:38:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   562
!
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   563
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   564
changesetId
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   565
    ^changeset isHGChangesetId
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   566
        ifTrue:[changeset]
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   567
        ifFalse:[changeset id]
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   568
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   569
    "Created: / 22-01-2013 / 13:38:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   570
! !
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   571
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   572
!HGWorkingCopyFile::LazyRevision methodsFor:'error handling'!
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   573
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   574
doesNotUnderstand: aMessage
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   575
    (HGChangesetFile canUnderstand: aMessage selector) ifFalse:[
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   576
        ^ super doesNotUnderstand: aMessage
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   577
    ].
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   578
    self ensureNotLazy.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   579
    ^aMessage sendTo: (collection at: index).
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   580
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   581
    "Created: / 22-01-2013 / 13:41:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   582
! !
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   583
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   584
!HGWorkingCopyFile::LazyRevision methodsFor:'initialization'!
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   585
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   586
setCollection: coll index: idx changesetId: csId workingCopy: workCopy path: p
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   587
    collection := coll.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   588
    index := idx.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   589
    changeset := csId.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   590
    wc := workCopy.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   591
    path := p.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   592
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   593
    "Created: / 22-01-2013 / 13:32:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   594
!
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   595
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   596
setPath: p
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   597
    path := p.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   598
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   599
    "Created: / 22-01-2013 / 13:48:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   600
! !
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   601
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   602
!HGWorkingCopyFile::LazyRevision methodsFor:'private'!
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   603
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   604
ensureNotLazy
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   605
    | cs file renamed |
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   606
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   607
    index ~~ 1 ifTrue:[
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   608
        (collection at: index - 1) ensureNotLazy.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   609
    ].
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   610
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   611
    cs := self changeset.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   612
    file := cs / path.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   613
    collection at: index put: file.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   614
    index ~~ collection size ifTrue:[
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   615
        cs changes do:[:chg|
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   616
            "/Catch renames...
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   617
            (chg isCopied and:[chg path = path]) ifTrue:[
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   618
                renamed := chg source.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   619
                index + 1 to: collection size do:[:i|
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   620
                    (collection at: i) setPath: renamed.
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   621
                ].
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   622
                ^self
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   623
            ]
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   624
        ].
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   625
    ].
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   626
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   627
    "Created: / 22-01-2013 / 13:48:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   628
! !
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   629
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   630
!HGWorkingCopyFile class methodsFor:'documentation'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   631
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   632
version_HG
115
b1ed2d29054b version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 88
diff changeset
   633
b1ed2d29054b version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 88
diff changeset
   634
    ^ '$Changeset: <not expanded> $'
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   635
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   636
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   637
version_SVN
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   638
    ^ '§Id::                                                                                                                        §'
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   639
! !
190
a4a4b6f2fc52 Performance optimization in HGWorkingCopyFile.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 180
diff changeset
   640