/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/foreign.py

  • Committer: Jelmer Vernooij
  • Date: 2010-02-15 20:23:34 UTC
  • mto: This revision was merged to the branch mainline in revision 5042.
  • Revision ID: jelmer@samba.org-20100215202334-fbhg2hk7yj9e3281
Repository.get_revision_xml() has been removed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
        """Get the default mapping for this repository."""
226
226
        raise NotImplementedError(self.get_default_mapping)
227
227
 
 
228
    def _get_inventory_xml(self, revision_id):
 
229
        """See Repository._get_inventory_xml()."""
 
230
        return self._serialise_inventory(self.get_inventory(revision_id))
 
231
 
228
232
 
229
233
class ForeignBranch(Branch):
230
234
    """Branch that exists in a foreign version control system."""
259
263
 
260
264
 
261
265
class cmd_dpush(Command):
262
 
    __doc__ = """Push into a different VCS without any custom bzr metadata.
 
266
    """Push into a different VCS without any custom bzr metadata.
263
267
 
264
268
    This will afterwards rebase the local branch on the remote
265
269
    branch unless the --no-rebase option is used, in which case 
296
300
        except NoWorkingTree:
297
301
            source_branch = Branch.open(directory)
298
302
            source_wt = None
299
 
        if source_wt is not None:
300
 
            source_wt.check_changed_or_out_of_date(
301
 
                strict, 'dpush_strict',
302
 
                more_error='Use --no-strict to force the push.',
303
 
                more_warning='Uncommitted changes will not be pushed.')
 
303
        if strict is None:
 
304
            strict = source_branch.get_config(
 
305
                ).get_user_option_as_bool('dpush_strict')
 
306
        if strict is None: strict = True # default value
 
307
        if strict and source_wt is not None:
 
308
            if (source_wt.has_changes()):
 
309
                raise errors.UncommittedChanges(
 
310
                    source_wt, more='Use --no-strict to force the push.')
 
311
            if source_wt.last_revision() != source_wt.branch.last_revision():
 
312
                # The tree has lost sync with its branch, there is little
 
313
                # chance that the user is aware of it but he can still force
 
314
                # the push with --no-strict
 
315
                raise errors.OutOfDateTree(
 
316
                    source_wt, more='Use --no-strict to force the push.')
304
317
        stored_loc = source_branch.get_push_location()
305
318
        if location is None:
306
319
            if stored_loc is None: