~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Martin Pool
  • Date: 2005-09-13 09:34:31 UTC
  • mto: (1185.8.2) (974.1.91)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: mbp@sourcefrog.net-20050913093431-9f8dd22d28d6510d
- merge pull & missing-revision improvements from aaron

aaron.bentley@utoronto.ca-20050913024207-489d573af4b76c4d

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
 
1297
1292
                    print "Using last location: %s" % parent
1298
1293
                remote = parent
1299
1294
        elif parent is None:
1300
 
            # We only update x-pull if it did not exist, missing should not change the parent
1301
 
            b.controlfile('x-pull', 'wb').write(remote + '\n')
 
1295
            # We only update parent if it did not exist, missing should not change the parent
 
1296
            b.set_parent(remote)
1302
1297
        br_remote = find_branch(remote)
1303
1298
 
1304
1299
        return show_missing(b, br_remote, verbose=verbose, quiet=quiet)