The Inbox: Files-kfr.120.mcz

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

The Inbox: Files-kfr.120.mcz

commits-2
A new version of Files was added to project The Inbox:
http://source.squeak.org/inbox/Files-kfr.120.mcz

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

Name: Files-kfr.120
Author: kfr
Time: 12 November 2012, 6:23:28.531 pm
UUID: 4a518133-203f-bd43-9fce-78b8dcfb337d
Ancestors: Files-cmm.119

Fix for test failure on Windows

=============== Diff against Files-cmm.119 ===============

Item was added:
+ ----- Method: DosFileDirectory>>relativeNameIfAbsoluteFor: (in category 'path access') -----
+ relativeNameIfAbsoluteFor: aFileName
+ "Answer either the relative name for aFileName, if aFileName names a file in me or
+ subdirectories, or aFileName's absolute path if it isn't in me or subdirectories.
+ P.S. Ths is what I'd expect relativeNameFor: to do, but it is taken and means
+ exactly the opposite, i.e. the absolute path for a relative name."
+ | fullNameSize fullName fileNameSize |
+       (aFileName isEmpty or: [aFileName first ~= self driveName first]) ifTrue:
+                 [self error: 'this method expects an absolute filename'].
+ fullNameSize := (fullName := self fullName) size.
+ fileNameSize := aFileName size.
+ ^(aFileName beginsWith: fullName)
+ ifTrue: [(fileNameSize = fullNameSize
+ or: [fileNameSize - 1 = fullNameSize
+ and: [(aFileName at: fileNameSize) = self pathNameDelimiter]])
+ ifTrue: [self class currentDirectoryNickname]
+ ifFalse: [aFileName copyFrom: fullNameSize + 2 to: fileNameSize]]
+ ifFalse: [aFileName]
+
+ "SourceFiles asArray collect: [:sf| FileDirectory default relativeNameIfAbsoluteFor: sf fullName]"
+ "FileDirectory default relativeNameIfAbsoluteFor: FileDirectory default fullName" "should be dot"
+ "FileDirectory default relativeNameIfAbsoluteFor: FileDirectory default fullName, FileDirectory default slash" "should also be dot"!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Files-kfr.120.mcz

timrowledge
OK, I'm startled to see this.

I'm trying to follow Frank's advice for submitting a small change;
a) I looked in the inbox repository and spotted Files-kfr.120.mcz
b) saw that it seemed to have some updates to the filedirectory stuff that my change relates to
c) merged it into my image
d) noted the MC browser displayed '* Files (kfr.120)' as I'd expect
e) realised it showed it only in Trunk
f) wondered what to do to save my working copy back to the inbox repository

And there I got a bit puzzled.

So far as I can tell I caused this email by copying the package that was already in inbox to … inbox. I doubt that is the right thing to do and it certainly seems to result in the wrong diff; nothing there about my change.

What am I supposed to do here? I not going to try copying the Files package from Trunk to inbox in case it moves the entire thing and screws life up later.


On 22-02-2013, at 11:54 PM, [hidden email] wrote:

