Artifact
dbd4def99d8bbdeb948e2d73062e5a026ae1439e:
Ticket change
[dbd4def99d]
- New ticket
[67a47646ea] commit failure after merge.
by
leor
2012-02-10 05:25:45.
D 2012-02-10T05:25:45.588
J comment I\sran\sinto\sa\sstrange\sproblem\swhich\sresults\sin\s"fossil\scommit"\sfailure\r\nafter\sa\sspecific\stype\sof\smerge.\sBelow\sI\sincluded\sa\sself-contained\sshell\sscript\sthat\sreproduces\sthe\sproblem.\sTested\swith\strunk\sversion\sof\sfossil\son\sLinux.\r\nHere\sis\sthe\sproblem's\sdescription.\r\nA\sfossil\srepository\sT.fossil\scontains\stwo\sbrunches\s"trunk"\sand\s"next".\r\nIn\sboth\sbranches\sthere\sare\stwo\sfiles\s"foo"\sand\s"bar".\sAt\ssome\spoint\sin\r\ndevelopment\sprocess\sI\smerge\sbranch\snext\sinto\sthe\strunk.\sThe\scontents\r\nof\sthe\sfiles\sare\ssuch\sthat\s"fossil\smerge\snext"\ssuccessfully\r\nauto-merges\schanges\sin\sbar\sbut\shas\smerge\sconflicts\sin\sfoo\sthat\shas\sto\r\nbe\smanually\sresolved.\sSo\sfar\sso\sgood.\r\n<verbatim>\r\n$\sfossil\scha\r\nUPDATED_BY_MERGE\sbar\r\nEDITED\s\s\s\s\sfoo\r\n</verbatim>\r\n\r\nThe\sproject's\sinternal\slogic\sdictates\sthat\swhile\sfixing\smerge\r\nconflicts\sin\sfoo\sI\shave\sto\smake\ssome\schanges\sto\sbar.\r\nAfter\sany\schanges\sto\s"bar"\sfossil\srefuses\sto\scommit\sclaiming\sthat\r\n"working\scheckout\sdoes\snot\smatch\swhat\swould\shave\sended\sup\sin\sthe\srepository".\r\n\r\nI\sthink\sthis\sbehavior\sis\sincorrect,\sfor\sit\sforces\sme\sto\scommit\sa\r\nbroken\sstate\sof\sthe\sproject,\slet\ssay\scode\sdoes\snot\scompile.\r\nPlease,\srun\san\sattached\sshell\sscript\sto\sreproduce\sthe\sproblem.\r\n\r\n<verbatim>\r\n----%<--------%<----\r\n#!/bin/bash\r\n################################################################################\r\n#\sDemonstrates\s"fossil\scommit"\sfailure\safter\smerge.\r\n#\sWe\shave\sa\srepo\swith\stwo\sfiles\sbar,\sfoo\swhich\sis\sbeing\sdeveloped\sin\sbranches\s\r\n#\strunk\sand\snext.\sAt\ssome\spoint\snext\sis\smerged\sinto\strunk.\sbar\sis\ssuccessfully\s\r\n#\sautomerged\swhile\sfoo\shas\smerge\sconflicts\srequiring\smanual\sresolution.\s\r\n#\sFrom\sinternal\slogic\sof\sthe\sproject\sresolving\sconflicts\sin\sfoo\srequires\s\r\n#\smodifications\sto\sbar.\sAfter\sbar\sis\sedited\s"fossil\scommit"\sfails!\r\n################################################################################\r\n\r\n#\sPreamble\sto\ssetup\sdirectories\sand\soutput\sredirection\r\nBNAME=merge-conflict\r\nRTDIR="/tmp/fossil-tests/$BNAME"\r\nrm\s-rf\s\s\s"$RTDIR"\r\nmkdir\s-p\s"$RTDIR"\r\nexec\s2>&1\r\nexec\s1>&\s>(tee\s"$RTDIR/T.log")\r\necho\s"**************************************************************************"\r\necho\s"**\s\s$RTDIR/T.log\s\s\s\s\s--\sthis\slog"\r\necho\s"**\s\s$RTDIR/T.fossil\s\s--\stest\srepo"\r\necho\s"**\s\s$RTDIR/T\s\s\s\s\s\s\s\s\s--\scheckout"\r\necho\s"**************************************************************************"\r\nset\s-x\r\n\r\n#\sTest\scase\r\ncd\s"$RTDIR"\t\t\t#\sNow\sin\s$RTDIR\r\nfossil\snew\sT.fossil\r\nmkdir\s-p\sT\r\ncd\sT\t\t\t\t#\sNow\sin\s$RTDIR/T\r\nfossil\sopen\s../T.fossil\r\necho\s"foo\sin\sthe\sbranch\strunk"\s>\sfoo\r\necho\s"bar\sin\sthe\strunk"\s>\sbar\r\nfossil\sadd\sfoo\sbar\r\nfossil\sci\s-m\s'added\sfoo,\sbar\sto\sthe\strunk'\r\necho\s"foo\sin\sthe\sbranch\snext"\s>\sfoo\r\necho\s"line\sadded\sto\sbar\sin\sbranch\snext"\s>>\sbar\r\nfossil\sci\s--branch\snext\s-m\s'commit\sto\snewly\screated\sbranch\snext'\r\n#\sgo\sto\sthe\strunk\s\r\nfossil\sco\strunk\r\nfossil\sinf\r\n#\smake\schanges\sto\strunk\r\necho\s"new\sfoo\sversion\sin\sthe\strunk"\s>\sfoo\r\nfossil\sci\s-m\s'foo\schanged\sin\strunk'\r\n#\smerge\snext\sinto\strunk\r\nfossil\smerge\s--detail\snext\r\nfossil\scha\r\necho\s"merged\sversion\sof\sfoo"\s>\sfoo\r\necho\s"resolving\smerge\sconflicts\sin\sfoo\srequired\schanges\sin\sbar"\s>\sbar\r\n#\strying\sto\scommit.\sGETTING\sERRORS!!!\r\nfossil\sci\s--force\s-m\s'resolved\sconflicts\sin\sfoo'\r\n\r\n#EoF\r\n---->%-------->%----\r\n</verbatim>
J foundin trunk
J private_contact 88dd45b41c4c2c9de79828b446518623552710a5
J severity Severe
J status Open
J title commit\sfailure\safter\smerge
J type Code_Defect
K 67a47646ea38c7ed77112b579a6f7dce84e4eda9
U leor
Z 3849413b75ff783147889d7c984df025