Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Nic Wise 51 posts 85 karma points
    Sep 13, 2010 @ 12:46
    Nic Wise

    Document Types (and other settings) in SVN

    Hi there

    I've been googleing around a fair bit trying to find a solution to this.

    Basically, we need to put everything in source control except maybe content. masterpages, css, js etc are all easy. Document Types are not, neither are the settings for macro's.

    The only option I can see is to manually export them (or make a package), unzip the package file and version that. Not exactly nice, but it'll work if people remember to do it.

    However, I'd love a command line tool to do the package export and import - so we can maybe do it via Team City (CI tool). Anyone done this?



  • Ismail Mayat 4379 posts 9526 karma points MVP 2x admin c-trib
    Sep 13, 2010 @ 13:46
    Ismail Mayat


    With regards to document types i do recall seeing something from Shannon and Slace they implemented action handler to export out xml of doc type on change and that was then being versioned cant see to find the post.



  • Nic Wise 51 posts 85 karma points
    Sep 13, 2010 @ 13:50
    Nic Wise

    Thanks Ismail, I'll have a hunt around - that sounds like a good idea - make a documenttype folder, and export to there on save.


  • Steen Tøttrup 191 posts 291 karma points c-trib
    Sep 13, 2010 @ 13:51
    Steen Tøttrup

    I've been working on a solution for this (doc type, macros, etc etc.), but work has put an end to this project lately.

    A quick fix would be to export doc types (to xml) on the onchange event, and you could put up a filesystemwatcher to catch when a file was changed (put it in a folder where only the xml files of the doc types are located), and overwrite the xml of the doc type.

    I guess you could do something quick for macros too.

    The solution I've been working on involves a lot of UI work etc, so no chance of me finishing it in the near future.


  • Shannon Deminick 1494 posts 5045 karma points hq
    Sep 13, 2010 @ 13:58
    Shannon Deminick

    Yeah, i can't remember the post either but essentially the idea is:

    Bind to events in Umbraco to save out a serialized version of Document types, macros, dictionary, etc... which can then be saved to source control. Our Snapshot product (which will hopefully have a beta program launched soon) already does all of this serialization for you with the command line.

    The tricky part is if you want to try to restore an umbraco instance based on this.... which we haven't written. The tricky part of this is that if you have references to exact node IDs in your config, pickers, etc.... doing a restore from data will create new ids.

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Sep 13, 2010 @ 14:07
    Steen Tøttrup

    I got that part working too!

    Maybe I should release what I got, and instead of developing an UI, just hook it up with event handlers.

  • Aaron Powell 1708 posts 3043 karma points c-trib
    Sep 13, 2010 @ 14:40
    Aaron Powell

    Here's the article Shan is referring to:

  • Nic Wise 51 posts 85 karma points
    Sep 13, 2010 @ 17:44
    Nic Wise

    Thanks everyone, thats a great help.



Please Sign in or register to post replies

Write your reply to: