/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2007-02-11 19:26:40 UTC
  • mto: (2230.3.47 branch6)
  • mto: This revision was merged to the branch mainline in revision 2290.
  • Revision ID: aaron.bentley@utoronto.ca-20070211192640-d7zioevyig0w2r2u
Implement re-binding previously-bound branches

Show diffs side-by-side

added added

removed removed

Lines of Context:
2835
2835
    before they are executed on the local one.
2836
2836
    """
2837
2837
 
2838
 
    takes_args = ['location']
 
2838
    takes_args = ['location?']
2839
2839
    takes_options = []
2840
2840
 
2841
2841
    def run(self, location=None):
2842
2842
        b, relpath = Branch.open_containing(u'.')
 
2843
        if location is None:
 
2844
            try:
 
2845
                location = b.get_old_bound_location()
 
2846
            except errors.UpgradeRequired:
 
2847
                raise errors.BzrCommandError('No location supplied.  '
 
2848
                    'This format does not remember old locations.')
 
2849
            else:
 
2850
                if location is None:
 
2851
                    raise errors.BzrCommandError('No location supplied.  '
 
2852
                        'No previous location known')
2843
2853
        b_other = Branch.open(location)
2844
2854
        try:
2845
2855
            b.bind(b_other)