/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

  • Committer: Vincent Ladeuil
  • Date: 2010-06-08 09:50:27 UTC
  • mto: (5284.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 5285.
  • Revision ID: v.ladeuil+lp@free.fr-20100608095027-nxvyibss2uefgcg1
Respect --exclude-common-ancestry for linear ancestries.

* bzrlib/tests/test_log.py:
(TestLogExcludeAncestry.test_merge_sorted_simple_revnos_exclude_ancestry):
There are two different code paths that exhibit bug #575631.

* bzrlib/log.py:
(_calc_view_revisions, _generate_flat_revisions): Propagate
exclude_common_ancestry into more code paths.
(_linear_view_revisions): Don't yield start_rev_id when we want to
exclude the common ancestry.

Show diffs side-by-side

added added

removed removed

Lines of Context:
243
243
        # have a similar bug allowing someone to think they got the lock
244
244
        # when it's already held.
245
245
        #
246
 
        # See <https://bugs.edge.launchpad.net/bzr/+bug/498378> for one case.
 
246
        # See <https://bugs.launchpad.net/bzr/+bug/498378> for one case.
247
247
        #
248
248
        # Strictly the check is unnecessary and a waste of time for most
249
249
        # people, but probably worth trapping if something is wrong.
447
447
        # XXX: is creating this here inefficient?
448
448
        config = bzrlib.config.GlobalConfig()
449
449
        try:
450
 
            user = config.user_email()
451
 
        except errors.NoEmailInUsername:
452
450
            user = config.username()
 
451
        except errors.NoWhoami:
 
452
            user = osutils.getuser_unicode()
453
453
        s = rio.Stanza(hostname=get_host_name(),
454
454
                   pid=str(os.getpid()),
455
455
                   start_time=str(int(time.time())),
540
540
                    deadline_str = time.strftime('%H:%M:%S',
541
541
                                                 time.localtime(deadline))
542
542
                lock_url = self.transport.abspath(self.path)
543
 
                # See <https://bugs.edge.launchpad.net/bzr/+bug/250451>
 
543
                # See <https://bugs.launchpad.net/bzr/+bug/250451>
544
544
                # the URL here is sometimes not one that is useful to the
545
545
                # user, perhaps being wrapped in a lp-%d or chroot decorator,
546
546
                # especially if this error is issued from the server.