~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Lalo Martins
  • Date: 2005-09-15 15:16:12 UTC
  • mfrom: (1185.1.18)
  • mto: (1185.1.22)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: lalo@exoweb.net-20050915151611-86c5de4298bb71f9
merging from integration again.

This is a "checkpoint" commit; the tests don't actually pass, but all the
really hard stuff has been merged (in particular, Aaron's new ancestor:
namespace was moved to revisionspec).

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
66
68
 
67
69
    takes_args = ['file*']
68
70
    takes_options = ['all', 'show-ids']
304
306
        import errno
305
307
        
306
308
        br_to = Branch.open_containing('.')
307
 
        stored_loc = None
308
 
        try:
309
 
            stored_loc = br_to.controlfile("x-pull", "rb").read().rstrip('\n')
310
 
        except IOError, e:
311
 
            if e.errno != errno.ENOENT:
312
 
                raise
 
309
        stored_loc = br_to.get_parent()
313
310
        if location is None:
314
311
            if stored_loc is None:
315
312
                raise BzrCommandError("No pull location known or specified.")
335
332
                
336
333
            merge(('.', -1), ('.', old_revno), check_clean=False)
337
334
            if location != stored_loc:
338
 
                br_to.controlfile("x-pull", "wb").write(location + "\n")
 
335
                br_to.set_parent(location)
339
336
        finally:
340
337
            rmtree(cache_root)
341
338
 
992
989
 
993
990
    This command checks various invariants about the branch storage to
994
991
    detect data corruption or bzr bugs.
995
 
 
996
 
    If given the --update flag, it will update some optional fields
997
 
    to help ensure data consistency.
998
992
    """
999
993
    takes_args = ['dir?']
1000
994
 
1301
1295
                    print "Using last location: %s" % parent
1302
1296
                remote = parent
1303
1297
        elif parent is None:
1304
 
            # We only update x-pull if it did not exist, missing should not change the parent
1305
 
            b.controlfile('x-pull', 'wb').write(remote + '\n')
 
1298
            # We only update parent if it did not exist, missing should not change the parent
 
1299
            b.set_parent(remote)
1306
1300
        br_remote = Branch.open_containing(remote)
1307
1301
 
1308
1302
        return show_missing(b, br_remote, verbose=verbose, quiet=quiet)