Skip to content

Commit

Permalink
Merge pull request #419 from pharo-vcs/dev-0.5
Browse files Browse the repository at this point in the history
fixes
  • Loading branch information
estebanlm authored Jul 23, 2017
2 parents 2778471 + 1823dde commit b7cc297
Show file tree
Hide file tree
Showing 26 changed files with 120 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
accessing
setLongpaths: aBoolean global: globalBoolean
"set user.name and user.email properties.
this could be a nonsense with other backends, but git has them and needs them :)"
self withRepoDo: [ :repo | | config |
config := repo config.
globalBoolean ifTrue: [ config := config openGlobal ].
config setBoolean: 'core.longpaths' to: aBoolean ]
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I resolve Bitbucket repositories
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
type
^ 'bitbucket'
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "EstebanLorenzano 7/23/2017 13:18",
"super" : "IceProviderRepositoryType",
"category" : "Iceberg-Metacello-Integration",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "IceBitbucketRepositoryType",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,19 +1 @@
I resolve Github repositories.
A github repositoy is composed of:

github://username/repository[:commitish][/subdir]

github - The github identifier
username - The github user
repository - The guthub repository
commitish - an optional commitish (a branch, a tag, a commit id)
subdir - an optional subdirectory where the packages exist.

Example:
------------
A script to install voyage using this would like more or less like this:

Metacello new
repository: 'github://pharo-nosql/voyage:master/mc';
baseline: 'Voyage';
load: 'mongo tests'.
I resolve Github repositories
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@ mcRepository
| baseRepo |

baseRepo := MCGitHubRepository location: self location.
(Iceberg icebergRepositoriesURLs includes: baseRepo scpUrl)
^ (Iceberg icebergRepositoriesURLs includes: baseRepo scpUrl)
ifTrue: [
"Do not use Iceberg to load iceberg code,
see https://github.com/npasserini/iceberg/issues/168"
^ baseRepo ]
see https://github.com/pharo-vcs/iceberg/issues/168"
baseRepo ]
ifFalse: [
Transcript
show: 'Creating iceberg-metacello adapter for: ';
show: self location;
cr.
^ baseRepo getOrCreateIcebergRepository metacelloAdapter ]
baseRepo getOrCreateIcebergRepository metacelloAdapter ]

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"commentStamp" : "EstebanLorenzano 12/12/2016 10:44",
"super" : "IceMetacelloRepositoryType",
"commentStamp" : "EstebanLorenzano 7/23/2017 13:18",
"super" : "IceProviderRepositoryType",
"category" : "Iceberg-Metacello-Integration",
"classinstvars" : [ ],
"pools" : [ ],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
I resolve Gilab repositories
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
type
^ 'gitlab'
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "EstebanLorenzano 7/23/2017 13:18",
"super" : "IceProviderRepositoryType",
"category" : "Iceberg-Metacello-Integration",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "IceGitlabRepositoryType",
"type" : "normal"
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
repository creation
createRepository: aRepositorySpec

| type |

type := aRepositorySpec type.
type = 'ftp' ifTrue: [ | description headerSize index host directory |
description := aRepositorySpec description.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
accessing
allTypes
^ self allSubclasses
^ self allSubclasses select: [ :each | each isAbstract not ]
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
instance creation
for: aLocationString
^ (self allSubclasses
^ (self allTypes
detect: [ :each | each isSuitableForLocation: aLocationString ])
location: aLocationString
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
testing
isAbstract
^ self = IceMetacelloRepositoryType
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
I 'm a base class to resolve provider-based repositories.
A provider repositoy is composed of:

provider://username/repository[:commitish][/subdir]

provider - The provider identifier (e.g. github, bitbucket, etc.)
username - The provider user
repository - The provider repository
commitish - an optional commitish (a branch, a tag, a commit id)
subdir - an optional subdirectory where the packages exist.

Example:
------------
A script to install voyage using this would like more or less like this:

Metacello new
repository: 'github//pharo-nosql/voyage:master/mc';
baseline: 'Voyage';
load: 'mongo tests'.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
testing
isAbstract
^ super isAbstract
or: [ self = IceProviderRepositoryType ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
accessing
mcRepository
| baseRepo |

baseRepo := MCGitHubRepository location: self location.
^ baseRepo getOrCreateIcebergRepository metacelloAdapter
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"commentStamp" : "<historical>",
"super" : "IceMetacelloRepositoryType",
"category" : "Iceberg-Metacello-Integration",
"classinstvars" : [ ],
"pools" : [ ],
"classvars" : [ ],
"instvars" : [ ],
"name" : "IceProviderRepositoryType",
"type" : "normal"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ addChangesTreeTo: a with: commitInfo
(IceDiffChangeTreeBuilder new
entity: commitInfo;
diff: (commitInfo ifNotNil: [
commitInfo diffTo: (commitInfo repository commitAt: self baseSHA) ]);
commitInfo diffTo: (self mergeBaseCommitFor: commitInfo) ]);
buildOn: a)
title: 'Changes vs. destination' .
super addChangesTreeTo: a with: commitInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
accessing
mergeBaseCommitFor: commitInfo
^ commitInfo repository commitAt: (self mergeBaseFor: commitInfo)
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
mergeBaseFor: commitInfo
^ commitInfo repository
mergeBaseBetween: commitInfo commitId
and: self baseSHA
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ initialization
initializeWidgets
issueNumberText := self newTextInput autoAccept: true.
issueText := self newTextInput autoAccept: true.
createButton := self newButton.
createButton := self newButton enabled: false.


issueNumberText whenBuiltDo: [ :w | w widget wrapFlag: false ].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,7 @@ validateIssue: aString
issue := PharoIssue number: number.
[ "Fork to allow UI to continue"
issue downloadTitle.
World defer: [ self updateText: (self sanitizeTitle: issue title) ] ] fork ]
UIManager default defer: [
self updateText: (self sanitizeTitle: issue title).
self createButton enabled: true ] ] fork ]

Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
accessing
compatibleTimestamp
"I'm a timestamp as system: likes authorname MM/DD/YYYY HH:MM"
^ String streamContents: [ :stream |
stream
<< self compatibleUsername
<< ' '
<< self datetime asStringYMDHM ]
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
accessing
mergeBaseBetween: anId and: otherId
^ self backend
mergeBaseBetween: anId
and: otherId
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
*Iceberg-Adapters
icebergRepositoriesURLs
^ {
'[email protected]:npasserini/iceberg.git'.
'[email protected]:npasserini/filetree.git'.
'[email protected]:npasserini/LibGit.git'
'[email protected]:pharo-vcs/iceberg.git'.
'[email protected]:pharo-vcs/filetree.git'.
'[email protected]:pharo-vcs/libgit2-pharo-bindings.git'
}

0 comments on commit b7cc297

Please sign in to comment.