~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

fixme note for bzr status

Show diffs side-by-side

added added

removed removed

Lines of Context:
306
306
        import errno
307
307
        
308
308
        br_to = find_branch('.')
309
 
        stored_loc = br_to.get_parent()
 
309
        stored_loc = None
 
310
        try:
 
311
            stored_loc = br_to.controlfile("x-pull", "rb").read().rstrip('\n')
 
312
        except IOError, e:
 
313
            if e.errno != errno.ENOENT:
 
314
                raise
310
315
        if location is None:
311
316
            if stored_loc is None:
312
317
                raise BzrCommandError("No pull location known or specified.")
331
336
                
332
337
            merge(('.', -1), ('.', old_revno), check_clean=False)
333
338
            if location != stored_loc:
334
 
                br_to.set_parent(location)
 
339
                br_to.controlfile("x-pull", "wb").write(location + "\n")
335
340
        finally:
336
341
            rmtree(cache_root)
337
342
 
987
992
 
988
993
    This command checks various invariants about the branch storage to
989
994
    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.
990
998
    """
991
999
    takes_args = ['dir?']
992
1000
 
1293
1301
                    print "Using last location: %s" % parent
1294
1302
                remote = parent
1295
1303
        elif parent is None:
1296
 
            # We only update parent if it did not exist, missing should not change the parent
1297
 
            b.set_parent(remote)
 
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
1306
        br_remote = find_branch(remote)
1299
1307
 
1300
1308
        return show_missing(b, br_remote, verbose=verbose, quiet=quiet)