i store up this mail in gmail, but never try to fixed code flow EKR's point.
thanks for EKR's Aha, 3 years question, fixed in Leo 5.2 !
notice this, just after terror story:
- i always use Leo to develop complex scripts
+ when start PyQt4 coding, also base Leo
+ but, this time under git-flow
- even upgrade into Leo 5.2, but my skill stan as 4.0
+ as one Leonard, for Nancy in teams
+ i had usage @shadow
+ and of course put .leo into git repository too
- so in the beginning:
+ after 4 hours coding, happy finished one feature develop
+ base git-flow input:
* $ git flow hotfix finish BIG-FEATURE
+ as normal git-flow will:
* Latest objects have been fetched from 'origin'
* Hotfix branch has been merged into 'master'
* The hotfix was tagged 'BIG-FEATURE'
* Hotfix branch has been back-merged into 'develop'
* Hotfix branch 'hotfix/BIG-FEATURE' has been deleted
+ BUT!!! because .leo also in git
* and can not Auto-merging with old version
* the git-flow hotfix flow break
- terror start:
+ try move .leo out git repository, and change @path
+ wants re-write all scripts, merge again
+ BUT! i forgot @shadown node NOT save data for code
+ so, after cmd+s, i got empty .py and .leo_shadow/*.py
- CAN MOVE minutes for so terror:
+ luck remember git keep all verion in breach
+ so revert develop breach
+ change back 'hotfix/BIG-FEATURE'
* into .leo change all @shadow to @nosent
* move .leo out git repository
* chnage @path
+ re-try `$ git flow hotfix finish BIG-FEATURE`
- kill the terror time
through this, i learned:
- .leo is too personal , need not put into git repositry
- @shadow is not strong enough
- nust use new directive
so review leo document, largh in Aha time ;-)
History of Leo — Leo 5.2 documentation
http://leoeditor.com/history.html#genesis-of-clean
and recheck : Appendices — Leo 5.2 documentation
http://leoeditor.com/appendices.html#the-mulder-ream-update-algorithm
notice @clean, and make confirm in:
Summary: @clean vs @file -> Programming with Leo — Leo 5.2 documentation
http://leoeditor.com/tutorial-programming.html#summary-clean-vs-file
for working with Nancy, i need @clean forever!
BUT the new leo-flow with git-flow is lost one command?
- how to updating @cloean nodes in Leo? need not to restart Leo?
- in my test:
+ edit .py out leo, make conflict
+ try cmd+s, leo alert:
... .py
has changed outside Leo.
Overwrite the outline node?
- but try all kind of command in file menus
- not found withch one make Leo :
+ read out .py
+ base The Mulder/Ream algorithm updaing nodes
- so i had to clode all Leo windows
- restart Leo, so the "Recovered Nodes" auto generated
On Mon, Oct 28, 2013 at 6:42 AM, Edward K. Ream <
edre...@gmail.com> wrote:
> On Sun, Oct 27, 2013 at 9:01 PM, Zoom.Quiet <
zoom....@gmail.com> wrote:
>
>> 2013/10/28 Edward K. Ream <
edre...@gmail.com>:
>
>
>> No. The local cache is just a detail :-) It merely needs to remember the
>> files *with* sentinels **on Nancy's local machine.** SCCS repository
>> *never* sees the cache. Only Nancy's push/pull hooks see the cache.
>>
>
> - the ~/.leo dir? sure, is the right space!
> - but, the @shadow algorithm is usage between who?
> - i guess just only can base the local user file and the lastest
> ver
> s
> ion in SCCS ?
>
> The @shadow algorithm is applied just before pushing a new version of one of
> Nancy's files, say x.py. Therefore the input to the @shadow algorithm is:
>
> 1. The cached version of x.py This is the latest version of x.py that was
> pulled from SCCS. It contains sentinels. In @shadow terminology, this is
> the **private file**.
>
> 2. The version of x.py that Nancy is pushing. This file is in Nancy's local
> SCCS repository. This file contains no sentinels. In @shadow terminology,
> this is the **public file**.
>
> - so this ways is perfect for DVCS but svn/csv/vss etc. Center VCS is not
> good.
>
> I believe this scheme will work for any kind of SCCS because the hooks only
> work on a) the local repository and b) the local cache.
>
> ok all clean!
> - wait the brz first show us the prototype hooks
> - just need know how call the @shadow algorithm from Leo
> - in fact, this @shadow algorithm is very useful for other action,
> etc. co-writing system
>
> I don't have time to do a prototype now. Here are the places containing
> relevant code:
>
> - leoShadow.py contains the fundamental @shadow algorithm plus quite a bit
> of support code.
>
> - leoAtFile.py contains the code actually reads and writes @shadow trees:
> See at.readOneAtShadowNode and at.openFileForReading.
>
> The at.atShadow ivar is set True in the init code for @shadow trees, so
> searching for atShadow will show you the special-case code involved. This
> code is tricky, as you will see.
>
> - I have been saying that we can ignore the details of the cache as far as
> the *design* of this scheme goes, but the actual code is non-trivial.
>
> The leoCache.py file contains the fundamental caching code that Leo uses to
> cache files. Using this code is *very* tricky. Here is the relevant code
> from at.read::
>
> if fromString:
> s,loaded,fileKey = fromString,False,None
> else:
> s,loaded,fileKey = c.cacher.readFile(fileName,root)
> # Never read an external file with file-like sentinels from the cache.
> isFileLike = loaded and at.isFileLike(s)
> if not loaded or isFileLike:
> # if trace: g.trace('file-like file',fileName)
> force = True # Disable caching.
> if loaded and not force:
> if trace: g.trace('in cache',fileName)
> at.inputFile.close()
> root.clearDirty()
> return True
>
> For the push hook, fromString will always be False.
>
> It appears that at.isFileLike returns True is the file uses *old-style*
> @file sentinels, so we can ignore this test.
>
> So for the bzr push hook, the simplified code to get the cached file will
> be::
>
> s,loaded,fileKey = c.cacher.readFile(fileName,root)
> if loaded:
> << use s as the contents of the private file >>
>
> The fileKey is used later in at.read to write the newly-read contents of the
> file back to the cache. This write may not be strictly necessary, but it
> would simplify the @shadow algorithm if Nancy pushes the file again before
> pulling it.
>
> To repeat, I don't have time to do this now. I've given you the places from
> which I would start.
>
> Edward
...
--
Life's Pathetic, Let's Pythonic! 人生苦短, Python是岸!
俺:
http://zoomquiet.io
授:
http://creativecommons.org/licenses/by-sa/2.5/cn/
怒: 冗余不做,日子甭过!备份不做,十恶不赦!
KM keep growing environment culture which promoting organization be learnning!