jwulf / press-star

A node-based implementation of the popular Death Star authoring environment for PressGang / Docbook
4 stars 1 forks source link

Create a new revision when log message requested, even if no XML change #21

Open jwulf opened 11 years ago

jwulf commented 11 years ago

jwulf: mcasperson: looks like no change to topic XML, even with a log message, will not save? [2:44pm] jwulf: ie: not create a new revision [2:44pm] jwulf: so it's not possible to make a "checkpoint" on something without changing the xml [2:44pm] mcasperson: no. but you can edit an extended property to create a revision [2:45pm] jwulf: hmm [2:45pm] jwulf: a little tricky, because the nizzle compares tidied xml [2:46pm] jwulf: so even if i diff the original wiht the current xml in the editor, there is no guarantee that they didn't put in a whitespace to set hte editor to modified [2:46pm] jwulf: to enable a save [2:46pm] jwulf: any idea on that? [2:46pm] jwulf: maybe i do the round trip [2:46pm] jwulf: and if it fails, and the user specified a log entry, i do it again, with an extended property {checkpoint: true} [2:46pm] jwulf: or something [2:47pm] mcasperson: so people are trying to trick the system into saving by using whitespace, which isn't actually getting saved? [2:48pm] jwulf: you do all your edits [2:48pm] jwulf: then you go: "Ok, that's good. Time to hit the revision history" [2:48pm] jwulf: but now you have to edit the XML to make a log entry [2:50pm] mcasperson: the only suggestion i have to force the system to create a revision without changing the xml is to have an extended property tag like "DeathStar Last Saved", and remove and recreate it when the save button is clicked [2:50pm] mcasperson: removing and recreating the extended property will force a new revision, even if nothing else has changed [2:50pm] mcasperson: see https://github.com/pressgang-ccms/PressGangCCMSUI/blob/master/src/main/java/org/jboss/pressgang/ccms/ui/client/local/mvp/presenter/common/CommonExtendedPropertiesPresenter.java#L160 [2:51pm] jwulf: i think the "no revision on no change" feature is sensible [2:51pm] jwulf: so i don't want to break that behaviour [2:51pm] jwulf: it's just that adding a log message to a topic is actually a change [2:51pm] jwulf: i understand that in the internal model the log message relates to the delta in the topic, and since there isn't one.... [2:52pm] jwulf: but in the user model, the log message relates to the delta in hte topic from the last time a major log message was made [2:52pm] jwulf: i'll do the round trip thing and set the property if no new revision was created and a major log message was requested