[Newbies] Monticello Copy vs Save
Bert Freudenberg
bert at freudenbergs.de
Thu Oct 4 22:35:14 UTC 2012
On 2012-10-04, at 23:22, Jeff Gonis <jeff.gonis at gmail.com> wrote:
> Hi Everyone,
>
> So I am working to learn the ins and out of monticello but the available documentation isn't super detailed. I figured I would look towards some documentation for other DVCSs and see if the general principles could help guide me through Monticello. Hg-init is one of my favorite tutorials, so I thought I would try to work through it using monticello, and mapping as best as I could onto a fairly mainstream DVCS model.
>
> So I have created a package and made some edits and saved them to a local monticello repository on disk. Now I would like to send my changes to some hypothetical "central" repository that me and the rest of the team are working off of. This would be the equivalent of a "push" in mercurial. If I select the "central" repository in the Monticello Browser and click save, it pops up a commit message window and looks like it will be saving a new version of my package into the central repository, even though I haven't made any changes to the package. On the other hand I can also open my local repository and copy the last revision into the central repository.
>
> Which of these is considered the standard way of using Monticello.
Short answer: Copy.
> Or should I be doing something completely different? Is trying to map "hg push" onto Monticello completely wrong-headed? Please let me know and I will keep trying to soldier on.
Long answer: It's a valid question. And while Monticello does *not* treat repositories like hg or git etc., don't worry, because at its core, MC is extremely simple:
Every package version in MC is self-contained. There is no logic in the repository, only in each version file.
An MC repository is nothing more than a collection of versions. On disk, it's a collection of MCZ files. Similarly on WebDAV (e.g., squeaksource). Each MCZ contains a *full* snapshot of the sourcecode, and a *full* copy of the metadata, including *all* its history. Yes that's wasteful, but it's also TSTTCPW.
Knowing that, "pushing" a version to a remote HTTP repository is simply uploading the MCZ per WebDAV. It's copying a version from one directory to another, so that's what the "copy" button does. "Committing" a version to a repository means taking a snapshot of the source code, adding a new version info to the history, and saving that to a file on your disk (the package cache directory) and possibly to another repository. That's what the "save" button does, but you knew that already :)
- Bert -
More information about the Beginners
mailing list