Merge lp:~robs987/leo-editor/openWith into lp:leo-editor/old-trunk

Proposed by Rob Sheppard
Status: Needs review
Proposed branch: lp:~robs987/leo-editor/openWith
Merge into: lp:leo-editor/old-trunk
Diff against target: 58 lines
2 files modified
leo/core/leoCommands.py (+15/-4)
leo/doc/leoToDo.txt (+15/-4)
To merge this branch: bzr merge lp:~robs987/leo-editor/openWith
Reviewer Review Type Date Requested Status
Ville M. Vainio Approve
Review via email: mp+14194@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Rob Sheppard (robs987) wrote :

Modification to openWith to allow user to edit nodes of @<file> trees in external editor while preserving the file extension of root @<file> node.

Revision history for this message
Ville M. Vainio (villemvainio) wrote :

Fine with me, will merge to trunk later

review: Approve
Revision history for this message
Ville M. Vainio (villemvainio) wrote :

Still get

ville@ville-desktop:~/leo-editor$ bzr merge lp:~robs987/leo-editor/openWith
bzr: ERROR: KnitPackRepository('file:///home/ville/leo-editor/.bzr/repository/')
is not compatible with
RemoteRepository(bzr+ssh://bazaar.launchpad.net/~robs987/leo-editor/openWith/.bzr/)
different rich-root support

I know that I can fix this by doing "bzr convert" on leo-editor branch, or apply the fix manually - but in the light of recent launchpad problems, I'll let this sit for a few more days. I hope you don't mind, just notifying that this contribution is by no means forgotten right now.

Revision history for this message
Rob Sheppard (robs987) wrote :

Ville M. Vainio wrote, On 11/7/2009 3:19 PM:
> Still get
>
> ville@ville-desktop:~/leo-editor$ bzr merge lp:~robs987/leo-editor/openWith
> bzr: ERROR: KnitPackRepository('file:///home/ville/leo-editor/.bzr/repository/')
> is not compatible with
> RemoteRepository(bzr+ssh://bazaar.launchpad.net/~robs987/leo-editor/openWith/.bzr/)
> different rich-root support
>
> I know that I can fix this by doing "bzr convert" on leo-editor branch, or apply the fix manually - but in the light of recent launchpad problems, I'll let this sit for a few more days. I hope you don't mind, just notifying that this contribution is by no means forgotten right now.
>
>

Sorry for the delay, I've been swamped at work.

I suppose this is caused by me having the wrong "rich-root support" in
my local repo, which I don't really understand because I'm just using
the defaults. Any suggestions for how I should be setting up my local
repo/branch?

In the meantime, I'll educate myself on this rich-root stuff.

If it's a hassle for you to merge this little change, don't feel
obligated. It was mainly an exercise to help me learn some of Leo's code
and the process of contributing, the later being more complicated than I
though it was :)

Thanks again for helping a n00b.

Rob

Unmerged revisions

2459. By Rob Sheppard

Modified openWith to get file extension for @<file> nodes from file name

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'leo/core/leoCommands.py'
--- leo/core/leoCommands.py 2009-10-08 00:25:54 +0000
+++ leo/core/leoCommands.py 2009-10-29 23:05:26 +0000
@@ -725,10 +725,21 @@
725 #@ << set ext based on the present language >>725 #@ << set ext based on the present language >>
726 #@+node:ekr.20031218072017.2824:<< set ext based on the present language >>726 #@+node:ekr.20031218072017.2824:<< set ext based on the present language >>
727 if not ext:727 if not ext:
728 theDict = c.scanAllDirectives()728 # if node is part of @<file> tree, get ext from file name
729 language = theDict.get("language")729 for cursor in p.self_and_parents():
730 ext = g.app.language_extension_dict.get(language)730 if cursor.isAnyAtFileNode():
731 # g.pr(language,ext)731 h = cursor.h
732 f = h.split(None, 1)[1]
733 ext = os.path.splitext(f)[1]
734 break
735
736 # otherwise use ext from @language directive
737 if not ext:
738 theDict = c.scanAllDirectives()
739 language = theDict.get("language")
740 ext = g.app.language_extension_dict.get(language)
741 # g.pr(language,ext)
742
732 if ext == None:743 if ext == None:
733 ext = "txt"744 ext = "txt"
734745
735746
=== modified file 'leo/doc/leoToDo.txt'
--- leo/doc/leoToDo.txt 2009-10-16 10:53:52 +0000
+++ leo/doc/leoToDo.txt 2009-10-29 23:05:25 +0000
@@ -3948,10 +3948,21 @@
3948 return "break"3948 return "break"
3949#@+node:ekr.20031218072017.2824:<< set ext based on the present language >>3949#@+node:ekr.20031218072017.2824:<< set ext based on the present language >>
3950if not ext:3950if not ext:
3951 theDict = c.scanAllDirectives()3951 # if node is part of @<file> tree, get ext from file name
3952 language = theDict.get("language")3952 for cursor in p.self_and_parents():
3953 ext = g.app.language_extension_dict.get(language)3953 if cursor.isAnyAtFileNode():
3954 # g.pr(language,ext)3954 h = cursor.h
3955 f = h.split(None, 1)[1]
3956 ext = os.path.splitext(f)[1]
3957 break
3958
3959 # otherwise use ext from @language directive
3960 if not ext:
3961 theDict = c.scanAllDirectives()
3962 language = theDict.get("language")
3963 ext = g.app.language_extension_dict.get(language)
3964 # g.pr(language,ext)
3965
3955 if ext == None:3966 if ext == None:
3956 ext = "txt"3967 ext = "txt"
39573968

Subscribers

People subscribed via source and target branches

to status/vote changes: