Carsten Koch wrote:
> Barry Scott wrote:
...
>> this needs to have something extra on the command
line.
>> Always having workbench do this on its default
command
>> line is not good. maybe
>>
>> workbench --project .
Do you require anything else on that patch
before it can get commited?
Carsten.
> It does require "--project `pwd`" or (more
general)
> "--project /abs/path/to/working/copy",
because at the time
> WbApp sees the args, the working directory has been
changed
> to the home directory.
> That's fine, though, because we use a wrapper to call
> workbench anyway.
>
> Carsten.
>
>
>
------------------------------------------------------------
------------
>
> Index: wb_tree_panel.py
>
============================================================
=======
> --- wb_tree_panel.py (revision 675)
> +++ wb_tree_panel.py (working copy)
>  -13,6 +13,7 
> import wx
> import cPickle
> import os
> +import pysvn
>
> import wb_exceptions
> import wb_source_control_providers
>  -142,7 +143,26 
> return '<WbTreePanel %r>' %
self.getSelectionProjectInfo()
>
> def initFrame( self ):
> - self.initTree(
self.app.prefs.getProjects().getProjectList() )
> + project_list =
self.app.prefs.getProjects().getProjectList()
> + if self.app.auto_project_dir is not None:
> + for project in project_list:
> + if project.wc_path ==
self.app.auto_project_dir:
> + break
> + else:
> + if
wb_source_control_providers.hasProvider( 'subversion' ):
> + try:
> + url = pysvn.Client().info(
self.app.auto_project_dir ).url
> + except pysvn.ClientError:
> + url = None
> + if url is not None:
> + provider =
wb_source_control_providers.getProvider( 'subversion' )
> + project_info =
provider.getProjectInfo( self.app )
> + project_name = os.path.split(
self.app.auto_project_dir )[1]
> + project_info.init(
project_name, url = url, wc_path = self.app.auto_project_dir
)
> +
self.app.prefs.getProjects().addProject( project_info )
> + project_list =
self.app.prefs.getProjects().getProjectList()
> +
> + self.initTree( project_list )
> self.gotoBookmark(
self.last_position_bookmark_name )
>
> def OnSetFocus( self, event ):
> Index: wb_app.py
>
============================================================
=======
> --- wb_app.py (revision 675)
> +++ wb_app.py (working copy)
>  -42,6 +42,14 
>
> wb_platform_specific.setupPlatform()
>
> + # --project <dir> automatically creates
a project entry for <dir>
> + # if <dir> is a subversion working copy
and no project entry exists for it.
> + self.auto_project_dir = None
> + if '--project' in args:
> + project_arg_index = args.index(
'--project' )
> + if project_arg_index < len( args ) - 1:
> + self.auto_project_dir =
args[project_arg_index+1]
> +
> # Debug settings
>
> # don't redirect IO into the log window
>
>
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe pysvn.tigris.org
For additional commands, e-mail: dev-help pysvn.tigris.org
|