mercurial/HGCommitTask.st
author Jan Vrany <jan.vrany@fit.cvut.cz>
Fri, 08 Mar 2013 20:23:20 +0000
branchhg-command-server-support
changeset 248 b1a6ab0c86a1
parent 210 54a73fa50d40
child 282 fb71143ed353
permissions -rw-r--r--
Fixes in commit dialog (warning about commiting new head) Warnin about new head is not shown when commiting to a fresh repository or to a fresh branch, even though in fact a new hade will be created.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
     1
"
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
     2
 COPYRIGHT (c) 2012-2013 by Jan Vrany
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
     3
              All Rights Reserved
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
     4
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
     5
 This software is furnished under a license and may be used
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
     6
 only in accordance with the terms of that license and with the
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
     8
 be provided or otherwise made available to, or used by, any
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
     9
 other person.  No title to or ownership of the software is
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    10
 hereby transferred.
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    11
"
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    12
"{ Package: 'stx:libscm/mercurial' }"
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    13
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    14
SCMAbstractCommitTask subclass:#HGCommitTask
152
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    15
	instanceVariableNames:'author remote branch'
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    16
	classVariableNames:''
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    17
	poolDictionaries:''
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    18
	category:'SCM-Mercurial-StX-Tasks'
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    19
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    20
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    21
!HGCommitTask class methodsFor:'documentation'!
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    22
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    23
copyright
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    24
"
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    25
 COPYRIGHT (c) 2012-2013 by Jan Vrany
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    26
              All Rights Reserved
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    27
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    28
 This software is furnished under a license and may be used
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    29
 only in accordance with the terms of that license and with the
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    31
 be provided or otherwise made available to, or used by, any
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    32
 other person.  No title to or ownership of the software is
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    33
 hereby transferred.
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    34
"
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
    35
! !
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
    36
146
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    37
!HGCommitTask methodsFor:'accessing'!
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    38
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    39
author
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    40
    ^author isNil ifTrue:[
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    41
        | a |     
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    42
        a := HGAuthorQuery query.
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    43
        a isNil ifTrue:[
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    44
            a := package repository config get:#(ui username) default: nil
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    45
        ].
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    46
        a
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    47
    ] ifFalse:[
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    48
        author
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    49
    ]
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    50
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    51
    "Modified: / 07-12-2012 / 16:17:02 / jv"
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    52
!
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    53
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    54
author:aString
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    55
    author := aString.
151
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    56
!
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    57
152
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    58
branch
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    59
    ^ branch
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    60
!
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    61
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    62
branch:aString
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    63
    branch := aString.
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    64
!
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    65
151
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    66
remote
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    67
    ^ remote
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    68
!
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    69
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    70
remote:something
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    71
    remote := something.
