Qc@sdZddlmZddlmZmZmZdZde dZ dZ ie ddded fged fd 6e gd fd 6Z ej d7_ dS(s:share a common history between several working directoriesi(t_(thgtcommandstutiltinternalcCstj|||| S(screate a new shared repository Initialize a new repository and working directory that shares its history with another repository. .. note:: using rollback or extensions that destroy/modify history (mq, rebase, etc.) can cause considerable confusion with shared clones. In particular, if two shared clones are both updated to the same changeset, and one of them destroys that changeset with rollback, the other clone will suddenly stop working: all operations will fail with "abort: working directory has unknown parent". The only known workaround is to use debugsetparents on the broken clone to reset it to a changeset that still exists (e.g. tip). (Rtshare(tuitsourcetdesttnoupdate((s//sys/lib/python2.7/site-packages/hgext/share.pyR scCs|j|jkr*tjtdnd}}|j}zYtj|||j}|j d}tj ||d|j j d|j Wd|o|j|o|jX|j|j|jdS(suconvert a shared repository to a normal one Copy the store data to the repo and remove the sharedpath data. sthis is not a shared repot sharedpaths.oldN(R tpathRtAbortRtNonetlockRt copystoretjointrenamet requirementstdiscardt_writerequirementstreleaset__init__tbaseuitroot(RtrepotdestlockRt sharefile((s//sys/lib/python2.7/site-packages/hgext/share.pytunshare!s  tUR sdo not create a working copys[-U] SOURCE [DEST]RtRs shareN(t__doc__tmercurial.i18nRt mercurialRRRt testedwithR tFalseRRtcmdtabletnorepo(((s//sys/lib/python2.7/site-packages/hgext/share.pyts