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