~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: John Arbash Meinel
  • Date: 2011-08-09 13:23:10 UTC
  • mto: (6015.9.8 2.4)
  • mto: This revision was merged to the branch mainline in revision 6066.
  • Revision ID: john@arbash-meinel.com-20110809132310-5xweu1xf7zmex88w
Start working on a config entry for testing whether we should fetch tags or not.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1545
1545
        # For bzr native formats must_fetch is just the tip, and if_present_fetch
1546
1546
        # are the tags.
1547
1547
        must_fetch = set([self.last_revision()])
1548
 
        try:
1549
 
            if_present_fetch = set(self.tags.get_reverse_tag_dict())
1550
 
        except errors.TagsNotSupported:
1551
 
            if_present_fetch = set()
 
1548
        if_present_fetch = set()
 
1549
        c = self.get_config()
 
1550
        include_tags = c.get_user_option_as_bool('branch.fetch_tags',
 
1551
                                                 default=False)
 
1552
        if include_tags:
 
1553
            try:
 
1554
                if_present_fetch = set(self.tags.get_reverse_tag_dict())
 
1555
            except errors.TagsNotSupported:
 
1556
                pass
1552
1557
        must_fetch.discard(_mod_revision.NULL_REVISION)
1553
1558
        if_present_fetch.discard(_mod_revision.NULL_REVISION)
1554
1559
        return must_fetch, if_present_fetch