mercurial/HGCommand.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Thu, 06 Dec 2012 12:50:59 +0000
changeset 141 8a1c1e04391b
parent 137 379bd934f8d0
child 142 67e8c5ab8db2
permissions -rw-r--r--
Bugfix in HGCommand>>execute (close command output pipe)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     1
"{ Package: 'stx:libscm/mercurial' }"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     2
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     3
Object subclass:#HGCommand
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     4
	instanceVariableNames:'workingDirectory'
80
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
     5
	classVariableNames:'HGExecutable HGVersion Debugging'
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     6
	poolDictionaries:''
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     7
	category:'SCM-Mercurial-Internal'
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     8
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
     9
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    10
HGCommand subclass:#add
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    11
	instanceVariableNames:'paths'
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    12
	classVariableNames:''
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    13
	poolDictionaries:''
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    14
	privateIn:HGCommand
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    15
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    16
105
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
    17
HGCommand subclass:#branches
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
    18
	instanceVariableNames:'active closed'
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
    19
	classVariableNames:''
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
    20
	poolDictionaries:''
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
    21
	privateIn:HGCommand
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
    22
!
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
    23
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
    24
HGCommand subclass:#cat
126
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
    25
	instanceVariableNames:'path revision destination'
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
    26
	classVariableNames:''
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
    27
	poolDictionaries:''
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
    28
	privateIn:HGCommand
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
    29
!
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
    30
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
    31
HGCommand subclass:#clone
88
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
    32
	instanceVariableNames:'url path update'
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    33
	classVariableNames:''
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    34
	poolDictionaries:''
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    35
	privateIn:HGCommand
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    36
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    37
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
    38
HGCommand subclass:#commit
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    39
	instanceVariableNames:'message files'
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    40
	classVariableNames:''
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    41
	poolDictionaries:''
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    42
	privateIn:HGCommand
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    43
!
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    44
106
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
    45
HGCommand subclass:#heads
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
    46
	instanceVariableNames:''
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
    47
	classVariableNames:''
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
    48
	poolDictionaries:''
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
    49
	privateIn:HGCommand
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
    50
!
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
    51
69
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
    52
HGCommand subclass:#locate
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
    53
	instanceVariableNames:'revision'
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
    54
	classVariableNames:''
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
    55
	poolDictionaries:''
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
    56
	privateIn:HGCommand
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
    57
!
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
    58
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
    59
HGCommand subclass:#log
137
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
    60
	instanceVariableNames:'start stop path childrenOnly'
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    61
	classVariableNames:''
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    62
	poolDictionaries:''
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    63
	privateIn:HGCommand
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    64
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    65
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    66
HGCommand subclass:#mv
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    67
	instanceVariableNames:'source destination'
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    68
	classVariableNames:''
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    69
	poolDictionaries:''
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    70
	privateIn:HGCommand
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    71
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    72
57
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    73
HGCommand subclass:#pull
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    74
	instanceVariableNames:'url'
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    75
	classVariableNames:''
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    76
	poolDictionaries:''
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    77
	privateIn:HGCommand
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    78
!
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    79
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
    80
HGCommand subclass:#push
107
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
    81
	instanceVariableNames:'url force'
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    82
	classVariableNames:''
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    83
	poolDictionaries:''
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    84
	privateIn:HGCommand
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    85
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    86
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    87
HGCommand subclass:#remove
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    88
	instanceVariableNames:'paths'
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    89
	classVariableNames:''
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    90
	poolDictionaries:''
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    91
	privateIn:HGCommand
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    92
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
    93
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
    94
HGCommand subclass:#status
36
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
    95
	instanceVariableNames:'path'
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
    96
	classVariableNames:''
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
    97
	poolDictionaries:''
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
    98
	privateIn:HGCommand
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
    99
!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   100
88
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   101
HGCommand subclass:#update
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   102
	instanceVariableNames:'revision'
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   103
	classVariableNames:''
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   104
	poolDictionaries:''
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   105
	privateIn:HGCommand
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   106
!
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   107
80
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   108
HGCommand subclass:#version
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   109
	instanceVariableNames:''
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   110
	classVariableNames:''
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   111
	poolDictionaries:''
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   112
	privateIn:HGCommand
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   113
!
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   114
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   115
!HGCommand class methodsFor:'documentation'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   116
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   117
documentation
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   118
"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   119
    A wrapper for hg command line tool. Individual commands are wrapped in 
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   120
    my private classes. 
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   121
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   122
    HGCommand is part of internal implementation and subject to change. 
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   123
    Therefore it should not be used by user code. Use classed and APIs in 
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   124
    SCM-Mercurial-Core instead.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   125
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   126
    [author:]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   127
        Jan Vrany <jan.vrany@fit.cvut.cz>
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   128
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   129
    [instance variables:]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   130
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   131
    [class variables:]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   132
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   133
    [see also:]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   134
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   135
"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   136
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   137
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   138
!HGCommand class methodsFor:'initialization'!
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   139
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   140
initialize
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   141
    "Invoked at system start or when the class is dynamically loaded."
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   142
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   143
    "/ please change as required (and remove this comment)
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   144
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   145
    "/ HGExecutable := nil.
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   146
    Debugging := OperatingSystem getLoginName = 'jv'.
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   147
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   148
    "Modified: / 12-11-2012 / 22:42:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   149
! !
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   150
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   151
!HGCommand class methodsFor:'accessing'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   152
80
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   153
hgCommand
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   154
    | h |
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   155
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   156
    HGExecutable notNil ifTrue:[
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   157
        ^ HGExecutable
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   158
    ].
82
40eb86d8d5bd Fixed misspelled selector in HGCommand. Use WC's repository to push
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 80
diff changeset
   159
    HGExecutable := UserPreferences current hgCommand.
80
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   160
    HGExecutable isNil ifTrue:[
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   161
        OperatingSystem isMSWINDOWSlike ifTrue:[
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   162
            "/        h := Win32OperatingSystem registryEntry 
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   163
            "/                key:'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\App Paths\svn.exe'.
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   164
            "/        h notNil ifTrue:[HGExecutable := h valueNamed:''].
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   165
            "/        HGExecutable notEmptyOrNil ifTrue:[^HGExecutable]
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   166
            HGExecutable := OperatingSystem pathOfCommand:'hg'.
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   167
        ] ifFalse:[
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   168
            OperatingSystem isUNIXlike ifTrue:[
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   169
                HGExecutable := OperatingSystem pathOfCommand:'hg'.
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   170
            ]
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   171
        ].
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   172
    ].
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   173
    HGExecutable isNil ifTrue:[
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   174
        self error:'''hg'' executable not found!!'.
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   175
    ].
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   176
    ^ HGExecutable
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   177
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   178
    "
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   179
     HGExecutable := nil.
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   180
     self basicNew executable"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   181
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   182
    "Created: / 19-11-2012 / 21:48:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
82
40eb86d8d5bd Fixed misspelled selector in HGCommand. Use WC's repository to push
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 80
diff changeset
   183
    "Modified: / 19-11-2012 / 23:21:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
80
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   184
!
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   185
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   186
hgCommand: command
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   187
    HGExecutable := command
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   188
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   189
    "Created: / 19-11-2012 / 21:49:02 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   190
!
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   191
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   192
hgVersion
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   193
    "Return mercurial version installed on this compiter"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   194
    
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   195
    HGVersion isNil ifTrue:[
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   196
        HGVersion := version new execute
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   197
    ].
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   198
    ^ HGVersion
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   199
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   200
    "
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   201
     HGCommand mercurialVersion"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   202
    "Created: / 19-11-2012 / 20:14:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   203
!
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   204
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   205
hgVersionIsSupported
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   206
    ^ self hgVersionIsSupported:self hgVersion
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   207
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   208
    "
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   209
     HGCommand mercurialVersionIsSupported"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   210
    "Created: / 19-11-2012 / 20:34:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   211
!
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   212
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   213
hgVersionIsSupported:version 
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   214
    ^ self hgVersionsSupported 
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   215
        anySatisfy:[:vsn | 
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   216
            ((vsn at:1) == #'*' or:[ (vsn at:1) == (version at:1) ]) 
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   217
                and:[
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   218
                    ((vsn at:2) == #'*' or:[ (vsn at:2) == (version at:2) ]) 
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   219
                        and:[ ((vsn at:3) == #'*' or:[ (vsn at:1) == (version at:3) ]) ]
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   220
                ]
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   221
        ].
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   222
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   223
    "
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   224
     HGCommand mercurialVersionIsSupported: #(2 3 2)
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   225
     HGCommand mercurialVersionIsSupported: #(2 0 1)
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   226
     HGCommand mercurialVersionIsSupported: #(1 9 1)
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   227
     HGCommand mercurialVersionIsSupported: #(1 0 0)
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   228
     HGCommand mercurialVersionIsSupported: #(2 4 nil)"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   229
    "Created: / 19-11-2012 / 20:31:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   230
!
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   231
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   232
hgVersionsSupported
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   233
    "Return a list of mercurial version supported bu this
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   234
     implementation"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   235
    
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   236
    ^ #( #(1 9 #'*')
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   237
     #(2 #'*' #'*') )
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   238
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   239
    "Created: / 19-11-2012 / 20:26:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   240
!
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   241
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   242
verbose
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   243
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   244
    ^ UserPreferences current hgVerbose
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   245
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   246
    "Created: / 19-03-2008 / 12:29:47 / janfrog"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   247
    "Modified: / 19-03-2009 / 14:00:50 / Jan Vrany <vranyj1@fel.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   248
    "Modified (format): / 27-12-2011 / 16:00:06 / dundee"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   249
    "Modified: / 17-10-2012 / 13:05:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
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
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   252
verbose:aBoolean
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   253
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   254
    UserPreferences current hgVerbose:aBoolean
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   255
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   256
    "Created: / 19-03-2008 / 12:29:59 / janfrog"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   257
    "Modified: / 19-03-2009 / 14:00:59 / Jan Vrany <vranyj1@fel.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   258
    "Modified (format): / 27-12-2011 / 16:00:13 / dundee"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   259
    "Modified: / 17-10-2012 / 13:05:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   260
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   261
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   262
!HGCommand class methodsFor:'commands'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   263
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   264
add
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   265
    ^add new
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   266
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   267
    "Created: / 15-11-2012 / 00:06:15 / 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: 52
diff changeset
   268
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   269
105
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   270
branches
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   271
    ^branches new
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   272
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   273
    "Created: / 27-11-2012 / 19:56:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   274
!
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   275
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   276
cat
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   277
    ^cat new
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   278
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   279
    "Created: / 17-11-2012 / 00:16:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   280
!
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   281
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   282
clone
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   283
    ^clone new
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   284
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   285
    "Created: / 01-10-2012 / 00:09:54 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   286
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   287
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   288
commit
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   289
    ^commit new
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   290
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   291
    "Created: / 12-11-2012 / 22:40:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   292
!
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   293
106
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   294
heads
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   295
    ^heads new
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   296
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   297
    "Created: / 27-11-2012 / 21:32:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   298
!
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   299
69
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   300
locate
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   301
    ^locate new
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   302
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   303
    "Created: / 16-11-2012 / 22:36:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   304
!
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   305
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   306
log
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   307
    ^log new
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   308
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   309
    "Created: / 13-11-2012 / 09:00:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   310
!
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   311
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   312
mv
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   313
    ^mv new
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   314
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   315
    "Created: / 15-11-2012 / 00:22:16 / 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: 52
diff changeset
   316
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   317
109
08c6eca6df25 Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   318
pull
08c6eca6df25 Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   319
    ^pull new
08c6eca6df25 Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   320
08c6eca6df25 Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   321
    "Created: / 27-11-2012 / 23:30:09 / Jan Vrany <jan.vrany@fit.cvut.cz>"
08c6eca6df25 Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   322
!
08c6eca6df25 Added warning about commiting new head to HGCommitDialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   323
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   324
push
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   325
    ^push new
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   326
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   327
    "Created: / 30-09-2012 / 23:46:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
36
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   328
!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   329
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   330
remove
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   331
    ^remove new
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   332
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   333
    "Created: / 15-11-2012 / 00:06: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: 52
diff changeset
   334
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   335
36
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   336
status
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   337
    ^status new
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   338
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   339
    "Created: / 23-10-2012 / 11:10:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   340
!
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   341
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   342
update
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   343
    ^update new
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   344
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   345
    "Created: / 21-11-2012 / 00:23:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   346
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   347
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   348
!HGCommand class methodsFor:'commands-shortcuts'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   349
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   350
clone: url to: stringOfFilename
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   351
    self clone
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   352
        url: url;
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   353
        path: stringOfFilename asFilename asAbsoluteFilename pathName;
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   354
        execute
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
    "Created: / 01-10-2012 / 00:06:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   357
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   358
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   359
!HGCommand methodsFor:'accessing'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   360
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   361
workingDirectory
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   362
    ^workingDirectory notNil ifTrue:[
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   363
        workingDirectory
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   364
    ] ifFalse: [
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   365
        Filename currentDirectory pathName
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   366
    ]
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   367
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   368
    "Created: / 11-05-2011 / 08:26:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   369
    "Modified (format): / 27-12-2011 / 15:54:08 / dundee"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   370
    "Modified: / 01-10-2012 / 14:38:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   371
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   372
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   373
workingDirectory:aStringOrFilename
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   374
    aStringOrFilename asFilename isDirectory ifFalse:[
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   375
        self error:'Working directory does not exist'.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   376
        ^self.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   377
    ].    
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   378
    workingDirectory := aStringOrFilename asString.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   379
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   380
    "Modified: / 01-10-2012 / 14:38:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   381
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   382
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   383
!HGCommand methodsFor:'executing'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   384
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   385
execute
52
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   386
    | pipe output pid environment sema status retval args |
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   387
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   388
    pipe := NonPositionableExternalStream makePipe.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   389
    output := pipe first.
52
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   390
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   391
    OperatingSystem isUNIXlike ifTrue:[
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   392
        environment := OperatingSystem getEnvironment copy.
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   393
    ] ifFalse:[
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   394
        environment := Dictionary new.
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   395
    ].
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   396
    environment at:'LANG' put:'C'.
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   397
52
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   398
    args := self arguments.
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   399
    OperatingSystem isMSWINDOWSlike ifTrue:[
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   400
        args := String streamContents:[:s|
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   401
            args 
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   402
                do:[:each | s nextPut:$"; nextPutAll: each; nextPut: $"]
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   403
                separatedBy: [ s space ]
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   404
        ]
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   405
    ].
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   406
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   407
    sema := Semaphore new name: 'Waiting for hg command to finish'.
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   408
    Processor monitor:[
52
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   409
        pid := OperatingSystem exec:(self executable) withArguments:args
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   410
            environment:environment
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   411
            fileDescriptors:{0 . pipe second fileDescriptor . pipe second fileDescriptor}
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   412
            fork:true 
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   413
            newPgrp:false 
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   414
            inDirectory:self workingDirectory
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   415
    ] action:[:stat |
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   416
        status := stat.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   417
        sema signal.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   418
    ].
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   419
    
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   420
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   421
    pipe second close.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   422
    pid isNil ifTrue:[
36
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
   423
        HGCommandError raiseErrorString: 'cannot execute hg command'.
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   424
        output close.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   425
        ^ self.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   426
    ].
95
83ee62dc9491 HGCommand: fixes for Windows.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 88
diff changeset
   427
    (Debugging and:[OperatingSystem isUNIXlike]) ifTrue:[
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   428
        output := output contents asString readStream
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
   429
    ].
141
8a1c1e04391b Bugfix in HGCommand>>execute (close command output pipe)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 137
diff changeset
   430
    [ retval := self parse: output ] ensure:[ output close.].
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   431
    sema wait.
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   432
    ^self status: status result: retval
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   433
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   434
    "
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   435
        SVNv2::Command info: 'https://swing.fit.cvut.cz/svn/stx/libsvn'
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   436
    "
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   437
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   438
    "Created: / 11-05-2011 / 07:45:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   439
    "Modified: / 17-12-2011 / 19:22:00 / dundee"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   440
    "Modified (format): / 27-12-2011 / 15:53:54 / dundee"
52
281850dff0ac HGCommand: changed: #execute: on Windows arguments must be passed as string.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 51
diff changeset
   441
    "Modified: / 14-11-2012 / 13:41:57 / jv"
141
8a1c1e04391b Bugfix in HGCommand>>execute (close command output pipe)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 137
diff changeset
   442
    "Modified (format): / 06-12-2012 / 12:35:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   443
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   444
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   445
!HGCommand methodsFor:'private'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   446
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   447
arguments
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   448
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   449
    ^ OrderedCollection streamContents:[:s |
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   450
        s nextPut:self executable.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   451
        self argumentsGlobalOn:s.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   452
        s nextPut:self command.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   453
        self argumentsCommandOn:s.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   454
    ].
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   455
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   456
    "Created: / 11-05-2011 / 07:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   457
    "Modified (format): / 27-12-2011 / 15:47:23 / dundee"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   458
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   459
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   460
argumentsCommandOn:stream
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   461
    "Called to get command specific options"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   462
69
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   463
    self subclassResponsibility
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   464
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   465
    "Created: / 11-05-2011 / 07:58:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   466
    "Modified (format): / 27-12-2011 / 15:46:59 / dundee"
69
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   467
    "Modified: / 16-11-2012 / 22:31:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   468
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   469
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   470
argumentsGlobalOn:arg
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   471
    "Called to get global options"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   472
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   473
    "Created: / 11-05-2011 / 07:58:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   474
    "Modified (format): / 27-12-2011 / 15:47:10 / dundee"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   475
    "Modified: / 30-09-2012 / 23:43:13 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   476
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   477
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   478
command
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   479
    "Returns the git 'command' option, i.e. commit,
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   480
     push, pull, ..."
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   481
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   482
    ^self class nameWithoutPrefix
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   483
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   484
    "
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   485
        HGCommand::push basicNew command
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   486
    "
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   487
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   488
    "Created: / 11-05-2011 / 07:58:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   489
    "Modified (format): / 27-12-2011 / 15:47:17 / dundee"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   490
    "Modified: / 30-09-2012 / 23:37:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   491
    "Modified (comment): / 17-10-2012 / 13:25:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   492
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   493
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   494
executable
80
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   495
    ^ self class hgCommand
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   496
80
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
   497
    "Modified: / 19-11-2012 / 21:48:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   498
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   499
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   500
parse: stream
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   501
    "Parses output of 'hg' command, i.e. commit, log, update, checkout, 
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   502
     etc."
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   503
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   504
    ^ self subclassResponsibility
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   505
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   506
    "Created: / 11-05-2011 / 07:58:27 / Jan Vrany <jan.vrany@fit.cvut.cz>"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   507
    "Created: / 17-12-2011 / 17:02:41 / dundee"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   508
    "Modified (comment): / 17-10-2012 / 13:14:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   509
!
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   510
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   511
status: status result: result
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   512
    "Called when hg command finishes, passing it's status and result from parser"
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   513
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   514
    status success ifFalse:[
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   515
        HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code) .
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   516
    ].
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   517
    ^result
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   518
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   519
    "Created: / 15-11-2012 / 17:04:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   520
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   521
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   522
!HGCommand::add methodsFor:'accessing'!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   523
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   524
paths
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   525
    ^ paths
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   526
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   527
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   528
paths:something
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   529
    paths := something.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   530
! !
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   531
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   532
!HGCommand::add methodsFor:'private'!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   533
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   534
argumentsCommandOn:stream
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   535
    "Called to get command specific options"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   536
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   537
    paths isEmptyOrNil ifTrue:[
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   538
        self error: 'No paths given'
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   539
    ].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   540
    stream nextPutAll: paths
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   541
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   542
    "Created: / 15-11-2012 / 00:05:46 / 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: 52
diff changeset
   543
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   544
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   545
parse:stream
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   546
    "Parses output of 'hg' command, i.e. commit, log, update, checkout, 
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   547
     etc."
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   548
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   549
    ^ nil
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   550
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   551
    "Modified: / 15-11-2012 / 00:38:43 / 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: 52
diff changeset
   552
! !
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   553
105
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   554
!HGCommand::branches methodsFor:'accessing'!
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   555
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   556
active
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   557
    ^ active
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   558
!
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   559
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   560
active:aBoolean
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   561
    active := aBoolean.
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   562
!
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   563
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   564
closed
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   565
    ^ closed
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   566
!
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   567
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   568
closed:aBoolean
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   569
    closed := aBoolean.
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   570
! !
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   571
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   572
!HGCommand::branches methodsFor:'private'!
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   573
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   574
argumentsCommandOn:stream
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   575
    "Called to get command specific options"
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   576
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   577
    active == true ifTrue:[
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   578
        stream nextPut:'--active'
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   579
    ].
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   580
    closed == true ifTrue:[
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   581
        stream nextPut:'--closed'
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   582
    ].
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   583
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   584
    "Created: / 27-11-2012 / 19:54:08 / Jan Vrany <jan.vrany@fit.cvut.cz>"
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   585
!
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   586
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   587
argumentsGlobalOn:stream
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   588
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   589
    stream nextPut:'--debug' "/to get full node ids
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   590
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   591
    "Created: / 27-11-2012 / 19:54:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   592
!
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   593
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   594
parse: stream
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   595
    "Parses output of 'hg' command, i.e. commit, log, update, checkout, 
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   596
     etc."
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   597
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   598
    ^ (HGCommandParser on: stream) parseCommandBranches
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   599
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   600
    "Created: / 27-11-2012 / 19:55:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   601
! !
25e8ff9d2a31 Added read-only support for branches.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 102
diff changeset
   602
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   603
!HGCommand::cat methodsFor:'accessing'!
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   604
126
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   605
destination
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   606
    ^ destination
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   607
!
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   608
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   609
destination:aStringOrFilename
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   610
    destination := aStringOrFilename.
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   611
!
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   612
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   613
path
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   614
    ^ path
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   615
!
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   616
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   617
path:something
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   618
    path := something.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   619
!
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   620
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   621
revision
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   622
    ^ revision
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   623
!
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   624
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   625
revision:something
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   626
    revision := something.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   627
! !
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   628
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   629
!HGCommand::cat methodsFor:'executing'!
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   630
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   631
execute
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   632
    "
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   633
    A hacked version of #execute that returns a open read
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   634
    stream to read directly from 'hg cat' stdout...
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   635
    
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   636
    "
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   637
126
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   638
    | pipe output pid environment sema args sout exec |
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   639
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   640
    pipe := NonPositionableExternalStream makePipe.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   641
    output := pipe first.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   642
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   643
    OperatingSystem isUNIXlike ifTrue:[
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   644
        environment := OperatingSystem getEnvironment copy.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   645
    ] ifFalse:[
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   646
        environment := Dictionary new.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   647
    ].
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   648
    environment at:'LANG' put:'C'.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   649
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   650
    args := self arguments.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   651
    OperatingSystem isMSWINDOWSlike ifTrue:[
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   652
        args := String streamContents:[:s|
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   653
            args 
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   654
                do:[:each | s nextPut:$"; nextPutAll: each; nextPut: $"]
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   655
                separatedBy: [ s space ]
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   656
        ]
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   657
    ].
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   658
126
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   659
    sout := destination notNil 
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   660
                ifTrue:[destination asFilename writeStream]
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   661
                ifFalse:[pipe second].
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   662
    sema := Semaphore new name: 'Waiting for hg command to finish'.
126
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   663
    exec := [
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   664
        pid := OperatingSystem exec:(self executable) withArguments:args
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   665
                environment:environment
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   666
                fileDescriptors:{0 . sout fileDescriptor . pipe second fileDescriptor}
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   667
                fork:true 
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   668
                newPgrp:false 
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   669
                inDirectory:self workingDirectory.
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   670
    ].
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   671
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   672
    destination notNil ifTrue:[
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   673
        Processor 
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   674
            monitor:exec
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   675
            action:[:stat |
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   676
                sema signal.
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   677
            ].
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   678
    ] ifFalse:[
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   679
        exec value
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   680
    ].
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   681
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   682
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   683
    pipe second close.
126
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   684
    sout close.
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   685
    pid isNil ifTrue:[
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   686
        HGCommandError raiseErrorString: 'cannot execute hg command'.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   687
        output close.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   688
        ^ self.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   689
    ].
126
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   690
    ^destination notNil 
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   691
        ifTrue:[sema wait. nil]
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   692
        ifFalse:[output].
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   693
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   694
    "Created: / 17-11-2012 / 00:13:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
126
952efea00dd2 More SourceCodeManager API.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   695
    "Modified: / 04-12-2012 / 10:10:57 / Jan Vrany <jan.vrany@fit.cvut.cz>"
71
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   696
! !
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   697
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   698
!HGCommand::cat methodsFor:'private'!
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   699
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   700
argumentsCommandOn:stream
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   701
    "Called to get command specific options"
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   702
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   703
    path isNil ifTrue:[
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   704
        self error:'No path specified'
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   705
    ].
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   706
    revision isNil ifTrue:[
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   707
        self error:'No revision specified'
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   708
    ].
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   709
    stream nextPut:'--rev'; nextPut: revision asString.
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   710
    stream nextPut:path
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   711
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   712
    "Modified: / 17-11-2012 / 00:09:28 / Jan Vrany <jan.vrany@fit.cvut.cz>"
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   713
!
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   714
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   715
parse:stream
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   716
    "Parses output of 'hg' command, i.e. commit, log, update, checkout, 
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   717
     etc."
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   718
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   719
    ^ self shouldImplement
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   720
! !
bd4cfb10a262 Basic support to access changeset content.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 69
diff changeset
   721
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   722
!HGCommand::clone methodsFor:'accessing'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   723
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   724
path
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   725
    ^ path
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   726
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   727
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   728
path:something
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   729
    path := something.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   730
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   731
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   732
url
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   733
    ^ url
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   734
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   735
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   736
url:something
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   737
    url := something.
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   738
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   739
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   740
!HGCommand::clone methodsFor:'private'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   741
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   742
argumentsCommandOn:stream
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   743
    "Called to get command specific options"
88
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   744
    update == false ifTrue:[
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   745
        stream nextPut:'--noupdate'.
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   746
    ].
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   747
    stream nextPut: url; nextPut: path.
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   748
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   749
    "Created: / 01-10-2012 / 00:04:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
   750
    "Modified: / 21-11-2012 / 00:17:31 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   751
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   752
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   753
parse:stream
63
77b0d42eebd0 Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 61
diff changeset
   754
    "superclass Command says that I am responsible to implement this method"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   755
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   756
    ^ nil
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   757
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   758
    "Modified: / 14-11-2012 / 22:42:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   759
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   760
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   761
!HGCommand::commit methodsFor:'accessing'!
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   762
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   763
files
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   764
    ^ files
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   765
!
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   766
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   767
files:something
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   768
    files := something.
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   769
!
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   770
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   771
message
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   772
    ^ message
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   773
!
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   774
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   775
message:something
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   776
    message := something.
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   777
! !
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   778
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   779
!HGCommand::commit methodsFor:'private'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   780
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   781
argumentsCommandOn:stream
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   782
    "Called to get command specific options"
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   783
49
ffb879bfafe7 - stx_libscm_mercurial
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 40
diff changeset
   784
    | author |
73
eb731ce2685e Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 71
diff changeset
   785
    author := HGAuthorQuery query.
eb731ce2685e Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 71
diff changeset
   786
    author notNil ifTrue:[
eb731ce2685e Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 71
diff changeset
   787
        stream nextPut:'--user'; nextPut: author
eb731ce2685e Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 71
diff changeset
   788
    ].
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   789
    stream nextPut:'-m'; nextPut: message.
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   790
    files notNil ifTrue:[
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   791
        stream nextPutAll: files
49
ffb879bfafe7 - stx_libscm_mercurial
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 40
diff changeset
   792
    ].
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   793
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   794
    "Created: / 12-11-2012 / 22:38:40 / Jan Vrany <jan.vrany@fit.cvut.cz>"
73
eb731ce2685e Fixed HGStXTests>>test_commit_01
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 71
diff changeset
   795
    "Modified: / 17-11-2012 / 00:59:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   796
!
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   797
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   798
parse:stream
63
77b0d42eebd0 Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 61
diff changeset
   799
    "superclass HGCommand says that I am responsible to implement this method"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   800
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   801
    "Nothing to do"
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   802
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   803
    "Modified: / 12-11-2012 / 22:38:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   804
!
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   805
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   806
status: status result: result
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   807
    "Called when hg command finishes, passing it's status and result from parser"
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   808
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   809
    (status code ~~ 0 and:[status code ~~ 1]) ifTrue:[
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   810
        HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code) .
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   811
    ].
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   812
    ^result
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   813
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
   814
    "Created: / 15-11-2012 / 17:06:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   815
! !
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   816
106
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   817
!HGCommand::heads methodsFor:'private'!
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   818
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   819
argumentsCommandOn:stream
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   820
    "Called to get command specific options"
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   821
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   822
    stream 
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   823
        nextPut:'--template';
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   824
        nextPut:HGCommandParser templateHeads.
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   825
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   826
    "Created: / 27-11-2012 / 21:30:12 / Jan Vrany <jan.vrany@fit.cvut.cz>"
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   827
!
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   828
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   829
parse: stream
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   830
    "Parses output of 'hg' command, i.e. commit, log, update, checkout, 
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   831
     etc."
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   832
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   833
    ^ (HGCommandParser on: stream) parseCommandHeads
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   834
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   835
    "Created: / 27-11-2012 / 21:30:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   836
! !
99be3b5a40da Added support for heads (both repository and per-branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 105
diff changeset
   837
69
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   838
!HGCommand::locate methodsFor:'accessing'!
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   839
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   840
revision
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   841
    ^ revision
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   842
!
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   843
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   844
revision:rev
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   845
    revision := rev.
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   846
! !
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   847
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   848
!HGCommand::locate methodsFor:'private'!
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   849
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   850
argumentsCommandOn:stream
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   851
    "Called to get command specific options"
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   852
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   853
    stream nextPut:'--print0'.
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   854
    revision notNil ifTrue:[
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   855
        stream nextPut: '--rev'; nextPut: revision printString.
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   856
    ].
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   857
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   858
    "Modified: / 16-11-2012 / 22:32:36 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   859
!
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   860
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   861
parse:stream
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   862
    "Parses output of 'hg' command, i.e. commit, log, update, checkout, 
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   863
     etc."
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   864
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   865
    ^ (HGCommandParser on: stream) parseCommandLocate
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   866
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   867
    "Modified: / 16-11-2012 / 22:33:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   868
! !
17045d49309f Refactoring: preparation for accessing changeset contents.
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 63
diff changeset
   869
40
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   870
!HGCommand::log methodsFor:'accessing'!
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   871
137
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   872
childrenOnly
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   873
    ^ childrenOnly
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   874
!
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   875
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   876
childrenOnly:something
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   877
    childrenOnly := something.
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   878
!
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   879
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   880
path
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   881
    ^ path
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   882
!
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   883
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   884
path:aString
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   885
    path := aString.
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   886
!
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   887
40
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   888
start
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   889
    ^ start
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   890
!
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   891
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   892
start:something
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   893
    start := something.
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   894
!
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   895
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   896
stop
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   897
    ^ stop
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   898
!
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   899
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   900
stop:something
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   901
    stop := something.
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   902
! !
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   903
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   904
!HGCommand::log methodsFor:'private'!
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   905
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   906
argumentsCommandOn:stream
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   907
    "Called to get command specific options"
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   908
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   909
    | template |
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   910
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   911
    path isNil ifTrue:[
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   912
        stream nextPut:'--rev'.
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   913
        start isNil ifTrue:[
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   914
            self error:'No start revision given'.
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   915
        ].
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   916
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   917
        stop notNil ifTrue:[
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   918
            stream nextPut:(start printString , ':' , stop printString)
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   919
        ] ifFalse:[
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   920
            stream nextPut:start
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   921
        ].
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   922
        template := HGCommandParser templateLog.
40
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   923
    ] ifFalse:[
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   924
        stream nextPut: '--follow'.
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   925
        template := HGCommandParser templateLogFile.
40
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   926
    ].
e3699c0b00f9 Baisc support for changesets (revision log)
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 39
diff changeset
   927
137
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   928
    childrenOnly == true ifTrue:[
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   929
        template := HGCommandParser templateLogChildren.
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   930
    ].
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   931
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   932
    stream 
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   933
        nextPut:'--debug';
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   934
        nextPut:'--template';
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   935
        nextPut:template.
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   936
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   937
    path notNil ifTrue:[
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   938
        stream nextPut: path.
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   939
    ].
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   940
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   941
    "Created: / 13-11-2012 / 09:05:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
137
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   942
    "Modified: / 05-12-2012 / 23:51:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   943
!
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   944
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   945
parse: stream
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   946
    "Parses output of 'hg' command, i.e. commit, log, update, checkout, 
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   947
     etc."
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   948
137
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   949
    childrenOnly == true ifTrue:[
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   950
        ^(HGCommandParser on: stream) parseCommandLogChildren.
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   951
    ].
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   952
136
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   953
    ^path isNil ifTrue:[
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   954
        (HGCommandParser on: stream) parseCommandLog
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   955
    ] ifFalse:[
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   956
        (HGCommandParser on: stream) parseCommandLogFile
2d1512dde043 Added HGWorkingCopyFile>>revisions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 126
diff changeset
   957
    ]
39
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   958
10e693b3e034 - Support for commit
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 38
diff changeset
   959
    "Created: / 13-11-2012 / 09:05:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
137
379bd934f8d0 Make HGChangeset>>children dynamic.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 136
diff changeset
   960
    "Modified: / 05-12-2012 / 23:51:29 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   961
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   962
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   963
!HGCommand::mv methodsFor:'accessing'!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   964
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   965
destination
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   966
    ^ destination
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   967
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   968
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   969
destination:something
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   970
    destination := something.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   971
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   972
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   973
source
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   974
    ^ source
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   975
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   976
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   977
source:something
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   978
    source := something.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   979
! !
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   980
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   981
!HGCommand::mv methodsFor:'private'!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   982
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   983
argumentsCommandOn:stream
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   984
    "Called to get command specific options"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   985
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   986
    source isNil ifTrue:[
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   987
        self error:'No source'
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   988
    ].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   989
    source asFilename exists ifFalse:[
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   990
        self error:('(Source does not exist (%1)' bindWith: source)
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   991
    ].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   992
    destination isNil ifTrue:[
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   993
        self error:'No destination'
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   994
    ].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   995
    stream nextPut: source asString; nextPut: destination.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   996
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   997
    "Created: / 15-11-2012 / 00:21:05 / 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: 52
diff changeset
   998
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
   999
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1000
parse:stream
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1001
    "Parses output of 'hg' command, i.e. commit, log, update, checkout, 
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1002
     etc."
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1003
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1004
    ^ nil
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1005
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1006
    "Modified: / 15-11-2012 / 00:38: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: 52
diff changeset
  1007
! !
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1008
57
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1009
!HGCommand::pull methodsFor:'private'!
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1010
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1011
argumentsCommandOn:stream
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1012
    "Called to get command specific options"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1013
57
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1014
    url notNil ifTrue:[
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1015
        stream nextPut: url.
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1016
    ].
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1017
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1018
    "Created: / 30-09-2012 / 23:44:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1019
    "Modified: / 15-11-2012 / 09:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1020
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1021
57
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1022
parse:stream
63
77b0d42eebd0 Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 61
diff changeset
  1023
    "superclass HGCommand says that I am responsible to implement this method"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1024
57
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1025
    ^ nil
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1026
57
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1027
    "Modified: / 15-11-2012 / 09:53:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1028
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1029
107
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1030
!HGCommand::push methodsFor:'accessing'!
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1031
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1032
force
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1033
    ^ force
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1034
!
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1035
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1036
force:something
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1037
    force := something.
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1038
!
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1039
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1040
url
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1041
    ^ url
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1042
!
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1043
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1044
url:something
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1045
    url := something.
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1046
! !
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1047
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1048
!HGCommand::push methodsFor:'private'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1049
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1050
argumentsCommandOn:stream
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1051
    "Called to get command specific options"
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1052
57
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1053
    url notNil ifTrue:[
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1054
        stream nextPut: url.
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1055
    ].
107
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1056
    force == true ifTrue:[
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1057
        stream nextPut:'--force'
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1058
    ]
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1059
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1060
    "Created: / 30-09-2012 / 23:44:01 / Jan Vrany <jan.vrany@fit.cvut.cz>"
107
c92f7674485e Fixed test StXTests>>test_commit_03c
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 106
diff changeset
  1061
    "Modified: / 27-11-2012 / 21:55:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1062
!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1063
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1064
parse:stream
63
77b0d42eebd0 Removed last bits of Git, hopefully
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 61
diff changeset
  1065
    "superclass HGCommand says that I am responsible to implement this method"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1066
57
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1067
    ^ nil
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1068
57
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1069
    "Modified: / 15-11-2012 / 09:53:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
  1070
!
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
  1071
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
  1072
status: status result: result
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
  1073
    "Called when hg command finishes, passing it's status and result from parser"
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
  1074
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
  1075
    (status code ~~ 0 and:[status code ~~ 1]) ifTrue:[
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
  1076
        HGCommandError raiseErrorString: ('hg command failed (status %1)' expandMacrosWith: status code) .
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
  1077
    ].
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
  1078
    ^result
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
  1079
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 57
diff changeset
  1080
    "Created: / 15-11-2012 / 17:06:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1081
! !
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1082
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1083
!HGCommand::remove methodsFor:'accessing'!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1084
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1085
paths
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1086
    ^ paths
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1087
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1088
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1089
paths:something
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1090
    paths := something.
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1091
! !
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1092
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1093
!HGCommand::remove methodsFor:'private'!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1094
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1095
argumentsCommandOn:stream
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1096
    "Called to get command specific options"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1097
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1098
    paths isEmptyOrNil ifTrue:[
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1099
        self error: 'No paths given'
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1100
    ].
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1101
    stream nextPutAll: paths
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1102
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1103
    "Created: / 15-11-2012 / 00:05:46 / 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: 52
diff changeset
  1104
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1105
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1106
parse:stream
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1107
    "Parses output of 'hg' command, i.e. commit, log, update, checkout, 
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1108
     etc."
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1109
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1110
    ^ nil
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1111
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1112
    "Modified: / 15-11-2012 / 00:38:52 / 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: 52
diff changeset
  1113
! !
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1114
36
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1115
!HGCommand::status methodsFor:'accessing'!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1116
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1117
path
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1118
    ^ path
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1119
!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1120
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1121
path:aString
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1122
    path := aString.
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1123
! !
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1124
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1125
!HGCommand::status methodsFor:'private'!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1126
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1127
argumentsCommandOn:stream
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1128
    "Called to get command specific options"
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1129
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1130
    stream nextPut:'-A'.
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1131
    path notNil ifTrue:[stream nextPut: path]
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1132
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1133
    "Created: / 23-10-2012 / 11:09:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1134
!
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1135
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1136
parse:stream
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1137
    ^(HGCommandParser on: stream) parseCommandStatus
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1138
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1139
    "Modified: / 23-10-2012 / 11:07:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1140
! !
41cb88196e69 - HGTests
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 34
diff changeset
  1141
88
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1142
!HGCommand::update methodsFor:'accessing'!
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1143
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1144
revision
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1145
    ^ revision
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1146
!
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1147
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1148
revision:something
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1149
    revision := something.
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1150
! !
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1151
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1152
!HGCommand::update methodsFor:'private'!
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1153
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1154
argumentsCommandOn:stream
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1155
    "Called to get command specific options"
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1156
102
16bc16d9e6d5 Update logical revision on commit,
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
  1157
    revision notNil ifTrue:[
88
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1158
        stream nextPut:'--rev'; nextPut: revision asString.
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1159
    ].
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1160
102
16bc16d9e6d5 Update logical revision on commit,
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 95
diff changeset
  1161
    "Modified: / 23-11-2012 / 23:08:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
88
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1162
!
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1163
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1164
parse:stream
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1165
    "Parses output of 'hg' command, i.e. commit, log, update, checkout, 
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1166
     etc."
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1167
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1168
    ^ nil
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1169
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1170
    "Modified: / 21-11-2012 / 00:19:22 / Jan Vrany <jan.vrany@fit.cvut.cz>"
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1171
! !
1ad71a063a20 Bunch of fixes.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 82
diff changeset
  1172
80
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1173
!HGCommand::version methodsFor:'private'!
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1174
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1175
arguments
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1176
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1177
    ^ Array with: HGExecutable with: '--version'
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1178
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1179
    "Created: / 19-11-2012 / 20:01:15 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1180
!
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1181
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1182
parse: stream
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1183
    "Parses output of 'hg' command, i.e. commit, log, update, checkout, 
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1184
     etc."
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1185
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1186
    ^(HGCommandParser on: stream) parseCommandVersion
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1187
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1188
    "Created: / 19-11-2012 / 20:02:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1189
! !
8f300696b26b Added configurable path to 'hg' command.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 78
diff changeset
  1190
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1191
!HGCommand class methodsFor:'documentation'!
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1192
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1193
version_HG
115
b1ed2d29054b version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 109
diff changeset
  1194
b1ed2d29054b version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 109
diff changeset
  1195
    ^ '$Changeset: <not expanded> $'
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1196
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 52
diff changeset
  1197
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1198
version_SVN
57
47b14a8b7eb8 Some hacks to make basic Mercurial commit working
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
  1199
    ^ '§Id::                                                                                                                        §'
34
0ef61b36cfa7 - First bits
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
  1200
! !
38
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
  1201
c3d02ed6a645 - HGWorkingCopyFile
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 37
diff changeset
  1202
HGCommand initialize!