~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2005-09-18 19:21:48 UTC
  • mto: (1185.1.29)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: aaron.bentley@utoronto.ca-20050918192148-3f9373ac85a83b02
Refactored and documented graph stuff

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
    files or directories is reported.  If a directory is given, status
64
64
    is reported for everything inside that directory.
65
65
    """
66
 
    # XXX: FIXME: bzr status should accept a -r option to show changes
67
 
    # relative to a revision, or between revisions
68
66
 
69
67
    takes_args = ['file*']
70
68
    takes_options = ['all', 'show-ids']
277
275
            if len(names_list) != 2:
278
276
                raise BzrCommandError('to mv multiple files the destination '
279
277
                                      'must be a versioned directory')
280
 
            b.rename_one(rel_names[0], rel_names[1])
281
 
            print "%s => %s" % (rel_names[0], rel_names[1])
 
278
            for pair in b.move(rel_names[0], rel_names[1]):
 
279
                print "%s => %s" % pair
282
280
            
283
281
    
284
282
 
304
302
        import tempfile
305
303
        from shutil import rmtree
306
304
        import errno
 
305
        from bzrlib.branch import pull_loc
307
306
        
308
307
        br_to = find_branch('.')
309
308
        stored_loc = br_to.get_parent()
316
315
        cache_root = tempfile.mkdtemp()
317
316
        from bzrlib.branch import DivergedBranches
318
317
        br_from = find_branch(location)
319
 
        location = br_from.base
 
318
        location = pull_loc(br_from)
320
319
        old_revno = br_to.revno()
321
320
        try:
322
321
            from branch import find_cached_branch, DivergedBranches
323
322
            br_from = find_cached_branch(location, cache_root)
324
 
            location = br_from.base
 
323
            location = pull_loc(br_from)
325
324
            old_revno = br_to.revno()
326
325
            try:
327
326
                br_to.update_revisions(br_from)
633
632
    def run(self, filename=None):
634
633
        """Print the branch root."""
635
634
        b = find_branch(filename)
636
 
        print b.base
 
635
        print getattr(b, 'base', None) or getattr(b, 'baseurl')
637
636
 
638
637
 
639
638
class cmd_log(Command):
987
986
 
988
987
    This command checks various invariants about the branch storage to
989
988
    detect data corruption or bzr bugs.
 
989
 
 
990
    If given the --update flag, it will update some optional fields
 
991
    to help ensure data consistency.
990
992
    """
991
993
    takes_args = ['dir?']
992
994