> A new version of Files was added to project The Inbox:
> http://source.squeak.org/inbox/Files-kfr.120.mcz
>
> ==================== Summary ====================
>
> Name: Files-kfr.120
> Author: kfr
> Time: 12 November 2012, 6:23:28.531 pm
> UUID: 4a518133-203f-bd43-9fce-78b8dcfb337d
> Ancestors: Files-cmm.119
>
> Fix for test failure on Windows
>
> =============== Diff against Files-cmm.119 ===============
>
> Item was added:
> + ----- Method: DosFileDirectory>>relativeNameIfAbsoluteFor: (in category 'path access') -----
> + relativeNameIfAbsoluteFor: aFileName
> + "Answer either the relative name for aFileName, if aFileName names a file in me or
> + subdirectories, or aFileName's absolute path if it isn't in me or subdirectories.
> + P.S. Ths is what I'd expect relativeNameFor: to do, but it is taken and means
> + exactly the opposite, i.e. the absolute path for a relative name."
> + | fullNameSize fullName fileNameSize |
> +       (aFileName isEmpty or: [aFileName first ~= self driveName first]) ifTrue:
> +                 [self error: 'this method expects an absolute filename'].
> + fullNameSize := (fullName := self fullName) size.
> + fileNameSize := aFileName size.
> + ^(aFileName beginsWith: fullName)
> + ifTrue: [(fileNameSize = fullNameSize
> + or: [fileNameSize - 1 = fullNameSize
> + and: [(aFileName at: fileNameSize) = self pathNameDelimiter]])
> + ifTrue: [self class currentDirectoryNickname]
> + ifFalse: [aFileName copyFrom: fullNameSize + 2 to: fileNameSize]]
> + ifFalse: [aFileName]
> +
> + "SourceFiles asArray collect: [:sf| FileDirectory default relativeNameIfAbsoluteFor: sf fullName]"
> + "FileDirectory default relativeNameIfAbsoluteFor: FileDirectory default fullName" "should be dot"
> + "FileDirectory default relativeNameIfAbsoluteFor: FileDirectory default fullName, FileDirectory default slash" "should also be dot"!
>
>


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Useful Latin Phrases:- Raptus regaliter = Royally screwed



Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Files-kfr.120.mcz

Bert Freudenberg

On 23.02.2013, at 01:03, tim Rowledge <[hidden email]> wrote:

> OK, I'm startled to see this.
>
> I'm trying to follow Frank's advice for submitting a small change;
> a) I looked in the inbox repository and spotted Files-kfr.120.mcz
> b) saw that it seemed to have some updates to the filedirectory stuff that my change relates to
> c) merged it into my image
> d) noted the MC browser displayed '* Files (kfr.120)' as I'd expect

So far, so good. Files-cmm.119 is the latest in Trunk, so since Files-kfr.120 is a direct descendent of that, this is the new ancestor of your working copy.

> e) realised it showed it only in Trunk

???

> f) wondered what to do to save my working copy back to the inbox repository
>
> And there I got a bit puzzled.
>
> So far as I can tell I caused this email by copying the package that was already in inbox to … inbox. I doubt that is the right thing to do and it certainly seems to result in the wrong diff; nothing there about my change.

If you pressed the "Copy" button in Monticello then this is indeed what it did: it re-uploaded Karl's Files-kfr.120. No harm done, it's exactly the same as when Karl committed the first time. That's why the diff includes only what Karl did, it has nothing to do with your working copy.

> What am I supposed to do here?

You would simply commit your working copy to the Inbox repository, using MC's "Save" button.

> I not going to try copying the Files package from Trunk to inbox in case it moves the entire thing and screws life up later.

Copying a version from Trunk to Inbox would make no sense indeed. Wouldn't do harm either.

But your wording clearly shows that you are somewhat confused, but I can't quite pinpoint where that comes from.

The repository-list on the right-hand side of the MC browser is simply a list of potential save destinations. And each repo can be thought of as simply a directory holding mcz files. And each mcz file contains a complete snapshot of the source code of your package, plus the meta data of all ancestor versions.

Saving means taking a snapshot of your working copy ("what's in the image") and storing it.

Loading means creating a diff ("changeset") between a stored snapshot and the working copy, and filing that in.

Merging means creating a diff between the latest common ancestor of the stored snapshot and the working copy, and filing that in. (By extension, that means if the working copy is identical to an ancestor of the stored snapshot, this is exactly the same as loading)

Updating from Trunk basically merges the latest versions found in the Trunk repo.

To share your changes with others, you would update to the latest Trunk version, and then save you working copy, either to Trunk or Inbox.

It is really quite simple ... no?

- Bert -


