~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Aaron Bentley
  • Date: 2005-09-13 02:42:07 UTC
  • mto: (1185.1.16)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: aaron.bentley@utoronto.ca-20050913024207-489d573af4b76c4d
Fixed issues with pull not having a default location after branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
305
305
        from bzrlib.branch import pull_loc
306
306
        
307
307
        br_to = find_branch('.')
308
 
        stored_loc = None
309
 
        try:
310
 
            stored_loc = br_to.controlfile("x-pull", "rb").read().rstrip('\n')
311
 
        except IOError, e:
312
 
            if e.errno != errno.ENOENT:
313
 
                raise
 
308
        stored_loc = br_to.get_parent()
314
309
        if location is None:
315
310
            if stored_loc is None:
316
311
                raise BzrCommandError("No pull location known or specified.")
335
330
                
336
331
            merge(('.', -1), ('.', old_revno), check_clean=False)
337
332
            if location != stored_loc:
338
 
                br_to.controlfile("x-pull", "wb").write(location + "\n")
 
333
                br_to.set_parent(location)
339
334
        finally:
340
335
            rmtree(cache_root)
341
336
 
1300
1295
                    print "Using last location: %s" % parent
1301
1296
                remote = parent
1302
1297
        elif parent is None:
1303
 
            # We only update x-pull if it did not exist, missing should not change the parent
1304
 
            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)
1305
1300
        br_remote = find_branch(remote)
1306
1301
 
1307
1302
        return show_missing(b, br_remote, verbose=verbose, quiet=quiet)