# HG changeset patch # User Jan Vrany # Date 1354093958 0 # Node ID 08c6eca6df254dcee1957d064a95fa9455c10c79 # Parent c92f7674485eee5dbe1308bf62896d123fb6cd6b Added warning about commiting new head to HGCommitDialog. diff -r c92f7674485e -r 08c6eca6df25 mercurial/HGCommand.st --- a/mercurial/HGCommand.st Tue Nov 27 22:17:24 2012 +0000 +++ b/mercurial/HGCommand.st Wed Nov 28 09:12:38 2012 +0000 @@ -315,6 +315,12 @@ "Created: / 15-11-2012 / 00:22:16 / Jan Vrany " ! +pull + ^pull new + + "Created: / 27-11-2012 / 23:30:09 / Jan Vrany " +! + push ^push new diff -r c92f7674485e -r 08c6eca6df25 mercurial/HGCommitDialog.st --- a/mercurial/HGCommitDialog.st Tue Nov 27 22:17:24 2012 +0000 +++ b/mercurial/HGCommitDialog.st Wed Nov 28 09:12:38 2012 +0000 @@ -154,6 +154,27 @@ "Modified: / 16-11-2012 / 11:27:35 / Jan Vrany " ! ! +!HGCommitDialog methodsFor:'private'! + +doUpdateWorkingCopy + | heads changeset | + + super doUpdateWorkingCopy. + heads := self task package workingCopy heads. + changeset := self task package workingCopy changeset. + (heads includes: changeset) ifFalse:[ + self infoPanel + reset; + beInformation; + message: (self resources string:'Comitting a new head.'); + addButtonWithLabel: (self resources string:'Proceed') action: [self infoPanel hide]; + addButtonWithLabel: (self resources string:'Cancel') action:[self doCancel]; + show. + ] + + "Created: / 27-11-2012 / 23:36:17 / Jan Vrany " +! ! + !HGCommitDialog class methodsFor:'documentation'! version_HG diff -r c92f7674485e -r 08c6eca6df25 mercurial/HGPackageModel.st --- a/mercurial/HGPackageModel.st Tue Nov 27 22:17:24 2012 +0000 +++ b/mercurial/HGPackageModel.st Wed Nov 28 09:12:38 2012 +0000 @@ -29,6 +29,16 @@ ^wc repository "Created: / 15-11-2012 / 09:47:37 / Jan Vrany " +! + +upstreamRepository + "Returns original package repository (not the temporary repository)" + + "Stupid naming here..." + + ^repository + + "Created: / 27-11-2012 / 23:22:22 / Jan Vrany " ! ! !HGPackageModel methodsFor:'accessing-classes'! @@ -71,24 +81,30 @@ ensureWorkingCopy "raise an error: must be redefined in concrete subclass(es)" - | tmpPath tmpRepo tmpWc | + | rev tmpPath tmpRepo tmpWc | - (wc notNil and:[wc path exists]) ifTrue:[ ^ self ]. + rev := self definition hgLogicalRevision. + (wc notNil and:[wc path exists]) ifTrue:[ + wc changeset id ~= rev ifTrue:[ + wc update:rev. + ]. + ^ self + ]. tmpPath := self manager temporaryWorkingCopyDirectory / repository uuid printString. tmpPath exists ifTrue:[ tmpRepo := HGRepository on: tmpPath. - tmpWc := tmpRepo workingCopy. + tmpRepo pull. ] ifFalse:[ tmpRepo := repository cloneTo: tmpPath update: false. - tmpWc := tmpRepo workingCopy. - tmpWc update: self definition hgLogicalRevision. ]. + tmpWc := tmpRepo workingCopy. + tmpWc update: rev. self wc: tmpWc "Created: / 14-11-2012 / 00:16:59 / Jan Vrany " - "Modified: / 21-11-2012 / 00:37:55 / Jan Vrany " + "Modified: / 27-11-2012 / 23:44:48 / Jan Vrany " ! ! !HGPackageModel class methodsFor:'documentation'! diff -r c92f7674485e -r 08c6eca6df25 mercurial/abbrev.stc --- a/mercurial/abbrev.stc Tue Nov 27 22:17:24 2012 +0000 +++ b/mercurial/abbrev.stc Wed Nov 28 09:12:38 2012 +0000 @@ -14,9 +14,9 @@ HGWorkingCopy HGWorkingCopy stx:libscm/mercurial 'SCM-Mercurial-Core' 0 HGChangesetId HGChangesetId stx:libscm/mercurial 'SCM-Mercurial-Core' 0 HGStatus HGStatus stx:libscm/mercurial 'SCM-Mercurial-Core' 1 -HGError HGError stx:libscm/mercurial 'SCM-Mercurial-Exceptions' 1 +HGError HGError stx:libscm/mercurial 'SCM-Mercurial-Core' 1 HGRepositoryError HGRepositoryError stx:libscm/mercurial 'SCM-Mercurial-Exceptions' 1 -HGCommandError HGCommandError stx:libscm/mercurial 'SCM-Mercurial-Exceptions' 1 +HGCommandError HGCommandError stx:libscm/mercurial 'SCM-Mercurial-Core' 1 HGCommandParserTests HGCommandParserTests stx:libscm/mercurial 'SCM-Mercurial-Tests' 1 HGChangeset HGChangeset stx:libscm/mercurial 'SCM-Mercurial-Core' 0 HGPackageModel HGPackageModel stx:libscm/mercurial 'SCM-Mercurial-StX' 0 diff -r c92f7674485e -r 08c6eca6df25 mercurial/mercurial.rc --- a/mercurial/mercurial.rc Tue Nov 27 22:17:24 2012 +0000 +++ b/mercurial/mercurial.rc Wed Nov 28 09:12:38 2012 +0000 @@ -25,7 +25,7 @@ VALUE "LegalCopyright", "Copyright Jan Vrany 2012\0" VALUE "ProductName", "Smalltalk/X Mercurial Integration\0" VALUE "ProductVersion", "6.2.3.1\0" - VALUE "ProductDate", "Tue, 27 Nov 2012 22:16:38 GMT\0" + VALUE "ProductDate", "Tue, 27 Nov 2012 23:46:46 GMT\0" END END