Rev 3954: Remerge jam fix and its ancestry in lp:~bzr/bzr/1.12-lca-deleted
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri Jan 23 19:45:18 GMT 2009
At lp:~bzr/bzr/1.12-lca-deleted
------------------------------------------------------------
revno: 3954
revision-id: v.ladeuil+lp at free.fr-20090123194502-4i7lbovxs4s2oeh6
parent: v.ladeuil+lp at free.fr-20090123194036-y35ps7a7xghq3q31
parent: john at arbash-meinel.com-20090123165453-uh76h1nfqzshc707
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: spurious-conflicts
timestamp: Fri 2009-01-23 20:45:02 +0100
message:
Remerge jam fix and its ancestry
added:
bzrlib/tests/branch_implementations/test_dotted_revno_to_revision_id.py test_dotted_revno_to-20090121014844-6x7d9jtri5sspg1o-1
bzrlib/tests/branch_implementations/test_revision_id_to_dotted_revno.py test_revision_id_to_-20090122052032-g3czslif6sdqfkh3-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/revisionspec.py revisionspec.py-20050907152633-17567659fd5c0ddb
bzrlib/tests/branch_implementations/__init__.py __init__.py-20060123013057-b12a52c3f361daf4
bzrlib/tests/test_knit.py test_knit.py-20051212171302-95d4c00dd5f11f2b
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
------------------------------------------------------------
revno: 3948.1.8
revision-id: john at arbash-meinel.com-20090123165453-uh76h1nfqzshc707
parent: pqm at pqm.ubuntu.com-20090123103145-yvo3icrif75vkt20
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: jam-integration
timestamp: Fri 2009-01-23 10:54:53 -0600
message:
Change the workings of merge_content to be lca aware.
modified:
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/tests/test_merge.py testmerge.py-20050905070950-c1b5aa49ff911024
------------------------------------------------------------
revno: 3948.1.7
revision-id: pqm at pqm.ubuntu.com-20090123103145-yvo3icrif75vkt20
parent: pqm at pqm.ubuntu.com-20090123042837-r1lyxrbk6nd5pp3g
parent: v.ladeuil+lp at free.fr-20090123095408-3g4i9elg0ya7je9n
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2009-01-23 10:31:45 +0000
message:
(jam, vila) Fix an edge case with deleted files and criss-cross merges
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/tests/test_merge.py testmerge.py-20050905070950-c1b5aa49ff911024
------------------------------------------------------------
revno: 3948.7.2
revision-id: v.ladeuil+lp at free.fr-20090123095408-3g4i9elg0ya7je9n
parent: v.ladeuil+lp at free.fr-20090123074235-dzu6zadxlbhwj7ww
parent: v.ladeuil+lp at free.fr-20090123095303-gvzd86p6p2ytmhxz
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.integration
timestamp: Fri 2009-01-23 10:54:08 +0100
message:
Fix overzealous cleanup
modified:
bzrlib/tests/test_merge.py testmerge.py-20050905070950-c1b5aa49ff911024
------------------------------------------------------------
revno: 3948.7.1
revision-id: v.ladeuil+lp at free.fr-20090123074235-dzu6zadxlbhwj7ww
parent: pqm at pqm.ubuntu.com-20090123042837-r1lyxrbk6nd5pp3g
parent: v.ladeuil+lp at free.fr-20090122133817-cerv5t33wgw2m5qj
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.integration
timestamp: Fri 2009-01-23 08:42:35 +0100
message:
Fix an edge case with deleted files and criss-cross merges
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/tests/test_merge.py testmerge.py-20050905070950-c1b5aa49ff911024
------------------------------------------------------------
revno: 3948.1.6
revision-id: pqm at pqm.ubuntu.com-20090123042837-r1lyxrbk6nd5pp3g
parent: pqm at pqm.ubuntu.com-20090122221456-p57kr0fane0s4iv8
parent: ian.clatworthy at canonical.com-20090123022942-yuqntutz88zsze1v
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2009-01-23 04:28:37 +0000
message:
show tags in log --short/--line (Ian Clatworthy)
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
------------------------------------------------------------
revno: 3948.6.1
revision-id: ian.clatworthy at canonical.com-20090123022942-yuqntutz88zsze1v
parent: pqm at pqm.ubuntu.com-20090122221456-p57kr0fane0s4iv8
parent: ian.clatworthy at canonical.com-20090123020302-8064ye1bqry09c30
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: ianc-integration
timestamp: Fri 2009-01-23 12:29:42 +1000
message:
show tags in log --short/--line
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
------------------------------------------------------------
revno: 3946.3.4
revision-id: ian.clatworthy at canonical.com-20090123020302-8064ye1bqry09c30
parent: ian.clatworthy at canonical.com-20090123015949-rbju3vhsb33xsqba
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.log-tags-in-short-line
timestamp: Fri 2009-01-23 12:03:02 +1000
message:
minor cleanup
modified:
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
------------------------------------------------------------
revno: 3946.3.3
revision-id: ian.clatworthy at canonical.com-20090123015949-rbju3vhsb33xsqba
parent: ian.clatworthy at canonical.com-20090119190908-nvwsm36u03sc5tah
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.log-tags-in-short-line
timestamp: Fri 2009-01-23 11:59:49 +1000
message:
feedback from jelmer re position of tags in --line
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
------------------------------------------------------------
revno: 3946.3.2
revision-id: ian.clatworthy at canonical.com-20090119190908-nvwsm36u03sc5tah
parent: ian.clatworthy at canonical.com-20090119182212-pl143nxuskb2moun
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.log-tags-in-short-line
timestamp: Tue 2009-01-20 05:09:08 +1000
message:
add tests & NEWS item
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
------------------------------------------------------------
revno: 3946.3.1
revision-id: ian.clatworthy at canonical.com-20090119182212-pl143nxuskb2moun
parent: pqm at pqm.ubuntu.com-20090119130916-zr1sbw0hn7rbip3y
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.log-tags-in-short-line
timestamp: Tue 2009-01-20 04:22:12 +1000
message:
extend ShortLogFormatter & LineLogFormatter to support tags
modified:
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
------------------------------------------------------------
revno: 3948.1.5
revision-id: pqm at pqm.ubuntu.com-20090122221456-p57kr0fane0s4iv8
parent: pqm at pqm.ubuntu.com-20090122151628-iw1va4nlci8v2afw
parent: jelmer at samba.org-20090122213215-60hjko1v79a8o2pw
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-01-22 22:14:56 +0000
message:
(Jelmer) Don't require the present compression base in knits to be
the same when adding records in knits.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/tests/test_knit.py test_knit.py-20051212171302-95d4c00dd5f11f2b
------------------------------------------------------------
revno: 3946.2.2
revision-id: jelmer at samba.org-20090122213215-60hjko1v79a8o2pw
parent: jelmer at samba.org-20090119202717-c20zb5d1jlxrk3g0
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: add-rec
timestamp: Thu 2009-01-22 22:32:15 +0100
message:
Remove matching test, fix handling of parentless indexes.
modified:
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/tests/test_knit.py test_knit.py-20051212171302-95d4c00dd5f11f2b
------------------------------------------------------------
revno: 3946.2.1
revision-id: jelmer at samba.org-20090119202717-c20zb5d1jlxrk3g0
parent: pqm at pqm.ubuntu.com-20090119130916-zr1sbw0hn7rbip3y
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: bzr.dev
timestamp: Mon 2009-01-19 21:27:17 +0100
message:
Don't require the present compression base in knits to be the same when adding records in knits.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
------------------------------------------------------------
revno: 3948.1.4
revision-id: pqm at pqm.ubuntu.com-20090122151628-iw1va4nlci8v2afw
parent: pqm at pqm.ubuntu.com-20090122115937-y54v6rziznwn10yu
parent: ian.clatworthy at canonical.com-20090122143647-55dpxsjay6c8izj2
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-01-22 15:16:28 +0000
message:
Branch methods for fast revno <=> revision_id mapping (Ian Clatworthy)
added:
bzrlib/tests/branch_implementations/test_dotted_revno_to_revision_id.py test_dotted_revno_to-20090121014844-6x7d9jtri5sspg1o-1
bzrlib/tests/branch_implementations/test_revision_id_to_dotted_revno.py test_revision_id_to_-20090122052032-g3czslif6sdqfkh3-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/revisionspec.py revisionspec.py-20050907152633-17567659fd5c0ddb
bzrlib/tests/branch_implementations/__init__.py __init__.py-20060123013057-b12a52c3f361daf4
------------------------------------------------------------
revno: 3948.5.2
revision-id: ian.clatworthy at canonical.com-20090122143647-55dpxsjay6c8izj2
parent: ian.clatworthy at canonical.com-20090122140219-ho1fs4kx9k0tzskz
parent: ian.clatworthy at canonical.com-20090122142434-4i60r8rwujkom5t2
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: ianc-integration
timestamp: Fri 2009-01-23 00:36:47 +1000
message:
fix accidental needs_read_lock removal
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
------------------------------------------------------------
revno: 3948.4.7
revision-id: ian.clatworthy at canonical.com-20090122142434-4i60r8rwujkom5t2
parent: ian.clatworthy at canonical.com-20090122135818-twftjodatp3cm7xm
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.dotted-revno-to-revision-id
timestamp: Fri 2009-01-23 00:24:34 +1000
message:
fix accidental needs_read_lock removal
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
------------------------------------------------------------
revno: 3948.5.1
revision-id: ian.clatworthy at canonical.com-20090122140219-ho1fs4kx9k0tzskz
parent: pqm at pqm.ubuntu.com-20090122115937-y54v6rziznwn10yu
parent: ian.clatworthy at canonical.com-20090122135818-twftjodatp3cm7xm
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: ianc-integration
timestamp: Fri 2009-01-23 00:02:19 +1000
message:
Branch methods for fast revno <=> revision_id mapping (Ian Clatworthy)
added:
bzrlib/tests/branch_implementations/test_dotted_revno_to_revision_id.py test_dotted_revno_to-20090121014844-6x7d9jtri5sspg1o-1
bzrlib/tests/branch_implementations/test_revision_id_to_dotted_revno.py test_revision_id_to_-20090122052032-g3czslif6sdqfkh3-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/revisionspec.py revisionspec.py-20050907152633-17567659fd5c0ddb
bzrlib/tests/branch_implementations/__init__.py __init__.py-20060123013057-b12a52c3f361daf4
------------------------------------------------------------
revno: 3948.4.6
revision-id: ian.clatworthy at canonical.com-20090122135818-twftjodatp3cm7xm
parent: ian.clatworthy at canonical.com-20090122053359-0ozol6xxjiyv2p4q
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.dotted-revno-to-revision-id
timestamp: Thu 2009-01-22 23:58:18 +1000
message:
review feedback from jam
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/revisionspec.py revisionspec.py-20050907152633-17567659fd5c0ddb
bzrlib/tests/branch_implementations/test_dotted_revno_to_revision_id.py test_dotted_revno_to-20090121014844-6x7d9jtri5sspg1o-1
------------------------------------------------------------
revno: 3948.4.5
revision-id: ian.clatworthy at canonical.com-20090122053359-0ozol6xxjiyv2p4q
parent: ian.clatworthy at canonical.com-20090122051710-gqka9rzkxc93p20m
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.dotted-revno-to-revision-id
timestamp: Thu 2009-01-22 15:33:59 +1000
message:
add missing test module
added:
bzrlib/tests/branch_implementations/test_revision_id_to_dotted_revno.py test_revision_id_to_-20090122052032-g3czslif6sdqfkh3-1
------------------------------------------------------------
revno: 3948.4.4
revision-id: ian.clatworthy at canonical.com-20090122051710-gqka9rzkxc93p20m
parent: ian.clatworthy at canonical.com-20090122044330-mhe4tkrgbzwuepju
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.dotted-revno-to-revision-id
timestamp: Thu 2009-01-22 15:17:10 +1000
message:
add top level revno cache
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/revisionspec.py revisionspec.py-20050907152633-17567659fd5c0ddb
bzrlib/tests/branch_implementations/test_dotted_revno_to_revision_id.py test_dotted_revno_to-20090121014844-6x7d9jtri5sspg1o-1
------------------------------------------------------------
revno: 3948.4.3
revision-id: ian.clatworthy at canonical.com-20090122044330-mhe4tkrgbzwuepju
parent: ian.clatworthy at canonical.com-20090121015117-xhiiodxp5meqen0w
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.dotted-revno-to-revision-id
timestamp: Thu 2009-01-22 14:43:30 +1000
message:
add Branch.revision_id_to_dotted_revno()
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/tests/branch_implementations/__init__.py __init__.py-20060123013057-b12a52c3f361daf4
------------------------------------------------------------
revno: 3948.4.2
revision-id: ian.clatworthy at canonical.com-20090121015117-xhiiodxp5meqen0w
parent: ian.clatworthy at canonical.com-20090121014010-a40vzg1x44d2d6oe
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.dotted-revno-to-revision-id
timestamp: Wed 2009-01-21 11:51:17 +1000
message:
add interface test and NEWS item
added:
bzrlib/tests/branch_implementations/test_dotted_revno_to_revision_id.py test_dotted_revno_to-20090121014844-6x7d9jtri5sspg1o-1
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/branch_implementations/__init__.py __init__.py-20060123013057-b12a52c3f361daf4
------------------------------------------------------------
revno: 3948.4.1
revision-id: ian.clatworthy at canonical.com-20090121014010-a40vzg1x44d2d6oe
parent: pqm at pqm.ubuntu.com-20090120210300-641tutf1rkdn8a3n
committer: Ian Clatworthy <ian.clatworthy at canonical.com>
branch nick: bzr.dotted-revno-to-revision-id
timestamp: Wed 2009-01-21 11:40:10 +1000
message:
Branch.dotted_revno_to_revision_id API
modified:
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/revisionspec.py revisionspec.py-20050907152633-17567659fd5c0ddb
------------------------------------------------------------
revno: 3948.1.3
revision-id: pqm at pqm.ubuntu.com-20090122115937-y54v6rziznwn10yu
parent: pqm at pqm.ubuntu.com-20090122102151-lgk6zciks1s3ju9s
parent: v.ladeuil+lp at free.fr-20090122112052-vhd1wpr296okxxj1
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-01-22 11:59:37 +0000
message:
(vila) One-line fix for previous commit
modified:
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
------------------------------------------------------------
revno: 3948.3.1
revision-id: v.ladeuil+lp at free.fr-20090122112052-vhd1wpr296okxxj1
parent: pqm at pqm.ubuntu.com-20090122102151-lgk6zciks1s3ju9s
parent: v.ladeuil+lp at free.fr-20090122112003-pcp5bu8pfc41u7iz
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.integration
timestamp: Thu 2009-01-22 12:20:52 +0100
message:
One-line fix for previous commit
modified:
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
------------------------------------------------------------
revno: 3945.1.3
revision-id: v.ladeuil+lp at free.fr-20090122112003-pcp5bu8pfc41u7iz
parent: v.ladeuil+lp at free.fr-20090122094050-8vg3u0pks9uy6wsd
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: pb-http
timestamp: Thu 2009-01-22 12:20:03 +0100
message:
Restore line eaten by a gremlin.
* bzrlib/ui/__init__.py:
(make_ui_for_terminal): Add lost 'cls' initialization.
modified:
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
------------------------------------------------------------
revno: 3948.1.2
revision-id: pqm at pqm.ubuntu.com-20090122102151-lgk6zciks1s3ju9s
parent: pqm at pqm.ubuntu.com-20090120210300-641tutf1rkdn8a3n
parent: v.ladeuil+lp at free.fr-20090122094303-9259yxt3v7fzccy9
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Thu 2009-01-22 10:21:51 +0000
message:
(vila) Restore a working UI implementation suitable for emacs shells.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
------------------------------------------------------------
revno: 3948.2.1
revision-id: v.ladeuil+lp at free.fr-20090122094303-9259yxt3v7fzccy9
parent: pqm at pqm.ubuntu.com-20090120210300-641tutf1rkdn8a3n
parent: v.ladeuil+lp at free.fr-20090122094050-8vg3u0pks9uy6wsd
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: bzr.integration
timestamp: Thu 2009-01-22 10:43:03 +0100
message:
Restore a working UI implementation suitable for emacs shells.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
------------------------------------------------------------
revno: 3945.1.2
revision-id: v.ladeuil+lp at free.fr-20090122094050-8vg3u0pks9uy6wsd
parent: v.ladeuil+lp at free.fr-20090119130947-1ldks301mpsymf8r
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: pb-http
timestamp: Thu 2009-01-22 10:40:50 +0100
message:
* NEWS:
Fix missing closing paren.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
------------------------------------------------------------
revno: 3945.1.1
revision-id: v.ladeuil+lp at free.fr-20090119130947-1ldks301mpsymf8r
parent: pqm at pqm.ubuntu.com-20090119102507-0ue83url4iguuol1
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: emacs-ui-fixes
timestamp: Mon 2009-01-19 14:09:47 +0100
message:
Restore a working UI implementation suitable for emacs shells.
* bzrlib/ui/__init__.py:
(CLIUIFactory.prompt, CLIUIFactory.note): Default implementations.
(SilentUIFactory.prompt): Override default implementation.
(make_ui_for_terminal): Let user override automatic detection.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
------------------------------------------------------------
revno: 3948.1.1
revision-id: pqm at pqm.ubuntu.com-20090120210300-641tutf1rkdn8a3n
parent: pqm at pqm.ubuntu.com-20090120044335-pwr2rshr1yu6vzti
parent: john at arbash-meinel.com-20090120201745-gkvsfuhc9tf7m1bm
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-01-20 21:03:00 +0000
message:
(jam) Include the tests for log --short
modified:
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
------------------------------------------------------------
revno: 3943.4.5
revision-id: john at arbash-meinel.com-20090120201745-gkvsfuhc9tf7m1bm
parent: john at arbash-meinel.com-20090116223613-sywet9fbx0589a3z
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.12-fix-short-log
timestamp: Tue 2009-01-20 14:17:45 -0600
message:
Restore _linear_view_revisions.
modified:
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
------------------------------------------------------------
revno: 3943.4.4
revision-id: john at arbash-meinel.com-20090116223613-sywet9fbx0589a3z
parent: john at arbash-meinel.com-20090116223224-hspiby4drt1ng7uy
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.12-fix-short-log
timestamp: Fri 2009-01-16 16:36:13 -0600
message:
Remove _linear_view_revisions.
It isn't actually faster than the other code anymore, and it means
we don't have to worry about maintaining multiple code paths.
modified:
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
------------------------------------------------------------
revno: 3943.4.3
revision-id: john at arbash-meinel.com-20090116223224-hspiby4drt1ng7uy
parent: john at arbash-meinel.com-20090116222734-9mgzsmtcvv9qr2mt
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.12-fix-short-log
timestamp: Fri 2009-01-16 16:32:24 -0600
message:
Revert one test change, and the special case of logging all-of-mainline.
modified:
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
------------------------------------------------------------
revno: 3943.4.2
revision-id: john at arbash-meinel.com-20090116222734-9mgzsmtcvv9qr2mt
parent: john at arbash-meinel.com-20090116221614-k8su03l5d22tq6iv
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.12-fix-short-log
timestamp: Fri 2009-01-16 16:27:34 -0600
message:
Add a test case which exercises this code path.
It turns out that you need --short *and* a revision range.
modified:
bzrlib/tests/test_log.py testlog.py-20050728115707-1a514809d7d49309
------------------------------------------------------------
revno: 3943.4.1
revision-id: john at arbash-meinel.com-20090116221614-k8su03l5d22tq6iv
parent: pqm at pqm.ubuntu.com-20090115233242-4bxyn4zcj2a0ksfk
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 1.12-fix-short-log
timestamp: Fri 2009-01-16 16:16:14 -0600
message:
When testing if we should show merges, use 'not' rather than 'is False'
modified:
bzrlib/log.py log.py-20050505065812-c40ce11702fe5fb1
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2009-01-20 18:13:50 +0000
+++ b/NEWS 2009-01-23 07:42:35 +0000
@@ -30,6 +30,11 @@
merging from trunk and completes much faster. To see all merged
revisions, use the new ``-v`` flag. (Ian Clatworthy)
+ * ``bzr log --line`` now shows any tags after the date and before
+ the commit message. If you have scripts which parse the output
+ from this command, you may need to adjust them accordingly.
+ (Ian Clatworthy)
+
NEW FEATURES:
IMPROVEMENTS:
@@ -37,6 +42,12 @@
* ``bzr init`` will now print a little less verbose output.
(Marius Kruger)
+ * ``bzr log --short`` and ``bzr log --line`` now show tags, if any,
+ for each revision. The tags are shown comma-separated inside
+ ``{}``. For short format, the tags appear at the end of line
+ before the optional ``[merge]`` indicator. For line format,
+ the tags appear after the date. (Ian Clatworthy)
+
* Rule-based preferences can now accept multiple patterns for a set of
rules. (Marius Kruger)
@@ -46,6 +57,9 @@
a change to FILE when the ``--short`` and ``--line`` log formats
are used. (Ian Clatworthy, #317417)
+ * Don't require the present compression base in knits to be the same
+ when adding records in knits. (Jelmer Vernooij, #307394)
+
* Fix a problem with CIFS client/server lag on Windows colliding with
an invariant-per-process algorithm for generating AtomicFile names
(Adrian Wilkins, #304023)
@@ -63,6 +77,18 @@
INTERNALS:
+ * Default User Interface (UI) is CLIUIFactory when bzr runs in a dumb
+ terminal. It is sometimes desirable do override this default by forcing
+ bzr to use TextUIFactory. This can be achieved by setting the
+ BZR_USE_TEXT_UI environment variable (emacs shells, as opposed to
+ compile buffers, are such an example).
+ (Vincent Ladeuil)
+
+ * New ``Branch.dotted_revno_to_revision_id()`` and
+ ``Branch.revision_id_to_dotted_revno()`` APIs that pick the most
+ efficient way of doing the mapping.
+ (Ian Clatworthy)
+
* ``TreeDelta.show()`` now accepts a ``filter`` parameter allowing log
formatters to retrict the output.
(Vincent Ladeuil)
=== modified file 'bzrlib/branch.py'
--- a/bzrlib/branch.py 2009-01-08 19:15:20 +0000
+++ b/bzrlib/branch.py 2009-01-22 14:24:34 +0000
@@ -89,6 +89,7 @@
self.tags = self._make_tags()
self._revision_history_cache = None
self._revision_id_to_revno_cache = None
+ self._partial_revision_id_to_revno_cache = {}
self._last_revision_info_cache = None
self._open_hook()
hooks = Branch.hooks['open']
@@ -189,6 +190,70 @@
raise NotImplementedError(self.get_physical_lock_status)
@needs_read_lock
+ def dotted_revno_to_revision_id(self, revno, _cache_reverse=False):
+ """Return the revision_id for a dotted revno.
+
+ :param revno: a tuple like (1,) or (1,1,2)
+ :param _cache_reverse: a private parameter enabling storage
+ of the reverse mapping in a top level cache. (This should
+ only be done in selective circumstances as we want to
+ avoid having the mapping cached multiple times.)
+ :return: the revision_id
+ :raises errors.NoSuchRevision: if the revno doesn't exist
+ """
+ rev_id = self._do_dotted_revno_to_revision_id(revno)
+ if _cache_reverse:
+ self._partial_revision_id_to_revno_cache[rev_id] = revno
+ return rev_id
+
+ def _do_dotted_revno_to_revision_id(self, revno):
+ """Worker function for dotted_revno_to_revision_id.
+
+ Subclasses should override this if they wish to
+ provide a more efficient implementation.
+ """
+ if len(revno) == 1:
+ return self.get_rev_id(revno[0])
+ revision_id_to_revno = self.get_revision_id_to_revno_map()
+ revision_ids = [revision_id for revision_id, this_revno
+ in revision_id_to_revno.iteritems()
+ if revno == this_revno]
+ if len(revision_ids) == 1:
+ return revision_ids[0]
+ else:
+ revno_str = '.'.join(map(str, revno))
+ raise errors.NoSuchRevision(self, revno_str)
+
+ @needs_read_lock
+ def revision_id_to_dotted_revno(self, revision_id):
+ """Given a revision id, return its dotted revno.
+
+ :return: a tuple like (1,) or (400,1,3).
+ """
+ return self._do_revision_id_to_dotted_revno(revision_id)
+
+ def _do_revision_id_to_dotted_revno(self, revision_id):
+ """Worker function for revision_id_to_revno."""
+ # Try the caches if they are loaded
+ result = self._partial_revision_id_to_revno_cache.get(revision_id)
+ if result is not None:
+ return result
+ if self._revision_id_to_revno_cache:
+ result = self._revision_id_to_revno_cache.get(revision_id)
+ if result is None:
+ raise errors.NoSuchRevision(self, revision_id)
+ # Try the mainline as it's optimised
+ try:
+ revno = self.revision_id_to_revno(revision_id)
+ return (revno,)
+ except errors.NoSuchRevision:
+ # We need to load and use the full revno map after all
+ result = self.get_revision_id_to_revno_map().get(revision_id)
+ if result is None:
+ raise errors.NoSuchRevision(self, revision_id)
+ return result
+
+ @needs_read_lock
def get_revision_id_to_revno_map(self):
"""Return the revision_id => dotted revno map.
=== modified file 'bzrlib/knit.py'
--- a/bzrlib/knit.py 2008-12-24 17:37:08 +0000
+++ b/bzrlib/knit.py 2009-01-22 21:32:15 +0000
@@ -2250,7 +2250,7 @@
present_nodes = self._get_entries(keys)
for (index, key, value, node_refs) in present_nodes:
if (value[0] != keys[key][0][0] or
- node_refs != keys[key][1]):
+ node_refs[:1] != keys[key][1][:1]):
raise KnitCorrupt(self, "inconsistent details in add_records"
": %s %s" % ((value, node_refs), keys[key]))
del keys[key]
=== modified file 'bzrlib/log.py'
--- a/bzrlib/log.py 2009-01-19 02:24:15 +0000
+++ b/bzrlib/log.py 2009-01-23 02:29:42 +0000
@@ -830,6 +830,7 @@
class ShortLogFormatter(LogFormatter):
supports_delta = True
+ supports_tags = True
supports_single_merge_revision = True
def log_revision(self, revision):
@@ -837,13 +838,17 @@
is_merge = ''
if len(revision.rev.parent_ids) > 1:
is_merge = ' [merge]'
- to_file.write("%5s %s\t%s%s\n" % (revision.revno,
+ tags = ''
+ if revision.tags:
+ tags = ' {%s}' % (', '.join(revision.tags))
+
+ to_file.write("%5s %s\t%s%s%s\n" % (revision.revno,
self.short_author(revision.rev),
format_date(revision.rev.timestamp,
revision.rev.timezone or 0,
self.show_timezone, date_fmt="%Y-%m-%d",
show_offset=False),
- is_merge))
+ tags, is_merge))
if self.show_ids:
to_file.write(' revision-id:%s\n'
% (revision.rev.revision_id,))
@@ -862,6 +867,7 @@
class LineLogFormatter(LogFormatter):
+ supports_tags = True
supports_single_merge_revision = True
def __init__(self, *args, **kwargs):
@@ -886,15 +892,16 @@
def log_revision(self, revision):
self.to_file.write(self.log_string(revision.revno, revision.rev,
- self._max_chars))
+ self._max_chars, revision.tags))
self.to_file.write('\n')
- def log_string(self, revno, rev, max_chars):
+ def log_string(self, revno, rev, max_chars, tags=None):
"""Format log info into one string. Truncate tail of string
:param revno: revision number or None.
Revision numbers counts from 1.
- :param rev: revision info object
+ :param rev: revision object
:param max_chars: maximum length of resulting string
+ :param tags: list of tags or None
:return: formatted truncated string
"""
out = []
@@ -903,6 +910,9 @@
out.append("%s:" % revno)
out.append(self.truncate(self.short_author(rev), 20))
out.append(self.date_string(rev))
+ if tags:
+ tag_str = '{%s}' % (', '.join(tags))
+ out.append(tag_str)
out.append(rev.get_summary())
return self.truncate(" ".join(out).rstrip('\n'), max_chars)
=== modified file 'bzrlib/remote.py'
--- a/bzrlib/remote.py 2009-01-16 07:50:48 +0000
+++ b/bzrlib/remote.py 2009-01-22 13:58:18 +0000
@@ -1287,6 +1287,7 @@
# will try to assign to self.tags, which is a property in this subclass.
# And the parent's __init__ doesn't do much anyway.
self._revision_id_to_revno_cache = None
+ self._partial_revision_id_to_revno_cache = {}
self._revision_history_cache = None
self._last_revision_info_cache = None
self.bzrdir = remote_bzrdir
=== modified file 'bzrlib/revisionspec.py'
--- a/bzrlib/revisionspec.py 2008-12-09 14:04:01 +0000
+++ b/bzrlib/revisionspec.py 2009-01-22 13:58:18 +0000
@@ -352,20 +352,15 @@
revs_or_none = None
if dotted:
- branch.lock_read()
try:
- revision_id_to_revno = branch.get_revision_id_to_revno_map()
- revisions = [revision_id for revision_id, revno
- in revision_id_to_revno.iteritems()
- if revno == match_revno]
- finally:
- branch.unlock()
- if len(revisions) != 1:
+ revision_id = branch.dotted_revno_to_revision_id(match_revno,
+ _cache_reverse=True)
+ except errors.NoSuchRevision:
raise errors.InvalidRevisionSpec(self.user_spec, branch)
else:
# there is no traditional 'revno' for dotted-decimal revnos.
# so for API compatability we return None.
- return branch, None, revisions[0]
+ return branch, None, revision_id
else:
last_revno, last_revision_id = branch.last_revision_info()
if revno < 0:
=== modified file 'bzrlib/tests/branch_implementations/__init__.py'
--- a/bzrlib/tests/branch_implementations/__init__.py 2008-12-16 02:15:06 +0000
+++ b/bzrlib/tests/branch_implementations/__init__.py 2009-01-22 04:43:30 +0000
@@ -157,6 +157,7 @@
'bzrlib.tests.branch_implementations.test_check',
'bzrlib.tests.branch_implementations.test_create_checkout',
'bzrlib.tests.branch_implementations.test_commit',
+ 'bzrlib.tests.branch_implementations.test_dotted_revno_to_revision_id',
'bzrlib.tests.branch_implementations.test_get_revision_id_to_revno_map',
'bzrlib.tests.branch_implementations.test_hooks',
'bzrlib.tests.branch_implementations.test_http',
@@ -168,6 +169,7 @@
'bzrlib.tests.branch_implementations.test_push',
'bzrlib.tests.branch_implementations.test_reconcile',
'bzrlib.tests.branch_implementations.test_revision_history',
+ 'bzrlib.tests.branch_implementations.test_revision_id_to_dotted_revno',
'bzrlib.tests.branch_implementations.test_revision_id_to_revno',
'bzrlib.tests.branch_implementations.test_sprout',
'bzrlib.tests.branch_implementations.test_stacking',
=== added file 'bzrlib/tests/branch_implementations/test_dotted_revno_to_revision_id.py'
--- a/bzrlib/tests/branch_implementations/test_dotted_revno_to_revision_id.py 1970-01-01 00:00:00 +0000
+++ b/bzrlib/tests/branch_implementations/test_dotted_revno_to_revision_id.py 2009-01-22 13:58:18 +0000
@@ -0,0 +1,43 @@
+# Copyright (C) 2007 Canonical Ltd
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+"""Tests for Branch.dotted_revno_to_revision_id()"""
+
+from bzrlib import errors
+
+from bzrlib.tests.branch_implementations import TestCaseWithBranch
+
+
+class TestDottedRevnoToRevisionId(TestCaseWithBranch):
+
+ def test_lookup_revision_id_by_dotted(self):
+ tree = self.create_tree_with_merge()
+ the_branch = tree.branch
+ self.assertEqual('null:', the_branch.dotted_revno_to_revision_id((0,)))
+ self.assertEqual('rev-1', the_branch.dotted_revno_to_revision_id((1,)))
+ self.assertEqual('rev-2', the_branch.dotted_revno_to_revision_id((2,)))
+ self.assertEqual('rev-3', the_branch.dotted_revno_to_revision_id((3,)))
+ self.assertEqual('rev-1.1.1', the_branch.dotted_revno_to_revision_id(
+ (1,1,1)))
+ self.assertRaises(errors.NoSuchRevision,
+ the_branch.dotted_revno_to_revision_id, (1,0,2))
+ # Test reverse caching
+ self.assertEqual(None,
+ the_branch._partial_revision_id_to_revno_cache.get('rev-1'))
+ self.assertEqual('rev-1', the_branch.dotted_revno_to_revision_id((1,),
+ _cache_reverse=True))
+ self.assertEqual((1,),
+ the_branch._partial_revision_id_to_revno_cache.get('rev-1'))
=== added file 'bzrlib/tests/branch_implementations/test_revision_id_to_dotted_revno.py'
--- a/bzrlib/tests/branch_implementations/test_revision_id_to_dotted_revno.py 1970-01-01 00:00:00 +0000
+++ b/bzrlib/tests/branch_implementations/test_revision_id_to_dotted_revno.py 2009-01-22 05:33:59 +0000
@@ -0,0 +1,36 @@
+# Copyright (C) 2007 Canonical Ltd
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+"""Tests for Branch.revision_id_to_dotted_revno()"""
+
+from bzrlib import errors
+
+from bzrlib.tests.branch_implementations import TestCaseWithBranch
+
+
+class TestRevisionIdToDottedRevno(TestCaseWithBranch):
+
+ def test_lookup_dotted_revno(self):
+ tree = self.create_tree_with_merge()
+ the_branch = tree.branch
+ self.assertEqual((0,), the_branch.revision_id_to_dotted_revno('null:'))
+ self.assertEqual((1,), the_branch.revision_id_to_dotted_revno('rev-1'))
+ self.assertEqual((2,), the_branch.revision_id_to_dotted_revno('rev-2'))
+ self.assertEqual((3,), the_branch.revision_id_to_dotted_revno('rev-3'))
+ self.assertEqual((1,1,1), the_branch.revision_id_to_dotted_revno(
+ 'rev-1.1.1'))
+ self.assertRaises(errors.NoSuchRevision,
+ the_branch.revision_id_to_dotted_revno, 'rev-1.0.2')
=== modified file 'bzrlib/tests/test_knit.py'
--- a/bzrlib/tests/test_knit.py 2009-01-08 16:57:10 +0000
+++ b/bzrlib/tests/test_knit.py 2009-01-22 21:32:15 +0000
@@ -1529,9 +1529,7 @@
index = self.two_graph_index(deltas=True, catch_adds=True)
# change options
self.assertRaises(errors.KnitCorrupt, index.add_records,
- [(('tip',), 'no-eol,line-delta', (None, 0, 100), [('parent',)])])
- self.assertRaises(errors.KnitCorrupt, index.add_records,
- [(('tip',), 'line-delta,no-eol', (None, 0, 100), [('parent',)])])
+ [(('tip',), 'line-delta', (None, 0, 100), [('parent',)])])
self.assertRaises(errors.KnitCorrupt, index.add_records,
[(('tip',), 'fulltext', (None, 0, 100), [('parent',)])])
# parents
@@ -1591,9 +1589,7 @@
index = self.two_graph_index(deltas=True, catch_adds=True)
# change options
self.assertRaises(errors.KnitCorrupt, index.add_records,
- [(('tip',), 'no-eol,line-delta', (None, 0, 100), [('parent',)])])
- self.assertRaises(errors.KnitCorrupt, index.add_records,
- [(('tip',), 'line-delta,no-eol', (None, 0, 100), [('parent',)])])
+ [(('tip',), 'line-delta', (None, 0, 100), [('parent',)])])
self.assertRaises(errors.KnitCorrupt, index.add_records,
[(('tip',), 'fulltext', (None, 0, 100), [('parent',)])])
# parents
@@ -1602,7 +1598,7 @@
# change options in the second record
self.assertRaises(errors.KnitCorrupt, index.add_records,
[(('tip',), 'fulltext,no-eol', (None, 0, 100), [('parent',)]),
- (('tip',), 'no-eol,line-delta', (None, 0, 100), [('parent',)])])
+ (('tip',), 'line-delta', (None, 0, 100), [('parent',)])])
self.assertEqual([], self.caught_entries)
=== modified file 'bzrlib/tests/test_log.py'
--- a/bzrlib/tests/test_log.py 2008-12-12 03:45:03 +0000
+++ b/bzrlib/tests/test_log.py 2009-01-23 02:29:42 +0000
@@ -290,7 +290,48 @@
""",
sio.getvalue())
+ def _prepare_tree_with_merges(self, with_tags=False):
+ wt = self.make_branch_and_memory_tree('.')
+ wt.lock_write()
+ self.addCleanup(wt.unlock)
+ wt.add('')
+ wt.commit('rev-1', rev_id='rev-1',
+ timestamp=1132586655, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ wt.commit('rev-merged', rev_id='rev-2a',
+ timestamp=1132586700, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ wt.set_parent_ids(['rev-1', 'rev-2a'])
+ wt.branch.set_last_revision_info(1, 'rev-1')
+ wt.commit('rev-2', rev_id='rev-2b',
+ timestamp=1132586800, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ if with_tags:
+ branch = wt.branch
+ branch.tags.set_tag('v0.2', 'rev-2b')
+ wt.commit('rev-3', rev_id='rev-3',
+ timestamp=1132586900, timezone=36000,
+ committer='Jane Foo <jane at foo.com>')
+ branch.tags.set_tag('v1.0rc1', 'rev-3')
+ branch.tags.set_tag('v1.0', 'rev-3')
+ return wt
+
def test_short_log_with_merges(self):
+ wt = self._prepare_tree_with_merges()
+ logfile = self.make_utf8_encoded_stringio()
+ formatter = log.ShortLogFormatter(to_file=logfile)
+ log.show_log(wt.branch, formatter)
+ self.assertEqualDiff("""\
+ 2 Joe Foo\t2005-11-22 [merge]
+ rev-2
+
+ 1 Joe Foo\t2005-11-22
+ rev-1
+
+""",
+ logfile.getvalue())
+
+ def test_short_log_with_merges_and_range(self):
wt = self.make_branch_and_memory_tree('.')
wt.lock_write()
self.addCleanup(wt.unlock)
@@ -301,16 +342,43 @@
wt.commit('rev-merged', rev_id='rev-2a',
timestamp=1132586700, timezone=36000,
committer='Joe Foo <joe at foo.com>')
+ wt.branch.set_last_revision_info(1, 'rev-1')
wt.set_parent_ids(['rev-1', 'rev-2a'])
- wt.branch.set_last_revision_info(1, 'rev-1')
- wt.commit('rev-2', rev_id='rev-2b',
- timestamp=1132586800, timezone=36000,
- committer='Joe Foo <joe at foo.com>')
+ wt.commit('rev-2b', rev_id='rev-2b',
+ timestamp=1132586800, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ wt.commit('rev-3a', rev_id='rev-3a',
+ timestamp=1132586800, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ wt.branch.set_last_revision_info(2, 'rev-2b')
+ wt.set_parent_ids(['rev-2b', 'rev-3a'])
+ wt.commit('rev-3b', rev_id='rev-3b',
+ timestamp=1132586800, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ logfile = self.make_utf8_encoded_stringio()
+ formatter = log.ShortLogFormatter(to_file=logfile)
+ log.show_log(wt.branch, formatter,
+ start_revision=2, end_revision=3)
+ self.assertEqualDiff("""\
+ 3 Joe Foo\t2005-11-22 [merge]
+ rev-3b
+
+ 2 Joe Foo\t2005-11-22 [merge]
+ rev-2b
+
+""",
+ logfile.getvalue())
+
+ def test_short_log_with_tags(self):
+ wt = self._prepare_tree_with_merges(with_tags=True)
logfile = self.make_utf8_encoded_stringio()
formatter = log.ShortLogFormatter(to_file=logfile)
log.show_log(wt.branch, formatter)
self.assertEqualDiff("""\
- 2 Joe Foo\t2005-11-22 [merge]
+ 3 Jane Foo\t2005-11-22 {v1.0, v1.0rc1}
+ rev-3
+
+ 2 Joe Foo\t2005-11-22 {v0.2} [merge]
rev-2
1 Joe Foo\t2005-11-22
@@ -701,22 +769,34 @@
""",
sio.getvalue())
+ def _prepare_tree_with_merges(self, with_tags=False):
+ wt = self.make_branch_and_memory_tree('.')
+ wt.lock_write()
+ self.addCleanup(wt.unlock)
+ wt.add('')
+ wt.commit('rev-1', rev_id='rev-1',
+ timestamp=1132586655, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ wt.commit('rev-merged', rev_id='rev-2a',
+ timestamp=1132586700, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ wt.set_parent_ids(['rev-1', 'rev-2a'])
+ wt.branch.set_last_revision_info(1, 'rev-1')
+ wt.commit('rev-2', rev_id='rev-2b',
+ timestamp=1132586800, timezone=36000,
+ committer='Joe Foo <joe at foo.com>')
+ if with_tags:
+ branch = wt.branch
+ branch.tags.set_tag('v0.2', 'rev-2b')
+ wt.commit('rev-3', rev_id='rev-3',
+ timestamp=1132586900, timezone=36000,
+ committer='Jane Foo <jane at foo.com>')
+ branch.tags.set_tag('v1.0rc1', 'rev-3')
+ branch.tags.set_tag('v1.0', 'rev-3')
+ return wt
+
def test_line_log_single_merge_revision(self):
- wt = self.make_branch_and_memory_tree('.')
- wt.lock_write()
- self.addCleanup(wt.unlock)
- wt.add('')
- wt.commit('rev-1', rev_id='rev-1',
- timestamp=1132586655, timezone=36000,
- committer='Joe Foo <joe at foo.com>')
- wt.commit('rev-merged', rev_id='rev-2a',
- timestamp=1132586700, timezone=36000,
- committer='Joe Foo <joe at foo.com>')
- wt.set_parent_ids(['rev-1', 'rev-2a'])
- wt.branch.set_last_revision_info(1, 'rev-1')
- wt.commit('rev-2', rev_id='rev-2b',
- timestamp=1132586800, timezone=36000,
- committer='Joe Foo <joe at foo.com>')
+ wt = self._prepare_tree_with_merges()
logfile = self.make_utf8_encoded_stringio()
formatter = log.LineLogFormatter(to_file=logfile)
revspec = revisionspec.RevisionSpec.from_string('1.1.1')
@@ -728,6 +808,17 @@
""",
logfile.getvalue())
+ def test_line_log_with_tags(self):
+ wt = self._prepare_tree_with_merges(with_tags=True)
+ logfile = self.make_utf8_encoded_stringio()
+ formatter = log.LineLogFormatter(to_file=logfile)
+ log.show_log(wt.branch, formatter)
+ self.assertEqualDiff("""\
+3: Jane Foo 2005-11-22 {v1.0, v1.0rc1} rev-3
+2: Joe Foo 2005-11-22 {v0.2} rev-2
+1: Joe Foo 2005-11-22 rev-1
+""",
+ logfile.getvalue())
class TestGetViewRevisions(tests.TestCaseWithTransport):
=== modified file 'bzrlib/ui/__init__.py'
--- a/bzrlib/ui/__init__.py 2009-01-13 05:07:27 +0000
+++ b/bzrlib/ui/__init__.py 2009-01-22 11:20:03 +0000
@@ -172,6 +172,11 @@
def prompt(self, prompt):
"""Emit prompt on the CLI."""
+ self.stdout.write(prompt)
+
+ def note(self, msg):
+ """Write an already-formatted message."""
+ self.stdout.write(msg + '\n')
def clear_term(self):
pass
@@ -195,6 +200,8 @@
def get_password(self, prompt='', **kwargs):
return None
+ def prompt(self, prompt):
+ pass
def note(self, msg):
pass
@@ -217,6 +224,7 @@
If stdout is a smart terminal, this gets a smart UIFactory with
progress indicators, etc. If it's a dumb terminal, just plain text output.
"""
+ cls = None
isatty = getattr(stdin, 'isatty', None)
if isatty is None:
cls = CLIUIFactory
@@ -225,7 +233,9 @@
elif os.environ.get('TERM') in (None, 'dumb', ''):
# e.g. emacs compile window
cls = CLIUIFactory
- else:
+ # User may know better, otherwise default to TextUIFactory
+ if ( os.environ.get('BZR_USE_TEXT_UI', None) is not None
+ or cls is None):
from bzrlib.ui.text import TextUIFactory
cls = TextUIFactory
return cls(stdin=stdin, stdout=stdout, stderr=stderr)
More information about the bazaar-commits
mailing list