> On 22-02-2013, at 11:54 PM, [hidden email] wrote:
>
>> A new version of Files was added to project The Inbox:
>> http://source.squeak.org/inbox/Files-kfr.120.mcz
>>
>> ==================== Summary ====================
>>
>> Name: Files-kfr.120
>> Author: kfr
>> Time: 12 November 2012, 6:23:28.531 pm
>> UUID: 4a518133-203f-bd43-9fce-78b8dcfb337d
>> Ancestors: Files-cmm.119
>>
>> Fix for test failure on Windows
>>
>> =============== Diff against Files-cmm.119 ===============
>>
>> Item was added:
>> + ----- Method: DosFileDirectory>>relativeNameIfAbsoluteFor: (in category 'path access') -----
>> + relativeNameIfAbsoluteFor: aFileName
>> + "Answer either the relative name for aFileName, if aFileName names a file in me or
>> + subdirectories, or aFileName's absolute path if it isn't in me or subdirectories.
>> + P.S. Ths is what I'd expect relativeNameFor: to do, but it is taken and means
>> + exactly the opposite, i.e. the absolute path for a relative name."
>> + | fullNameSize fullName fileNameSize |
>> +       (aFileName isEmpty or: [aFileName first ~= self driveName first]) ifTrue:
>> +                 [self error: 'this method expects an absolute filename'].
>> + fullNameSize := (fullName := self fullName) size.
>> + fileNameSize := aFileName size.
>> + ^(aFileName beginsWith: fullName)
>> + ifTrue: [(fileNameSize = fullNameSize
>> + or: [fileNameSize - 1 = fullNameSize
>> + and: [(aFileName at: fileNameSize) = self pathNameDelimiter]])
>> + ifTrue: [self class currentDirectoryNickname]
>> + ifFalse: [aFileName copyFrom: fullNameSize + 2 to: fileNameSize]]
>> + ifFalse: [aFileName]
>> +
>> + "SourceFiles asArray collect: [:sf| FileDirectory default relativeNameIfAbsoluteFor: sf fullName]"
>> + "FileDirectory default relativeNameIfAbsoluteFor: FileDirectory default fullName" "should be dot"
>> + "FileDirectory default relativeNameIfAbsoluteFor: FileDirectory default fullName, FileDirectory default slash" "should also be dot"!
>>
>>
>
>
> tim
> --
> tim Rowledge; [hidden email]; http://www.rowledge.org/tim
> Useful Latin Phrases:- Raptus regaliter = Royally screwed
>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Files-kfr.120.mcz

timrowledge

On 23-02-2013, at 6:16 AM, Bert Freudenberg <[hidden email]> wrote:

>
> On 23.02.2013, at 01:03, tim Rowledge <[hidden email]> wrote:
[snip]
>> d) noted the MC browser displayed '* Files (kfr.120)' as I'd expect
>
> So far, so good. Files-cmm.119 is the latest in Trunk, so since Files-kfr.120 is a direct descendent of that, this is the new ancestor of your working copy.
>
>> e) realised it showed it only in Trunk
>
> ???
>

OK, I had loaded the .120 from the inbox repository, added my change and the MC browser showed Files as changed - all good. BUT it showed Files as being associated with just two repositories - my local files and the Trunk. No mention of inbox. Given that, how would one save it to inbox? I'm sure this a really simple thing to do but I can't see an appropriate button. Adding a repository appears to add a completely new one rather than allow linking to an already in-use repo. I imagine I used to know how to do this but a few years break will remove all sorts of clutter from what passes as ones mind...

[snip]
>
> You would simply commit your working copy to the Inbox repository, using MC's "Save" button.

As I say, how?


tim
--
tim Rowledge; [hidden email]; http://www.rowledge.org/tim
Resistance is useless!  (If << 1 ohm)



Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Files-kfr.120.mcz

Bert Freudenberg
On 23.02.2013, at 19:44, tim Rowledge <[hidden email]> wrote:

> OK, I had loaded the .120 from the inbox repository, added my change and the MC browser showed Files as changed - all good. BUT it showed Files as being associated with just two repositories - my local files and the Trunk. No mention of inbox. Given that, how would one save it to inbox? I'm sure this a really simple thing to do but I can't see an appropriate button. Adding a repository appears to add a completely new one rather than allow linking to an already in-use repo. I imagine I used to know how to do this but a few years break will remove all sorts of clutter from what passes as ones mind...

Add the inbox repo to the files package. Or vice versa, there is a context menu option in either one.

>> You would simply commit your working copy to the Inbox repository, using MC's "Save" button.
>
> As I say, how?


In the MC browser, select the Files package on the left, and the Inbox repo on the right. Press Save.

- Bert -