Hi, thank you for reply.
> Ok, now to_location only gets the text from checkout_basedir if ui_mode is true. 'bzr qgetnew location' does work now.
Why ui_mode? I don't think ui_mode is good thing to switch this behaivior. Now, 'bzr qgetnew' probably does not work as you expected.
I'd like to suggest you this fix. How about it?
1. cmd_qgetnew._qbzr_run Change default value of location to None, instead of CUR_DIR
2. GetNewWorkingTreeWindow.__init__ Apply configuration if to_location is None.
=== modified file 'lib/commands.py' --- lib/commands.py 2011-06-30 16:28:58 +0000 +++ lib/commands.py 2011-07-26 15:04:12 +0000 @@ -851,7 +851,7 @@ takes_options = [ui_mode_option] aliases = ['qgetn']
- def _qbzr_run(self, location=CUR_DIR, ui_mode=False): + def _qbzr_run(self, location=None, ui_mode=False): from bzrlib.plugins.qbzr.lib.getnew import GetNewWorkingTreeWindow self.main_window = GetNewWorkingTreeWindow(location, ui_mode=ui_mode) self.main_window.show()
=== modified file 'lib/getnew.py' --- lib/getnew.py 2011-07-25 13:23:12 +0000 +++ lib/getnew.py 2011-07-26 15:03:55 +0000 @@ -44,10 +44,9 @@ branchsource_basedir = config.get_option("branchsource_basedir")
def __init__(self, to_location, ui_mode=True, parent=None): - if ui_mode and self.checkout_basedir is not None: - self.to_location = os.path.abspath(self.checkout_basedir) - else: - self.to_location = os.path.abspath(to_location) + if not to_location: + to_location = self.checkout_basedir or u'.' + self.to_location = os.path.abspath(to_location)
super(GetNewWorkingTreeWindow, self).__init__( name = self.NAME,
« Back to merge proposal
Hi, thank you for reply.
> Ok, now to_location only gets the text from checkout_basedir if ui_mode is true. 'bzr qgetnew location' does work now.
Why ui_mode? I don't think ui_mode is good thing to switch this
behaivior. Now, 'bzr qgetnew' probably does not work as you expected.
I'd like to suggest you this fix. How about it?
1. cmd_qgetnew. _qbzr_run
Change default value of location to None, instead of CUR_DIR
2. GetNewWorkingTr eeWindow. __init_ _
Apply configuration if to_location is None.
=== modified file 'lib/commands.py'
--- lib/commands.py 2011-06-30 16:28:58 +0000
+++ lib/commands.py 2011-07-26 15:04:12 +0000
@@ -851,7 +851,7 @@
takes_options = [ui_mode_option]
aliases = ['qgetn']
- def _qbzr_run(self, location=CUR_DIR, ui_mode=False): plugins. qbzr.lib. getnew import GetNewWorkingTr eeWindow
self. main_window = GetNewWorkingTr eeWindow( location, ui_mode=ui_mode)
self. main_window. show()
+ def _qbzr_run(self, location=None, ui_mode=False):
from bzrlib.
=== modified file 'lib/getnew.py' ce_basedir = config. get_option( "branchsource_ basedir" )
--- lib/getnew.py 2011-07-25 13:23:12 +0000
+++ lib/getnew.py 2011-07-26 15:03:55 +0000
@@ -44,10 +44,9 @@
branchsour
def __init__(self, to_location, ui_mode=True, parent=None): basedir is not None: abspath( self.checkout_ basedir) abspath( to_location) basedir or u'.' abspath( to_location)
- if ui_mode and self.checkout_
- self.to_location = os.path.
- else:
- self.to_location = os.path.
+ if not to_location:
+ to_location = self.checkout_
+ self.to_location = os.path.