Hi, ok I see. If version history has at least one regular version I will check if node with UUID jrc:versionableUuid exists. If it does not exist it is orphaned version history and I can remove it by removing versions from it (from version history).
If version history has only root version there is now no way how to remove it till JCR-3238 is fixed. (root version frozen node actually does not contain any big data - we use nt:file nodes as versionable so I am mainly concerned about saving space). (Our old code was wrong - it created versionable nodes and deleted them right before next update without calling checkin. So it resulted exactly in second case.) Thanks Marek Hi, " removing the last regular version of a version history should remove the version history. See: https://issues.apache.org/jira/browse/JCR-134 however, there's a special case and an open issue, when only a root version exists for a versionable node. see: https://issues.apache.org/jira/browse/ JCR-3238 regards marcel > -----Original Message----- > From: Marek Slama [mailto:[email protected]] > Sent: Montag, 8. Juli 2013 15:54 > To: [email protected] > Subject: Remove unused version history > > Hello, > > I want to ask if there is any way how to remove unused version history. My > (incorrect used case) > > 1.Add versionable node. > 2.Remove versionable node without removing version history. > > I know it is possible to remove version history when I get version history > first from node using: > versionHistory = versionManager.getVersionHistory(String absPath); > > But if it is omitted I can only find out unused version history nodes but as > they are protected it is not possible to > remove it. > > Thanks > > Marek"
