101
Existingversionsareeditedbyauser,andtheresultsareaddedtotheversiongraphbya
useroperation.Versionsarealmostalwaysstoredinasinglelogicalrepository,althoughit
maybephysicallydistributedacrossmultiplemachines.Accesscontrolisprovidedsothat
onlyversionswithoutsuccessorscanbeupdated,addingnewnodestothegraph,andto
preventusersfrominadvertentlycreatingunwantedversions.Whennon-treestructuredver-
siongraphsaresupported,theyarecreatedbyuser-executedmergeoperations.Amergeop-
erationcreatesanewstatethatisadescendentofmorethanonenodeintheversiongraph.
Thestructureofchangehistoriesistheotherfactorindetermininghowchangesinteract,
andhowconflictsariseandareresolved.Table1.1(inSection1.4)liststheusualuser-visible
historystructuresintermsofthetopologyofversiongraphs.Anygeneralinfrastructure
shouldbeabletosupportthesemodels.Onekeycharacteristicofthenotionsofserializabil-
itythatwearereplacingisthatchangesaretemporallyorderedinalinearway.Whendiver-
genteditingoccurs,aforkinthehistoryalsooccurs,andoneconcerniswhetherandhowto
mergeorremovetheseforks.
Manytoolsforsoftwareengineering,revisioncontrolandcollaborativeauthoringuse
lockingorotherconcurrencymechanismstoensurethatsimpleeditinghistoriesarealways
maintained,andthustoavoidthenecessityhandlingmergeanditsmorecomplexchange
histories.By“simple”editinghistoriesImeaneithersequentialortree-structuredhistories.
Whiletreestructuredhistoriesdopermitalternativevariantsofabasicsequence,theyare
simpleinthesensethatanystateofthesequencehasasinglelinear,temporallyorganized
lineofdescent.Mosttoolsencouragehistoriesofthisform,andforthemthemergeproblem
isanexceptionalcase,onlyinvokedwhenthenormalsynchronizationmechanismsofthe
systemaresubvertedordeliberatelysuspended.
Intraditionalversionsystems,thereisnosystem-enforcedinherentrelationshipbetween
thecontentsofoneversionintheversiongraphandthecontentsofitspredecessor(s).The
actualrelationshipofversionsinthegraphisdeterminedbytheusersperformingcheck-in
102
operations.Theonlyconstraintactuallyenforcedbyasystemisthatbeforecheckinginthe
newversiontheuserwhocreatedanewerversionatleasthadtheopportunitytolookat
(andedit)itspredecessors.Inpractice,ofcourse,succeedingversionsusuallyusuallyarethe
resultofeditingthepreviousversion,andsystemstakeadvantageofthisfact,usingdiff
algorithmstooptimizethestorageofversions.
5.1.1 RepresentingtraditionalversiongraphsinPalimpsest
APalimpsestmodeloftraditionalsoftwareengineering-styleversioningapproacheslike
thosein,e.g.(Rochkind1975;Tichy1985;Cohen,Sonietal.1988).Considerabranching
systemwithoutmerge.APalimpsestmodelofthissystemuseschangesetstorepresenteach
nodeintheversiongraph.Eachchangesetcorrespondingtoanodewouldbeasupersetof
thechangesetrepresentingitsparentnode,correspondingtothefactthatitwasderivedby
addingchangestoitsparent.
Addingmergetosuchasystempotentiallyintroducesproblems,inthecasethatcompo-
nentchangesconflict.Whennoconflictsarepresent,amergeresultisobtainedsimplyby
takingtheunionofthetwoparents.Thisresultwouldthenserveasthebaseforanyuser
correctionstotheresultofthemerge,intheformofadditionalchangestothemergedver-
sion.Inthepresenceofconflicts,therearetwopossibilities.Thesimplestistoeliminate
conflictsbyamendingtheaddressorderingasdiscussedinSection4.3.2.Thissimplepossi-
bility,howeverisratherdifferentfromthepoliciesofthesystemsthatwearetryingto
emulate.
Analternativeapporachisthecreateaninitialmergeresultrepresentingaconflict-free
unionofthechangesinthetwoparentversions.Theconflictingchangeswouldbestoredin
aseparatechangesetforhandinterventionbytheuser,operation-by-operation.Inthis
case,themechanicalmergerwouldserveasastartingpointfortheusertocreateafinal
mergeresult.Thisisessentiallysimilartothemergefacilitiesinmostsoftwareconfiguration
managementsystems,whichdetectdifferences,andthenoffertheusertheopportunityto
Previous Page Next Page