The Trunk: Monticello-cmm.520.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Monticello-cmm.520.mcz

commits-2
Chris Muller uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-cmm.520.mcz

==================== Summary ====================

Name: Monticello-cmm.520
Author: cmm
Time: 3 August 2012, 4:14:13.148 pm
UUID: 43782747-5008-4be8-a1fb-76f693a20517
Ancestors: Monticello-eem.519

- Reassign MCConfiguration>>#mustMerge: to MCVersion as #shouldMerge.  I need it outside the context of a MCConfiguration.

=============== Diff against Monticello-eem.519 ===============

Item was changed:
  ----- Method: MCRepository class>>location:username:password: (in category 'instance creation') -----
  location: urlOrPath username: user password: pass
  "Answer an MCRepository for the given url or path. Accepted locations are:
  - http, and ftp urls (i.e., http://source.squeak.org/trunk)
  - directory paths (i.e., C:\Squeak\packages)
  - directory matches (i.e., C:\Squeak\packages\*)
  If provided, the supplied user name and password will be used."
 
  | url |
  (urlOrPath findString: '://') > 0 ifTrue:[
  url := urlOrPath asUrl.
+ ^ url scheme caseOf: {
+ ['ftp'] -> [MCFtpRepository
- url scheme caseOf: {
- ['ftp'] -> [^MCFtpRepository
  host: url authority
  directory: url pathString allButFirst
  user: user
  password: user].
+ ['http'] -> [MCHttpRepository
- ['http'] -> [^MCHttpRepository
  location: urlOrPath
  user: user
  password: pass].
+ } otherwise:[self error: 'Unsupported scheme: ', url scheme].
- } otherwise:[^self error: 'Unsupported scheme: ', url scheme].
  ].
 
  (urlOrPath endsWith: '*') ifTrue:[
  ^MCSubDirectoryRepository new
  directory: (FileDirectory on: urlOrPath allButLast)].
 
  ^MCDirectoryRepository
  directory: (FileDirectory on: urlOrPath)!

Item was added:
+ ----- Method: MCRepository>>highestNumberedVersionForPackageNamed: (in category 'versions') -----
+ highestNumberedVersionForPackageNamed: aString
+ ^ self versionNamed: (self highestNumberedVersionNameForPackageNamed: aString)!

Item was added:
+ ----- Method: MCVersion>>shouldMerge (in category 'testing') -----
+ shouldMerge
+ "answer true if we have to do a full merge and false if we can simply load instead"
+ | pkg wc current |
+ (pkg := self package) hasWorkingCopy ifFalse: [^false "no wc -> load"].
+ (wc := pkg workingCopy) modified ifTrue: [^true "modified -> merge"].
+ wc ancestors isEmpty ifTrue: [^true "no ancestor info -> merge"].
+ current := wc ancestors first.
+ (self info hasAncestor: current) ifTrue: [^false "direct descendant of wc -> load"].
+ "new branch -> merge"
+ ^true!