GitSourceCodeManagementSettingsAppl.st
changeset 11336 a4110fb91ff0
child 11349 262bbfc637ca
equal deleted inserted replaced
11335:e8f40489e5ca 11336:a4110fb91ff0
       
     1 "
       
     2  COPYRIGHT (c) 2012 by eXept Software AG
       
     3               All Rights Reserved
       
     4 
       
     5  This software is furnished under a license and may be used
       
     6  only in accordance with the terms of that license and with the
       
     7  inclusion of the above copyright notice.   This software may not
       
     8  be provided or otherwise made available to, or used by, any
       
     9  other person.  No title to or ownership of the software is
       
    10  hereby transferred.
       
    11 "
       
    12 "{ Package: 'stx:libtool' }"
       
    13 
       
    14 AbstractSourceCodeManagementSettingsAppl subclass:#GitSourceCodeManagementSettingsAppl
       
    15 	instanceVariableNames:'repositoryHolder manager repository repositoryPrototypeList
       
    16 		addPerModuleRepository removePerModuleRepository
       
    17 		perModuleRepository defaultRepositoryHolder
       
    18 		selectedPerModuleRepository repositoriesPerModule
       
    19 		perModuleRepositoryModule gitBinDirectoryHolder
       
    20 		gitExecutableHolder gitCommandTimeoutHolder'
       
    21 	classVariableNames:'RecentlyUsedRepositoryURLS'
       
    22 	poolDictionaries:''
       
    23 	category:'System-SourceCodeManagement'
       
    24 !
       
    25 
       
    26 !GitSourceCodeManagementSettingsAppl class methodsFor:'documentation'!
       
    27 
       
    28 copyright
       
    29 "
       
    30  COPYRIGHT (c) 2012 by eXept Software AG
       
    31               All Rights Reserved
       
    32 
       
    33  This software is furnished under a license and may be used
       
    34  only in accordance with the terms of that license and with the
       
    35  inclusion of the above copyright notice.   This software may not
       
    36  be provided or otherwise made available to, or used by, any
       
    37  other person.  No title to or ownership of the software is
       
    38  hereby transferred.
       
    39 "
       
    40 !
       
    41 
       
    42 documentation
       
    43 "
       
    44     Git part of the source code settings. 
       
    45     This settings app controls the parameters of the GitSourceCodeManager.
       
    46 
       
    47     Extracted for pluggability from SourceCodeManagerSettings in the AbstractSettingsApplication.
       
    48 "
       
    49 ! !
       
    50 
       
    51 !GitSourceCodeManagementSettingsAppl class methodsFor:'defaults'!
       
    52 
       
    53 defaultRepositoryName
       
    54 
       
    55     ^ ''
       
    56 
       
    57     "Created: / 19-04-2011 / 11:00:11 / cg"
       
    58 ! !
       
    59 
       
    60 !GitSourceCodeManagementSettingsAppl class methodsFor:'help specs'!
       
    61 
       
    62 helpSpec
       
    63     "This resource specification was automatically generated
       
    64      by the UIHelpTool of ST/X."
       
    65 
       
    66     "Do not manually edit this!! If it is corrupted,
       
    67      the UIHelpTool may not be able to read the specification."
       
    68 
       
    69     "
       
    70      UIHelpTool openOnClass:GitSourceCodeManagementSettingsAppl    
       
    71     "
       
    72 
       
    73     <resource: #help>
       
    74 
       
    75     ^ super helpSpec addPairsFrom:#(
       
    76 
       
    77 #addPerModuleRoot
       
    78 'Add this per-module entry'
       
    79 
       
    80 #addPerPackageManager
       
    81 'Add a new per-package manager definition'
       
    82 
       
    83 #browseSourceCache
       
    84 'Open a file browser on the source cache directory'
       
    85 
       
    86 #checkPerPackageManager
       
    87 'Open a window to show which scm-manager is responsible for which package.'
       
    88 
       
    89 #condenseSourceCache
       
    90 'Cleanup old cached versions from the source cache.\Will keep only the current (newest) version in the cache.\Access to older code versions will be slowed down (compare with old version browser function)'
       
    91 
       
    92 #cvsCommand
       
    93 'The command to use for cvs operations\(the path to "cvs"/"cvs.exe"-command. Not needed, if already in the shell''s PATH value)'
       
    94 
       
    95 #cvsCommandTimeout
       
    96 'The command timeout.\For slow connections (ssl-tunnel), it may make sense to increase this value.'
       
    97 
       
    98 #cvsLogin
       
    99 'Perform a "cvs login" operation for the default CVSROOT'
       
   100 
       
   101 #cvsRootDefault
       
   102 'The default CVSROOT.\This will be used for all modules which are not listed below.'
       
   103 
       
   104 #cvsRootPerModule
       
   105 'Specifies per-module CVSROOTs.\This allows for individual projects to be stored in different cvs repositories.'
       
   106 
       
   107 #cvsRootPerModuleModule
       
   108 'The module for which a specific CVSROOT is defined'
       
   109 
       
   110 #cvsRootPerModuleRoot
       
   111 'The CVSROOT for which this specific module is defined'
       
   112 
       
   113 #defaultManagerType
       
   114 'The default repository type.\This is used for packages for which no entry matches in the list below'
       
   115 
       
   116 #editPerPackageManager
       
   117 'Modify the selected per-package manager definition'
       
   118 
       
   119 #flushSourceCache
       
   120 'Remove all files from the source cache.\Access to source code will temporarily be slowed down,\until sources have been refetched from the repository'
       
   121 
       
   122 #hgAddPushURL
       
   123 'Add a repository to the push-URL list. A repository-push operation will synchronize your changes with this repository as well'
       
   124 
       
   125 #hgCheckAccess
       
   126 'Perform a "hg status" command in the default repository to see if the repository is accessable'
       
   127 
       
   128 #hgCheckAccessPerModuleRoot
       
   129 'Perform a "hg status" command in this module''s repository to see if the repository is accessable'
       
   130 
       
   131 #hgCommand
       
   132 'The command to use for git operations\(the path to "hg"/"hg.exe"-command. Not needed, if already in the shell''s PATH value)'
       
   133 
       
   134 #hgCommandTimeout
       
   135 'The command timeout.\For slow connections (ssl-tunnel), it may make sense to increase this value.'
       
   136 
       
   137 #hgInit
       
   138 'Perform a "hg init" command to setup the repository for the very first time'
       
   139 
       
   140 #hgPushURLs
       
   141 'The push-URL list. A repository-push operation will send your changes to these repositories as well'
       
   142 
       
   143 #hgRemovePushURL
       
   144 'Remove the selected repository from the push-URL list. A repository-push operation will no longer synchronize your changes with this repository'
       
   145 
       
   146 #hgRootDefault
       
   147 'The default git repository.\This will be used for all modules which are not listed below.'
       
   148 
       
   149 #hgRootPerModule
       
   150 'The git repository for which this specific module is defined'
       
   151 
       
   152 #hgRootPerModuleModule
       
   153 'The module for which a specific git repository is defined'
       
   154 
       
   155 #hgRootPerModuleRoot
       
   156 'The git repository for which this specific module is defined'
       
   157 
       
   158 #loginPerModuleRoot
       
   159 'Execute a "cvs login" operation for this CVSROOT'
       
   160 
       
   161 #moveManagerDown
       
   162 'Move the selected entry down in the list.\(The first matching definition is used to determine which repository type is used.)'
       
   163 
       
   164 #moveManagerUp
       
   165 'Move the selected entry up in the list.\(The first matching definition is used to determine which repository type is used.)'
       
   166 
       
   167 #perPackageConfiguration
       
   168 'Define per-package repository types here.\For any non-matching package-id, the default repository type is used.'
       
   169 
       
   170 #removePerModuleRoot
       
   171 'Remove this per-module entry'
       
   172 
       
   173 #removePerPackageManager
       
   174 'Remove the selected per-package manager definition'
       
   175 
       
   176 #sourceCache
       
   177 'After checkout, keep the sourcefile in a local file (to avoid repeated checkout of the same file)'
       
   178 
       
   179 #useLocalSources
       
   180 'If present, use the local source files (from the development system''s tree).\If checkout fails, these will always be tried as second chance.'
       
   181 
       
   182 #useManager
       
   183 'Enable source code management.\If off, all queries for sourcecode are resolved by local files (offline operation)'
       
   184 
       
   185 #verboseSourceCodeAccess
       
   186 'Output debugging messages on the Transcript\(mostly traces of the underlying scm mechanism, such as cvs commands)'
       
   187 
       
   188 )
       
   189 
       
   190     "Modified (comment): / 02-03-2012 / 15:21:13 / cg"
       
   191 ! !
       
   192 
       
   193 !GitSourceCodeManagementSettingsAppl class methodsFor:'image specs'!
       
   194 
       
   195 defaultIcon
       
   196     ^ self defaultIcon2
       
   197 
       
   198     "Created: / 22-12-2011 / 13:47:11 / cg"
       
   199 !
       
   200 
       
   201 defaultIcon1
       
   202     "This resource specification was automatically generated
       
   203      by the ImageEditor of ST/X."
       
   204 
       
   205     "Do not manually edit this!! If it is corrupted,
       
   206      the ImageEditor may not be able to read the specification."
       
   207 
       
   208     "
       
   209      self defaultIcon1 inspect
       
   210      ImageEditor openOnClass:self andSelector:#defaultIcon1
       
   211      Icon flushCachedIcons
       
   212     "
       
   213 
       
   214     <resource: #image>
       
   215 
       
   216     ^Icon
       
   217         constantNamed:'GitSourceCodeManagementSettingsAppl class defaultIcon1'
       
   218         ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
       
   219 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   220 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@CT5MST5MP@5MST5MST@MST5MST5MP@@@CT5MST5MP@5MST5MST@MST5MST5MP@@@CT5MST5MP@5MST5
       
   221 MST@MST5MST5@@@@@CT5MST5MP@5MST5MST@MST5MST5@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   222 @@@@@@@@@@@@@@@@@@@@@@@@@@@@M#X@@@@@@CX6@@@@@@@6M#X@@@@@@@@@M#X@@@@@@CX6@@@@@@@6M#X@@@@@@CX6M#X6M @6M#X6M#X@M#X6M#X6M @@
       
   223 @CX6M#X6M @6M#X6M#X@M#X6M#X6M @@@@@@M#X@@@@@@CX6@@@@@@@6M#X@@@@@@@@@M#X@@@@@@CX6@@@@@@@6M#X@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   224 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
       
   225 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[143 136 136 208 208 208 192 192 184 176 176 176 175 168 168 176 168 168 191 184 184 191 176 176 159 152 144 160 160 160 239 232 224 192 184 184 159 152 160 207 192 200 207 200 200 144 144 144 224 224 224 160 152 160 127 120 120 144 144 136 128 128 128 111 104 104 207 200 208 239 232 240 95 88 88 96 96 96 79 72 80 112 112 120 192 192 200 223 208 208 111 104 96 80 80 80 64 64 64 223 216 216 128 120 128 31 24 24 32 32 24 79 72 64 64 56 56 47 40 40 240 240 240 239 224 224 63 48 48 191 184 176 112 112 104 64 64 56 63 56 56 48 48 48 48 40 48 127 112 120 160 160 168 208 200 208 224 224 216 192 0 0 0 128 0]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@@@@@@@@@@@@@@@@@@@@_/78_/78@@@@@@@@@@@@FCA FCA _/78_/78FCA FCA @@@@@@@@@@@@@@@@@@@@@@@@') ; yourself); yourself]
       
   226 !
       
   227 
       
   228 defaultIcon2
       
   229     "This resource specification was automatically generated
       
   230      by the ImageEditor of ST/X."
       
   231 
       
   232     "Do not manually edit this!! If it is corrupted,
       
   233      the ImageEditor may not be able to read the specification."
       
   234 
       
   235     "
       
   236      self defaultIcon2 inspect
       
   237      ImageEditor openOnClass:self andSelector:#defaultIcon2
       
   238      Icon flushCachedIcons
       
   239     "
       
   240 
       
   241     <resource: #image>
       
   242 
       
   243     ^Icon
       
   244         constantNamed:'GitSourceCodeManagementSettingsAppl class defaultIcon2'
       
   245         ifAbsentPut:[(Depth8Image new) width: 24; height: 24; photometric:(#palette); bitsPerSample:(#[8]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'
       
   246 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@CP4MCP4@CP4MCP4@CP4MCP4@@@@@@@@@C 8NC 8@C 8NC 8@
       
   247 C 8NC 8@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@,B@@@@@@,B@@@@@@,B@@@@@@@@@@@@@@,BB0,@
       
   248 @@,BB0,@@@,BB0,@@@@@@@@@@ HB@ H@@ HB@ H@@ HB@ H@@@@@@@@@B0,BB0H@B0,BB0H@B0,BB0H@@@@@@@@@B0,BB0@@B0,BB0@@B0,BB0@@@@@@@@@@
       
   249 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@HB@TEC0@@@@@@@@@@@@@@@@@@@@@@@@THB@ HAP@@@@@@@@@@@@@@@@@@@@@@@P H@@<@@@T@@@@@@@@@@@@@@@@@
       
   250 @@@@AP,E@@@@@@@@@@@@@@@@@@@@@@@@@@TEB@\HA @@BP@@@@@@@@@@@@@@@@@@@@@EA0 E@@@IBP$@@@@@@@@@@@@@@@@@@@@@APP@@@$C@00I@@@@@@@@
       
   251 @@@@@@@@@@@@@@@@@@@JBP$I@@@@@@@@@@@@@@@@@@@I@@<@@@@IBP@@@@@@@@@@@@@@@@@@@@@@BP$IBP$I@@@@@@@@@@@@@@@@@@@@@@@@@@(IBP$@@@@@
       
   252 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@') ; colorMapFromArray:#[0 0 0 0 64 0 0 128 0 32 32 32 32 64 32 32 96 32 32 128 32 32 128 64 32 160 64 64 64 64 96 96 96 96 192 128 128 128 128 192 0 0 209 87 87 255 255 255]; mask:((Depth1Image new) width: 24; height: 24; photometric:(#blackIs0); bitsPerSample:(#[1]); samplesPerPixel:(1); bits:(ByteArray fromPackedString:'@@@@@@@@@>>>@>>>@@@@@@@@@XXX@^^^@>>>@<<<@LLL@@@@A<@@C<@@GR@@G@@@_$@@ON@@F_@@@O@@JL@@G<@@C8@@@@@@') ; yourself); yourself]
       
   253 ! !
       
   254 
       
   255 !GitSourceCodeManagementSettingsAppl class methodsFor:'interface specs'!
       
   256 
       
   257 windowSpec
       
   258     "This resource specification was automatically generated
       
   259      by the UIPainter of ST/X."
       
   260 
       
   261     "Do not manually edit this!! If it is corrupted,
       
   262      the UIPainter may not be able to read the specification."
       
   263 
       
   264     "
       
   265      UIPainter new openOnClass:GitSourceCodeManagementSettingsAppl andSelector:#windowSpec
       
   266      GitSourceCodeManagementSettingsAppl new openInterface:#windowSpec
       
   267      GitSourceCodeManagementSettingsAppl open
       
   268     "
       
   269 
       
   270     <resource: #canvas>
       
   271 
       
   272     ^ 
       
   273      #(FullSpec
       
   274         name: windowSpec
       
   275         window: 
       
   276        (WindowSpec
       
   277           label: 'Git Settings'
       
   278           name: 'Git Settings'
       
   279           min: (Point 10 10)
       
   280           bounds: (Rectangle 0 0 811 693)
       
   281         )
       
   282         component: 
       
   283        (SpecCollection
       
   284           collection: (
       
   285            (VerticalPanelViewSpec
       
   286               name: 'VerticalPanel3'
       
   287               layout: (LayoutFrame 0 0 0 0 0 1 0 1)
       
   288               horizontalLayout: fit
       
   289               verticalLayout: topSpace
       
   290               horizontalSpace: 3
       
   291               verticalSpace: 4
       
   292               component: 
       
   293              (SpecCollection
       
   294                 collection: (
       
   295                  (ViewSpec
       
   296                     name: 'ManagerSetupBoxx'
       
   297                     component: 
       
   298                    (SpecCollection
       
   299                       collection: (
       
   300                        (FramedBoxSpec
       
   301                           label: 'Git Sourcecode Manager Settings'
       
   302                           name: 'GitSetupBox'
       
   303                           layout: (LayoutFrame 0 0 0 0 0 1 0 1)
       
   304                           labelPosition: topLeft
       
   305                           translateLabel: true
       
   306                           component: 
       
   307                          (SpecCollection
       
   308                             collection: (
       
   309                              (CheckBoxSpec
       
   310                                 label: 'Show in Browser Menus'
       
   311                                 name: 'CheckBox1'
       
   312                                 layout: (LayoutFrame 0 0 5 0 0 1 27 0)
       
   313                                 activeHelpKey: shownInBrowserMenus
       
   314                                 model: shownInBrowserMenusHolder
       
   315                                 translateLabel: true
       
   316                               )
       
   317                              (ViewSpec
       
   318                                 name: 'Box1'
       
   319                                 layout: (LayoutFrame 0 0 35 0 0 1 60 0)
       
   320                                 component: 
       
   321                                (SpecCollection
       
   322                                   collection: (
       
   323                                    (LabelSpec
       
   324                                       label: 'Git Command or Path:'
       
   325                                       name: 'Label1'
       
   326                                       layout: (LayoutFrame 0 0.0 0 0 60 0.25 22 0)
       
   327                                       activeHelpKey: hgCommand
       
   328                                       level: 0
       
   329                                       translateLabel: true
       
   330                                       adjust: right
       
   331                                     )
       
   332                                    (InputFieldSpec
       
   333                                       name: 'GitExecutableField'
       
   334                                       layout: (LayoutFrame 64 0.25 0 0 0 1 22 0)
       
   335                                       activeHelpKey: hgCommand
       
   336                                       tabable: true
       
   337                                       model: gitExecutableHolder
       
   338                                       acceptChannel: acceptChannel
       
   339                                       acceptOnPointerLeave: true
       
   340                                     )
       
   341                                    )
       
   342                                  
       
   343                                 )
       
   344                               )
       
   345                              (ViewSpec
       
   346                                 name: 'Box12'
       
   347                                 layout: (LayoutFrame 0 0 61 0 0 1 86 0)
       
   348                                 component: 
       
   349                                (SpecCollection
       
   350                                   collection: (
       
   351                                    (LabelSpec
       
   352                                       label: 'Git Command Timeout:'
       
   353                                       name: 'Label2'
       
   354                                       layout: (LayoutFrame 0 0.0 0 0 60 0.25 22 0)
       
   355                                       activeHelpKey: hgCommandTimeout
       
   356                                       level: 0
       
   357                                       translateLabel: true
       
   358                                       adjust: right
       
   359                                     )
       
   360                                    (InputFieldSpec
       
   361                                       name: 'EntryField1'
       
   362                                       layout: (LayoutFrame 64 0.25 0 0 168 0.25 22 0)
       
   363                                       activeHelpKey: hgCommandTimeout
       
   364                                       tabable: true
       
   365                                       model: gitCommandTimeoutHolder
       
   366                                       type: timeDuration
       
   367                                       acceptChannel: acceptChannel
       
   368                                       acceptOnPointerLeave: true
       
   369                                     )
       
   370                                    )
       
   371                                  
       
   372                                 )
       
   373                               )
       
   374                              (ViewSpec
       
   375                                 name: 'Box7'
       
   376                                 layout: (LayoutFrame 0 0.0 92 0 0 1 117 0)
       
   377                                 component: 
       
   378                                (SpecCollection
       
   379                                   collection: (
       
   380                                    (LabelSpec
       
   381                                       label: 'Default Repository:'
       
   382                                       name: 'defaultCvsRootLabel'
       
   383                                       layout: (LayoutFrame 0 0.0 2 0 60 0.25 24 0)
       
   384                                       activeHelpKey: hgRootDefault
       
   385                                       level: 0
       
   386                                       translateLabel: true
       
   387                                       adjust: right
       
   388                                     )
       
   389                                    (ComboBoxSpec
       
   390                                       name: 'RepositoryComboBox'
       
   391                                       layout: (LayoutFrame 64 0.25 2 0 0 1 24 0)
       
   392                                       activeHelpKey: hgRootDefault
       
   393                                       tabable: true
       
   394                                       model: repositoryHolder
       
   395                                       immediateAccept: true
       
   396                                       acceptOnLeave: true
       
   397                                       acceptOnReturn: true
       
   398                                       acceptOnTab: true
       
   399                                       acceptOnLostFocus: true
       
   400                                       acceptChannel: acceptChannel
       
   401                                       acceptOnPointerLeave: true
       
   402                                       comboList: repositoryPrototypeList
       
   403                                     )
       
   404                                    )
       
   405                                  
       
   406                                 )
       
   407                               )
       
   408                              (ActionButtonSpec
       
   409                                 label: 'Init'
       
   410                                 name: 'Button2'
       
   411                                 layout: (LayoutFrame -201 1 122 0 -101 1 144 0)
       
   412                                 activeHelpKey: hgInit
       
   413                                 translateLabel: true
       
   414                                 tabable: true
       
   415                                 model: initializeRepository
       
   416                                 enableChannel: cvsLoginEnabled
       
   417                               )
       
   418                              (ActionButtonSpec
       
   419                                 label: 'Check Access'
       
   420                                 name: 'Button1'
       
   421                                 layout: (LayoutFrame -100 1 122 0 0 1 144 0)
       
   422                                 activeHelpKey: hgCheckAccess
       
   423                                 translateLabel: true
       
   424                                 tabable: true
       
   425                                 model: checkAccess
       
   426                                 enableChannel: cvsLoginEnabled
       
   427                               )
       
   428                              (LabelSpec
       
   429                                 label: 'Repository per Module:'
       
   430                                 name: 'knownModulesLabel'
       
   431                                 layout: (LayoutFrame 0 0.0 150 0 60 0.25 172 0)
       
   432                                 activeHelpKey: hgRootPerModule
       
   433                                 translateLabel: true
       
   434                                 adjust: right
       
   435                               )
       
   436                              (SequenceViewSpec
       
   437                                 name: 'List1'
       
   438                                 layout: (LayoutFrame 64 0.25 150 0 0 1 269 0)
       
   439                                 activeHelpKey: hgRootPerModule
       
   440                                 tabable: true
       
   441                                 model: selectedPerModuleRepository
       
   442                                 hasHorizontalScrollBar: true
       
   443                                 hasVerticalScrollBar: true
       
   444                                 miniScrollerHorizontal: true
       
   445                                 useIndex: false
       
   446                                 sequenceList: listOfModules
       
   447                               )
       
   448                              (LabelSpec
       
   449                                 label: 'Module:'
       
   450                                 name: 'moduleLabel'
       
   451                                 layout: (LayoutFrame 0 0.0 279 0 60 0.25 296 0)
       
   452                                 activeHelpKey: hgRootPerModuleModule
       
   453                                 translateLabel: true
       
   454                                 adjust: right
       
   455                               )
       
   456                              (InputFieldSpec
       
   457                                 name: 'perModuleRepositoryModuleEntryField'
       
   458                                 layout: (LayoutFrame 64 0.25 275 0 0 1 297 0)
       
   459                                 activeHelpKey: hgRootPerModuleModule
       
   460                                 tabable: true
       
   461                                 model: perModuleRepositoryModule
       
   462                                 acceptChannel: acceptChannel
       
   463                                 acceptOnPointerLeave: true
       
   464                               )
       
   465                              (LabelSpec
       
   466                                 label: 'Git Repository:'
       
   467                                 name: 'hgRepository'
       
   468                                 layout: (LayoutFrame 0 0.0 304 0 60 0.25 321 0)
       
   469                                 activeHelpKey: hgRootPerModuleRoot
       
   470                                 translateLabel: true
       
   471                                 adjust: right
       
   472                               )
       
   473                              (ComboBoxSpec
       
   474                                 name: 'perModuleRepositoryComboBox'
       
   475                                 layout: (LayoutFrame 64 0.25 300 0 0 1.0 322 0)
       
   476                                 activeHelpKey: hgRootPerModuleRoot
       
   477                                 tabable: true
       
   478                                 model: perModuleRepository
       
   479                                 immediateAccept: true
       
   480                                 acceptOnLeave: true
       
   481                                 acceptOnReturn: true
       
   482                                 acceptOnTab: true
       
   483                                 acceptOnLostFocus: true
       
   484                                 acceptChannel: acceptChannel
       
   485                                 acceptOnPointerLeave: true
       
   486                                 comboList: gitRepositoryPrototypeList
       
   487                               )
       
   488                              (HorizontalPanelViewSpec
       
   489                                 name: 'HorizontalPanel2'
       
   490                                 layout: (LayoutFrame 64 0.25 327 0 -1 1 352 0)
       
   491                                 horizontalLayout: right
       
   492                                 verticalLayout: center
       
   493                                 horizontalSpace: 3
       
   494                                 verticalSpace: 3
       
   495                                 component: 
       
   496                                (SpecCollection
       
   497                                   collection: (
       
   498                                    (ActionButtonSpec
       
   499                                       label: 'Add/Apply'
       
   500                                       name: 'addButton'
       
   501                                       activeHelpKey: addPerModuleRoot
       
   502                                       translateLabel: true
       
   503                                       tabable: true
       
   504                                       model: addPerModuleRoot
       
   505                                       extent: (Point 100 22)
       
   506                                     )
       
   507                                    (ActionButtonSpec
       
   508                                       label: 'Remove'
       
   509                                       name: 'removeButton'
       
   510                                       activeHelpKey: removePerModuleRoot
       
   511                                       translateLabel: true
       
   512                                       tabable: true
       
   513                                       model: removePerModuleRoot
       
   514                                       enableChannel: removeEnabled
       
   515                                       extent: (Point 100 22)
       
   516                                     )
       
   517                                    (ViewSpec
       
   518                                       name: 'Box11'
       
   519                                       extent: (Point 100 10)
       
   520                                     )
       
   521                                    (ActionButtonSpec
       
   522                                       label: 'Init'
       
   523                                       name: 'Button3'
       
   524                                       activeHelpKey: hgLoginPerModuleRoot
       
   525                                       translateLabel: true
       
   526                                       tabable: true
       
   527                                       model: initializePerModuleRepository
       
   528                                       enableChannel: cvsLoginEnabled
       
   529                                       extent: (Point 100 22)
       
   530                                     )
       
   531                                    (ActionButtonSpec
       
   532                                       label: 'Check Access'
       
   533                                       name: 'checkButton2'
       
   534                                       activeHelpKey: hgCheckAccessPerModuleRoot
       
   535                                       translateLabel: true
       
   536                                       tabable: true
       
   537                                       model: checkAccessPerModuleRepository
       
   538                                       enableChannel: cvsLoginInModuleEnabled
       
   539                                       extent: (Point 100 22)
       
   540                                     )
       
   541                                    )
       
   542                                  
       
   543                                 )
       
   544                               )
       
   545                              )
       
   546                            
       
   547                           )
       
   548                         )
       
   549                        )
       
   550                      
       
   551                     )
       
   552                     extent: (Point 811 389)
       
   553                   )
       
   554                  (FramedBoxSpec
       
   555                     label: 'Push URLs'
       
   556                     name: 'FramedBox2'
       
   557                     labelPosition: topLeft
       
   558                     translateLabel: true
       
   559                     component: 
       
   560                    (SpecCollection
       
   561                       collection: (
       
   562                        (LabelSpec
       
   563                           label: 'URL to Push To:'
       
   564                           name: 'Label6'
       
   565                           layout: (LayoutFrame 0 0.0 14 0 60 0.25 36 0)
       
   566                           activeHelpKey: hgPushURLs
       
   567                           translateLabel: true
       
   568                           adjust: right
       
   569                         )
       
   570                        (SequenceViewSpec
       
   571                           name: 'List2'
       
   572                           layout: (LayoutFrame 64 0.25 14 0 0 1 90 0)
       
   573                           activeHelpKey: hgPushURLs
       
   574                           tabable: true
       
   575                           model: selectedPushURL
       
   576                           hasHorizontalScrollBar: true
       
   577                           hasVerticalScrollBar: true
       
   578                           miniScrollerHorizontal: true
       
   579                           useIndex: false
       
   580                           sequenceList: listOfPushURLs
       
   581                         )
       
   582                        (LabelSpec
       
   583                           label: 'URL:'
       
   584                           name: 'Label8'
       
   585                           layout: (LayoutFrame 0 0.0 101 0 60 0.25 118 0)
       
   586                           activeHelpKey: hgAddPushURL
       
   587                           translateLabel: true
       
   588                           adjust: right
       
   589                         )
       
   590                        (ComboBoxSpec
       
   591                           name: 'ComboBox2'
       
   592                           layout: (LayoutFrame 64 0.25 97 0 0 1.0 119 0)
       
   593                           activeHelpKey: hgAddPushURL
       
   594                           tabable: true
       
   595                           model: pushURL
       
   596                           immediateAccept: true
       
   597                           acceptOnLeave: true
       
   598                           acceptOnReturn: true
       
   599                           acceptOnTab: true
       
   600                           acceptOnLostFocus: true
       
   601                           acceptChannel: acceptChannel
       
   602                           acceptOnPointerLeave: true
       
   603                           comboList: hgPushURLPrototypeList
       
   604                         )
       
   605                        (HorizontalPanelViewSpec
       
   606                           name: 'HorizontalPanel3'
       
   607                           layout: (LayoutFrame 64 0.25 125 0 -1 1 150 0)
       
   608                           horizontalLayout: right
       
   609                           verticalLayout: center
       
   610                           horizontalSpace: 3
       
   611                           verticalSpace: 3
       
   612                           component: 
       
   613                          (SpecCollection
       
   614                             collection: (
       
   615                              (ActionButtonSpec
       
   616                                 label: 'Add/Apply'
       
   617                                 name: 'Button6'
       
   618                                 activeHelpKey: hgAddPushURL
       
   619                                 translateLabel: true
       
   620                                 tabable: true
       
   621                                 model: addPushURL
       
   622                                 extent: (Point 100 22)
       
   623                               )
       
   624                              (ActionButtonSpec
       
   625                                 label: 'Remove'
       
   626                                 name: 'Button7'
       
   627                                 activeHelpKey: hgRemovePushURL
       
   628                                 translateLabel: true
       
   629                                 tabable: true
       
   630                                 model: removePushURL
       
   631                                 enableChannel: removeEnabled
       
   632                                 extent: (Point 100 22)
       
   633                               )
       
   634                              (ViewSpec
       
   635                                 name: 'Box17'
       
   636                                 extent: (Point 100 10)
       
   637                               )
       
   638                              (ViewSpec
       
   639                                 name: 'Box18'
       
   640                                 extent: (Point 100 10)
       
   641                               )
       
   642                              (ViewSpec
       
   643                                 name: 'Box19'
       
   644                                 extent: (Point 99 9)
       
   645                               )
       
   646                              )
       
   647                            
       
   648                           )
       
   649                         )
       
   650                        )
       
   651                      
       
   652                     )
       
   653                     extent: (Point 811 187)
       
   654                   )
       
   655                  (FramedBoxSpec
       
   656                     label: 'Source Cache'
       
   657                     name: 'FramedBox1'
       
   658                     visibilityChannel: false
       
   659                     labelPosition: topLeft
       
   660                     translateLabel: true
       
   661                     component: 
       
   662                    (SpecCollection
       
   663                       collection: (
       
   664                        (ViewSpec
       
   665                           name: 'SourceCacheDirBox'
       
   666                           layout: (LayoutFrame 0 0 0 0 0 1 30 0)
       
   667                           component: 
       
   668                          (SpecCollection
       
   669                             collection: (
       
   670                              (LabelSpec
       
   671                                 label: 'Source Cache Dir:'
       
   672                                 name: 'SourceCacheDirLabel'
       
   673                                 layout: (LayoutFrame 0 0.0 0 0 60 0.25 22 0)
       
   674                                 translateLabel: true
       
   675                                 adjust: right
       
   676                               )
       
   677                              (InputFieldSpec
       
   678                                 name: 'SourceCacheDirEntryField'
       
   679                                 layout: (LayoutFrame 64 0.25 0 0 0 1 22 0)
       
   680                                 model: sourceCacheDir
       
   681                                 immediateAccept: false
       
   682                                 acceptOnReturn: true
       
   683                                 acceptOnTab: true
       
   684                                 acceptOnLostFocus: true
       
   685                                 acceptOnPointerLeave: true
       
   686                               )
       
   687                              )
       
   688                            
       
   689                           )
       
   690                         )
       
   691                        (HorizontalPanelViewSpec
       
   692                           name: 'CacheActionsHorizontalPanel'
       
   693                           layout: (LayoutFrame 44 0.25 33 0 0 1 67 0)
       
   694                           horizontalLayout: fitSpace
       
   695                           verticalLayout: center
       
   696                           horizontalSpace: 3
       
   697                           verticalSpace: 3
       
   698                           component: 
       
   699                          (SpecCollection
       
   700                             collection: (
       
   701                              (ActionButtonSpec
       
   702                                 label: 'Flush Cache now'
       
   703                                 name: 'FlushCacheNowButton'
       
   704                                 translateLabel: true
       
   705                                 tabable: true
       
   706                                 model: flushSourceCache
       
   707                                 extent: (Point 265 22)
       
   708                               )
       
   709                              (ActionButtonSpec
       
   710                                 label: 'Condense Cache now'
       
   711                                 name: 'CondenseCacheNowButton'
       
   712                                 translateLabel: true
       
   713                                 tabable: true
       
   714                                 model: condenseSourceCache
       
   715                                 extent: (Point 265 22)
       
   716                               )
       
   717                              )
       
   718                            
       
   719                           )
       
   720                         )
       
   721                        )
       
   722                      
       
   723                     )
       
   724                     extent: (Point 811 95)
       
   725                   )
       
   726                  )
       
   727                
       
   728               )
       
   729             )
       
   730            )
       
   731          
       
   732         )
       
   733       )
       
   734 ! !
       
   735 
       
   736 !GitSourceCodeManagementSettingsAppl class methodsFor:'queries'!
       
   737 
       
   738 managerClass
       
   739     "backlink to my manager class (needed by the settings app)"
       
   740 
       
   741     ^ GitSourceCodeManager
       
   742 
       
   743     "Created: / 19-04-2011 / 12:46:52 / cg"
       
   744 ! !
       
   745 
       
   746 !GitSourceCodeManagementSettingsAppl methodsFor:'actions'!
       
   747 
       
   748 addModule:module withData:data
       
   749     (self listOfModules includes:module) ifFalse:[
       
   750         self listOfModules add:module; sort.
       
   751     ].
       
   752     repositoriesPerModule at:module put:data.
       
   753 
       
   754     self updateModifiedChannel.
       
   755 
       
   756     "Created: / 08-11-2006 / 19:25:21 / cg"
       
   757 !
       
   758 
       
   759 basicReadSettings
       
   760     |infoPerModule|
       
   761 
       
   762     self initialize.
       
   763 
       
   764     self sourceCacheDir value:(GitSourceCodeManager cacheDirectoryName).
       
   765 
       
   766     repository := GitSourceCodeManager repositoryName.
       
   767     self repositoryHolder value:(repository ? '') asValue.
       
   768 
       
   769     infoPerModule := GitSourceCodeManager repositoryInfoPerModule.
       
   770     infoPerModule keysAndValuesDo:[:module :info | 
       
   771         repositoriesPerModule at:module put:(Array with:GitSourceCodeManager with:info).
       
   772     ].
       
   773 
       
   774     self repositoryHolder value:GitSourceCodeManager repositoryName ? self class defaultRepositoryName.
       
   775     self gitExecutableHolder value:GitSourceCodeManager gitExecutable.
       
   776     self gitCommandTimeoutHolder value:GitSourceCodeManager gitCommandTimeout.
       
   777     self verboseSourceCodeAccess value:GitSourceCodeManager verboseSourceCodeAccess. 
       
   778     self shownInBrowserMenusHolder value:GitSourceCodeManager shownInBrowserMenus. 
       
   779 
       
   780     repositoriesPerModule notNil ifTrue:[
       
   781         self listOfModules removeAll.
       
   782         listOfModules addAll:repositoriesPerModule keys asList.
       
   783     ].
       
   784 "/    self selectedPerModuleRootChanged.
       
   785 
       
   786     "Modified: / 02-03-2012 / 15:23:00 / cg"
       
   787 !
       
   788 
       
   789 basicSaveSettings
       
   790     |modules nm fn infoPerModule|
       
   791 
       
   792     nm := self sourceCacheDir value.
       
   793     nm notEmptyOrNil ifTrue:[
       
   794         (fn := nm asFilename) exists ifFalse:[
       
   795             (self confirm:('Git cache directory ''' , nm , ''' does not exist\create ?' withCRs)) ifTrue:[
       
   796                 fn recursiveMakeDirectory; 
       
   797                    makeReadableForAll;
       
   798                    makeWritableForAll;
       
   799                    makeExecutableForAll.
       
   800             ]
       
   801         ].
       
   802         (fn isDirectory
       
   803         and:[fn isReadable
       
   804         and:[fn isWritable]]) ifTrue:[
       
   805             GitSourceCodeManager cacheDirectoryName:nm.
       
   806         ] ifFalse:[
       
   807             self warn:'Invalid sourceCache directory.'
       
   808         ]
       
   809     ].
       
   810 
       
   811     GitSourceCodeManager hgCommandTimeout:(self hgCommandTimeoutHolder value).
       
   812 
       
   813     modules := repositoriesPerModule select:[:entry | entry first == GitSourceCodeManager].
       
   814     infoPerModule := Dictionary new.
       
   815     modules keysAndValuesDo:[:module :entry | 
       
   816         entry first == GitSourceCodeManager ifTrue:[
       
   817             infoPerModule at:module put:(entry second).
       
   818         ].
       
   819     ].
       
   820     GitSourceCodeManager repositoryInfoPerModule:infoPerModule.
       
   821 
       
   822     self basicSaveGitSettings.
       
   823 
       
   824     self sourceCacheDir value:(AbstractSourceCodeManager cacheDirectoryName).
       
   825 
       
   826     DebugView newDebugger. "/ ???
       
   827 
       
   828     self acceptChannel value.
       
   829 
       
   830     "Modified: / 02-03-2012 / 15:19:14 / cg"
       
   831 !
       
   832 
       
   833 removePerModuleRoot
       
   834     |module|
       
   835 
       
   836     acceptChannel value:true.    
       
   837     module := self perModuleRepositoryModule value.
       
   838     self listOfModules remove:module ifAbsent:nil.
       
   839     repositoriesPerModule removeKey:module ifAbsent:nil.
       
   840     self perModuleRepositoryModule value:nil.
       
   841     self perModuleRepository value:nil.
       
   842     self updateModifiedChannel.
       
   843 
       
   844     "Modified: / 26-01-2012 / 13:50:08 / cg"
       
   845 ! !
       
   846 
       
   847 !GitSourceCodeManagementSettingsAppl methodsFor:'actions - mercurial'!
       
   848 
       
   849 addPerModuleRoot
       
   850     |module gitRepository|
       
   851 
       
   852     acceptChannel value:true.    
       
   853 
       
   854     module := self perModuleRepositoryModule value.
       
   855     gitRepository := self perModuleRepository value.
       
   856 
       
   857     gitRepository size > 0 ifTrue:[
       
   858         self addModule:module withData:(Array with:GitSourceCodeManager with:gitRepository).
       
   859     ].
       
   860 
       
   861     "Modified (format): / 02-03-2012 / 15:22:41 / cg"
       
   862 !
       
   863 
       
   864 basicSaveGitSettings
       
   865     |hgRepository|
       
   866 
       
   867     repositoryHolder notNil ifTrue:[
       
   868         repositoryHolder value size > 0 ifTrue:[
       
   869             manager notNil ifTrue:[
       
   870                 manager initializeForRepository:repositoryHolder value.
       
   871             ]
       
   872         ].
       
   873     ].
       
   874     GitSourceCodeManager gitExecutable:((self gitExecutableHolder value ? '') withoutSeparators).
       
   875     GitSourceCodeManager initializeForRepository:(hgRepository := self repositoryHolder value).
       
   876     GitSourceCodeManager verboseSourceCodeAccess: verboseSourceCodeAccess value. 
       
   877     GitSourceCodeManager shownInBrowserMenus:self shownInBrowserMenusHolder value. 
       
   878 
       
   879     RecentlyUsedRepositoryURLS isNil ifTrue:[
       
   880         RecentlyUsedRepositoryURLS := OrderedCollection new.
       
   881     ].
       
   882     (RecentlyUsedRepositoryURLS includes:hgRepository) ifFalse:[
       
   883         RecentlyUsedRepositoryURLS addFirst:hgRepository.
       
   884         RecentlyUsedRepositoryURLS size > 20 ifTrue:[
       
   885             RecentlyUsedRepositoryURLS removeLast.
       
   886         ].
       
   887     ].
       
   888 
       
   889     "Created: / 02-03-2012 / 15:19:22 / cg"
       
   890 !
       
   891 
       
   892 checkAccess
       
   893     self halt:'unimplemented feature'
       
   894 
       
   895     "Created: / 17-01-2012 / 17:34:53 / cg"
       
   896 !
       
   897 
       
   898 initializeRepository
       
   899     self halt:'unimplemented feature'
       
   900 
       
   901     "Created: / 17-01-2012 / 17:42:27 / cg"
       
   902 ! !
       
   903 
       
   904 !GitSourceCodeManagementSettingsAppl methodsFor:'aspects'!
       
   905 
       
   906 gitCommandTimeoutHolder
       
   907     gitCommandTimeoutHolder isNil ifTrue:[
       
   908         gitCommandTimeoutHolder := ValueHolder new.
       
   909         gitCommandTimeoutHolder onChangeSend:#updateModifiedChannel to:self
       
   910     ].
       
   911     ^ gitCommandTimeoutHolder.
       
   912 
       
   913     "Created: / 02-03-2012 / 15:22:11 / cg"
       
   914 !
       
   915 
       
   916 gitExecutableHolder
       
   917     gitExecutableHolder isNil ifTrue:[
       
   918         gitExecutableHolder := ValueHolder new.
       
   919         gitExecutableHolder onChangeSend:#updateModifiedChannel to:self
       
   920     ].
       
   921     ^ gitExecutableHolder.
       
   922 
       
   923     "Created: / 02-03-2012 / 15:22:18 / cg"
       
   924 !
       
   925 
       
   926 initialListOfModules
       
   927     ^ repositoriesPerModule keys asList sort.
       
   928 
       
   929     "Created: / 02-03-2012 / 14:41:07 / cg"
       
   930 !
       
   931 
       
   932 perModuleRepository
       
   933     perModuleRepository isNil ifTrue:[
       
   934         perModuleRepository := ValueHolder new.
       
   935         perModuleRepository addDependent:self.
       
   936     ].
       
   937     ^ perModuleRepository.
       
   938 
       
   939     "Created: / 14-01-2012 / 20:18:59 / cg"
       
   940 !
       
   941 
       
   942 perModuleRepositoryModule
       
   943     perModuleRepositoryModule isNil ifTrue:[
       
   944         perModuleRepositoryModule := ValueHolder new.
       
   945     ].
       
   946     ^ perModuleRepositoryModule.
       
   947 
       
   948     "Created: / 14-01-2012 / 20:19:51 / cg"
       
   949 !
       
   950 
       
   951 repositoryHolder
       
   952 
       
   953     repositoryHolder isNil ifTrue:[
       
   954         repositoryHolder := '' asValue.
       
   955         repositoryHolder addDependent:self.
       
   956     ].
       
   957     ^ repositoryHolder.
       
   958 
       
   959     "Created: / 14-01-2012 / 20:03:00 / cg"
       
   960 !
       
   961 
       
   962 repositoryPrototypeList
       
   963     |prototypeList|
       
   964 
       
   965     repositoryPrototypeList isNil ifTrue:[
       
   966         prototypeList := OrderedSet new.
       
   967 
       
   968 "/        cvsRoot := self cvsRootFromCVSRootFileOrNil.
       
   969 "/        cvsRoot notNil ifTrue:[
       
   970 "/            prototypeList add:cvsRoot    
       
   971 "/        ].
       
   972 
       
   973         prototypeList add:('https://inst.kilnhg.com/Repo/Foo/Bar/Baz').
       
   974         "/ prototypeList add:('https://inst.kilnhg.com/Repo/Dino-VM/Group/Dino-VM').
       
   975         repositoryPrototypeList := prototypeList asOrderedCollection.
       
   976     ].
       
   977     ^ repositoryPrototypeList.
       
   978 
       
   979     "Created: / 14-01-2012 / 20:13:43 / cg"
       
   980 !
       
   981 
       
   982 selectedPerModuleRepository
       
   983     selectedPerModuleRepository isNil ifTrue:[
       
   984         selectedPerModuleRepository := ValueHolder new.
       
   985         selectedPerModuleRepository addDependent:self.
       
   986     ].
       
   987     ^ selectedPerModuleRepository.
       
   988 
       
   989     "Created: / 14-01-2012 / 20:14:04 / cg"
       
   990 ! !
       
   991 
       
   992 !GitSourceCodeManagementSettingsAppl methodsFor:'change & update'!
       
   993 
       
   994 selectedPerModuleRepositoryChanged
       
   995     |repository entry|
       
   996 
       
   997     self acceptChannel value:true.    
       
   998     repository := self selectedPerModuleRepository value.
       
   999     repository isNil ifTrue:[ 
       
  1000         self removeEnabled value:false.
       
  1001         self perModuleRepositoryModule value:' '.
       
  1002         self perModuleRepository value:''.
       
  1003         ^ self
       
  1004     ].
       
  1005 
       
  1006     entry := repositoriesPerModule at:repository ifAbsent:#().    
       
  1007     (entry first = GitSourceCodeManager) ifTrue:[
       
  1008         self removeEnabled value:true.
       
  1009         self perModuleRepositoryModule value:repository.
       
  1010         self perModuleRepository value:(entry at:2).
       
  1011     ] ifFalse:[
       
  1012         self removeEnabled value:false.
       
  1013         self perModuleRepositoryModule value:repository , ' ',('<<use ',entry first managerTypeName,'>>') allBold.
       
  1014         self perModuleRepository value:''.
       
  1015     ].
       
  1016 
       
  1017     "Created: / 14-01-2012 / 20:24:57 / cg"
       
  1018 !
       
  1019 
       
  1020 sourceDirChanged
       
  1021     |nm fn previousDir|
       
  1022 
       
  1023     manager isNil ifTrue:[^ self].
       
  1024 
       
  1025     previousDir := AbstractSourceCodeManager cacheDirectoryName.
       
  1026 
       
  1027     nm := self sourceCacheDir value.
       
  1028     nm isEmptyOrNil ifTrue:[^ self].
       
  1029 
       
  1030     (fn := nm asFilename) exists ifFalse:[
       
  1031         (self confirm:(resources 
       
  1032                             stringWithCRs:'SourceCache directory "%1" does not exist.\Create ?'
       
  1033                             with:nm)
       
  1034         ) ifFalse:[
       
  1035             self sourceCacheDir value:previousDir.
       
  1036             ^ self.
       
  1037         ].
       
  1038         fn 
       
  1039             recursiveMakeDirectory; 
       
  1040             makeReadableForAll;
       
  1041             makeWritableForAll;
       
  1042             makeExecutableForAll.
       
  1043         ^ self.
       
  1044     ].
       
  1045 
       
  1046     (fn isDirectory) ifFalse:[
       
  1047         self warn:(resources 
       
  1048                             stringWithCRs:'Not a directory: "%1"'
       
  1049                             with:nm).
       
  1050         self sourceCacheDir value:previousDir.
       
  1051         ^ self.
       
  1052     ].
       
  1053 
       
  1054     (fn isReadable and:[fn isWritable]) ifFalse:[
       
  1055         (self confirm:(resources 
       
  1056                             stringWithCRs:'SourceCache directory "%1" is not both readable and writable.\Change ?'
       
  1057                             with:nm)
       
  1058         ) ifFalse:[
       
  1059             self sourceCacheDir value:previousDir.
       
  1060             ^ self.
       
  1061         ].
       
  1062         fn
       
  1063             makeReadableForAll;
       
  1064             makeWritableForAll;
       
  1065             makeExecutableForAll.
       
  1066     ].
       
  1067 "/    (fn isReadableForAll and:[fn isWritableForAll]) ifFalse:[
       
  1068 "/        (self confirm:(resources 
       
  1069 "/                            stringWithCRs:'SourceCache directory "%1" is not both readable and writable for other users.\Change ?'
       
  1070 "/                            with:nm)
       
  1071 "/        ) ifTrue:[
       
  1072 "/            fn
       
  1073 "/                makeReadableForAll;
       
  1074 "/                makeWritableForAll;
       
  1075 "/                makeExecutableForAll.
       
  1076 "/        ]
       
  1077 "/    ].
       
  1078 !
       
  1079 
       
  1080 update:something with:aParameter from:changedObject 
       
  1081     "/ common    
       
  1082     changedObject == sourceCacheDir ifTrue:[
       
  1083         self sourceDirChanged.
       
  1084         self updateModifiedChannel.
       
  1085         ^ self
       
  1086     ].
       
  1087 
       
  1088     "/ cvs
       
  1089     changedObject == repositoryHolder ifTrue:[
       
  1090         self updateModifiedChannel.
       
  1091         "/ self updateLoginEnableHolders.
       
  1092         ^ self
       
  1093     ].
       
  1094 "/    changedObject == perModuleRepository ifTrue:[
       
  1095 "/        self updateLoginEnableHolders.
       
  1096 "/        ^ self
       
  1097 "/    ].
       
  1098     changedObject == selectedPerModuleRepository ifTrue:[
       
  1099         self selectedPerModuleRepositoryChanged.
       
  1100         ^ self
       
  1101     ].
       
  1102 
       
  1103     super update:something with:aParameter from:changedObject
       
  1104 
       
  1105     "Modified: / 14-01-2012 / 20:26:51 / cg"
       
  1106 ! !
       
  1107 
       
  1108 !GitSourceCodeManagementSettingsAppl methodsFor:'help'!
       
  1109 
       
  1110 helpFilename
       
  1111     ^ 'Launcher/gitSetup.html'
       
  1112 
       
  1113     "Modified: / 02-03-2012 / 15:20:09 / cg"
       
  1114 ! !
       
  1115 
       
  1116 !GitSourceCodeManagementSettingsAppl methodsFor:'initialization & release'!
       
  1117 
       
  1118 initialize
       
  1119     (AbstractSourceCodeManager notNil) ifTrue:[ AbstractSourceCodeManager autoload ].
       
  1120 
       
  1121     sourceCacheDir := nil asValue.
       
  1122     sourceCacheDir addDependent:self.
       
  1123 
       
  1124     repositoriesPerModule := Dictionary new.
       
  1125 
       
  1126     GitSourceCodeManager repositoryInfoPerModule 
       
  1127         keysAndValuesDo:[:module :info |
       
  1128             module withoutSeparators ~= module ifTrue:[
       
  1129                 self halt:'should not happen any longer'
       
  1130             ].
       
  1131             repositoriesPerModule at:module put:(Array with:GitSourceCodeManager with:info)
       
  1132         ].
       
  1133 
       
  1134     super initialize.
       
  1135 
       
  1136     "Modified: / 02-03-2012 / 15:20:19 / cg"
       
  1137 ! !
       
  1138 
       
  1139 !GitSourceCodeManagementSettingsAppl methodsFor:'queries'!
       
  1140 
       
  1141 hasUnsavedChanges
       
  1142     |modules|
       
  1143 
       
  1144     ((GitSourceCodeManager cacheDirectoryName ? '') ~= (self sourceCacheDir value ? '')) ifTrue:[^ true].
       
  1145 
       
  1146     modules := repositoriesPerModule select:[:entry | entry first == GitSourceCodeManager].
       
  1147 
       
  1148     GitSourceCodeManager repositoryInfoPerModule keysAndValuesDo:[:module :info |
       
  1149         ((modules includesKey:module) and:[info = (modules at:module) second])
       
  1150         ifFalse:[^ true].
       
  1151     ].   
       
  1152     modules keysAndValuesDo:[:module :info|
       
  1153         ((GitSourceCodeManager repositoryInfoPerModule includesKey:module) 
       
  1154             and:[(GitSourceCodeManager repositoryInfoPerModule at:module) = info second])
       
  1155         ifFalse:[^ true].
       
  1156     ].
       
  1157     (GitSourceCodeManager gitCommandTimeout ~= gitCommandTimeoutHolder value)
       
  1158         ifTrue:[^ true].
       
  1159 
       
  1160     ((GitSourceCodeManager gitExecutable ? '') ~= (self gitExecutableHolder value ? '') withoutSeparators)  
       
  1161         ifTrue:[^ true].
       
  1162 
       
  1163     (GitSourceCodeManager repositoryName ? self class defaultRepositoryName ~= self repositoryHolder value)    
       
  1164         ifTrue:[^ true].
       
  1165 
       
  1166     (GitSourceCodeManager verboseSourceCodeAccess ~= self verboseSourceCodeAccess value) 
       
  1167         ifTrue:[^ true].
       
  1168 
       
  1169     (GitSourceCodeManager shownInBrowserMenus ~= self shownInBrowserMenusHolder value)
       
  1170         ifTrue:[^ true].
       
  1171 
       
  1172     ^ false
       
  1173 
       
  1174     "Modified: / 02-03-2012 / 15:20:03 / cg"
       
  1175 ! !
       
  1176 
       
  1177 !GitSourceCodeManagementSettingsAppl class methodsFor:'documentation'!
       
  1178 
       
  1179 version
       
  1180     ^ '$Header: /cvs/stx/stx/libtool/GitSourceCodeManagementSettingsAppl.st,v 1.1 2012-03-02 14:28:28 cg Exp $'
       
  1181 !
       
  1182 
       
  1183 version_CVS
       
  1184     ^ '$Header: /cvs/stx/stx/libtool/GitSourceCodeManagementSettingsAppl.st,v 1.1 2012-03-02 14:28:28 cg Exp $'
       
  1185 ! !