146
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    72
! !
1015b8f6dc1c Added check for author signature before commit.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 118
diff changeset
    73
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    74
!HGCommitTask methodsFor:'executing'!
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    75
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    76
doCommit: msg files: containers
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    77
    "Actually commit the changes, To be overridden by subclasses"
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    78
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
    79
    self synchronized:[    
153
442c60f78aec Bugfix HGCommitTask>>doCommit:files: - allow commit into same branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 152
diff changeset
    80
        | wc createBranch |
151
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    81
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    82
        wc := self package temporaryWorkingCopy.
153
442c60f78aec Bugfix HGCommitTask>>doCommit:files: - allow commit into same branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 152
diff changeset
    83
        createBranch := branch notNil and:[branch ~= wc branch name].
442c60f78aec Bugfix HGCommitTask>>doCommit:files: - allow commit into same branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 152
diff changeset
    84
442c60f78aec Bugfix HGCommitTask>>doCommit:files: - allow commit into same branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 152
diff changeset
    85
        createBranch ifTrue:[
152
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    86
            (self package repository branches contains:[:b|b name = branch]) ifTrue:[
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    87
                HGCommitError raiseErrorString: 'Commiting to an existing branch is not allowed'.
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    88
                ^self.
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    89
            ].
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    90
            wc branch: branch.
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    91
        ].
151
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    92
        wc commit: msg files: containers author: self author.
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    93
        wc repository push: nil force: true.
527a1e85aef8 Support for 'autopush' in commit dialog.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 146
diff changeset
    94
        remote notNil ifTrue:[
158
591092ed5641 Bugfix in HGCommitTask>>doCommit:files: (pass remote name as string)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 156
diff changeset
    95
            self package repository push: remote name force: false.
152
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    96
        ].
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    97
        "/Also, mark original (package) working copy as given branch
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
    98
        "/so subsequent 'hg update' will update from that branch
153
442c60f78aec Bugfix HGCommitTask>>doCommit:files: - allow commit into same branch
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 152
diff changeset
    99
        createBranch ifTrue:[
156
725d8bc65e48 Bugfix in HGCommit tast (committing into a new branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 153
diff changeset
   100
            self package repository workingCopy branch: branch.
152
9068fe7a5795 Support for commiting to a new branch.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 151
diff changeset
   101
        ].
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   102
    ].
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   103
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   104
    "Created: / 15-11-2012 / 16:52:47 / Jan Vrany <jan.vrany@fit.cvut.cz>"
156
725d8bc65e48 Bugfix in HGCommit tast (committing into a new branch)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 153
diff changeset
   105
    "Modified: / 10-12-2012 / 11:19:45 / Jan Vrany <jan.vrany@fit.cvut.cz>"
158
591092ed5641 Bugfix in HGCommitTask>>doCommit:files: (pass remote name as string)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 156
diff changeset
   106
    "Modified: / 10-12-2012 / 10:53:14 / jv"
111
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   107
!
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   108
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   109
doPrepareWorkingCopy2
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   110
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   111
    self isPackageCommit ifTrue:[
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   112
        self do:[
118
5a8b78ad48ae Refactoring (part 2): Rename SCMAbstractPackageModel>>workingCopy to temporaryWorkingCopy
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 115
diff changeset
   113
            self package ensureTemporaryWorkingCopyAtRevision:self package revision.
111
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   114
            self doFileOut
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   115
        ]
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   116
    ].
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   117
6439af30a24b Fix in temporary working copy update.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 107
diff changeset
   118
    "Created: / 28-11-2012 / 09:42:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   119
! !
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   120
248
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   121
!HGCommitTask methodsFor:'queries'!
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   122
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   123
commitingNewHead
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   124
    "Return true, if a new head is to be commited, false otherwise.
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   125
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   126
     !!!!!!NOTE!!!!!!
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   127
     When there is no head at all such as when commiting to a fresh repository
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   128
     or into a just-created branch, this method returns FALSE.
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   129
     "
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   130
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   131
    | heads changeset |
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   132
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   133
    heads := self package temporaryWorkingCopy heads.
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   134
    heads isEmpty ifTrue:[ ^ false ].
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   135
    changeset := self package temporaryWorkingCopy changeset.
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   136
    ^(heads includes: changeset) not
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   137
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   138
    "Created: / 08-03-2013 / 20:11:50 / Jan Vrany <jan.vrany@fit.cvut.cz>"
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   139
! !
b1a6ab0c86a1 Fixes in commit dialog (warning about commiting new head)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 210
diff changeset
   140
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   141
!HGCommitTask class methodsFor:'documentation'!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   142
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   143
version_HG
115
b1ed2d29054b version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   144
b1ed2d29054b version_HG changed to return string.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 111
diff changeset
   145
    ^ '$Changeset: <not expanded> $'
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   146
!
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   147
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   148
version_SVN
61
fd129d0c603e Fixes in committing
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents: 54
diff changeset
   149
    ^ '§Id::                                                                                                                        §'
54
66045198bfbc More changes towards self hosting. Some work on model is still missing...
vranyj1@bd9d3459-6c23-4dd9-91de-98eeebb81177
parents:
diff changeset
   150
! !
210
54a73fa50d40 Added copyright notice.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents: 158
diff changeset
   151