collective / mr.bob

Mister Bob (the builder) is filesystem template renderer
http://mrbob.readthedocs.org/en/latest/
Other
69 stars 30 forks source link

Allow to clone a template instead of copying or extracting #88

Open tobiasherp opened 5 years ago

tobiasherp commented 5 years ago

If I'm informed correctly, it is possible to use a template via file system copy, or to specify the URL of an archive to be extracted.

What I'd like to be able to do, is: to clone my template. That way I could update my generated bobtemplates.plone packages when the template has improved.

Git

The template would be used by git clone <source.git> <dest-dir>.

Subversion

The template would be created by some svn copy <svn-url> <dest-url> command.

The dest-url could be constructed using the given dest-dir and a configured projects base url. The commit message could be generated, e.g. as mr.bob: creating <dest-dir> and an information about the command used.

By default, the .../trunk of the source template would be copied (unless configured otherwise) to the trunk of the new package, and tags and branches would be created via svn mkdir <svn-url>... (it is possible to create more than one in one commit); the trunk would be used for the svn checkout ... <dest-dir>.

There would be several svn commits in the process; no problem, if you ask me.

When svn resources are copied this way, .svn folders in the copy are no problem anymore (#43).

Others

Once one is implemented, it shouldn't be difficult to add more.

Any SCM tool

Renamings would need to be done using the rename or mv command of the respective SCM tool; there are git mv and svn mv (which is an alias for svn move), for example.