Rev 3993: Handle non-existent files in status (Karl Fogel, #306394) in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Tue Feb 10 01:12:08 GMT 2009


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3993
revision-id: pqm at pqm.ubuntu.com-20090210011204-6m3q6f6o07xmzthe
parent: pqm at pqm.ubuntu.com-20090210001553-5qi19ufmh3sx18mq
parent: ian.clatworthy at canonical.com-20090210002926-vwwy1thd31pmwsq5
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2009-02-10 01:12:04 +0000
message:
  Handle non-existent files in status (Karl Fogel, #306394)
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
  bzrlib/status.py               status.py-20050505062338-431bfa63ec9b19e6
  bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
    ------------------------------------------------------------
    revno: 3992.1.1
    revision-id: ian.clatworthy at canonical.com-20090210002926-vwwy1thd31pmwsq5
    parent: pqm at pqm.ubuntu.com-20090210001553-5qi19ufmh3sx18mq
    parent: ian.clatworthy at canonical.com-20090210002246-bj56cq97fhdo951e
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: ianc-integration
    timestamp: Tue 2009-02-10 10:29:26 +1000
    message:
      Handle non-existent files in status (Karl Fogel, #306394)
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
      bzrlib/status.py               status.py-20050505062338-431bfa63ec9b19e6
      bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
    ------------------------------------------------------------
    revno: 3930.2.17
    revision-id: ian.clatworthy at canonical.com-20090210002246-bj56cq97fhdo951e
    parent: kfogel at red-bean.com-20090202050833-z7vtzhzcscmr2z9o
    committer: Ian Clatworthy <ian.clatworthy at canonical.com>
    branch nick: bzr.status-nonexistent
    timestamp: Tue 2009-02-10 10:22:46 +1000
    message:
      split tests as suggested by Jelmer's review
    modified:
      bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
    ------------------------------------------------------------
    revno: 3930.2.16
    revision-id: kfogel at red-bean.com-20090202050833-z7vtzhzcscmr2z9o
    parent: kfogel at red-bean.com-20090202025320-ekw0k1xfm22v7hh4
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Mon 2009-02-02 00:08:33 -0500
    message:
      * bzrlib/tests/blackbox/test_status.py
        (BranchStatus.test_status_nonexistent_file): In introductory
        comment, restore wording about expecting an error, since we are now
        erroring after all.  This undoes part of revno 3935 (bug #306394).
    modified:
      bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
    ------------------------------------------------------------
    revno: 3930.2.15
    revision-id: kfogel at red-bean.com-20090202025320-ekw0k1xfm22v7hh4
    parent: kfogel at red-bean.com-20090202023311-tagecu0agdunc1rl
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Sun 2009-02-01 21:53:20 -0500
    message:
      Part of bug #306394: Ensure sorted order for nonexistent file output.
      
      * bzrlib/status.py
        (_filter_nonexistent): Sort the path lists before returning them.
      
      * bzrlib/status.py
        (show_tree_status): Don't sort here, as it's done earlier now.
    modified:
      bzrlib/status.py               status.py-20050505062338-431bfa63ec9b19e6
    ------------------------------------------------------------
    revno: 3930.2.14
    revision-id: kfogel at red-bean.com-20090202023311-tagecu0agdunc1rl
    parent: kfogel at red-bean.com-20090202004721-657p8hfk6hm2p001
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Sun 2009-02-01 21:33:11 -0500
    message:
      * NEWS (BUG FIXES): Minor wording tweak, re bug #306394.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 3930.2.13
    revision-id: kfogel at red-bean.com-20090202004721-657p8hfk6hm2p001
    parent: kfogel at red-bean.com-20090201234532-uzcsf0aliwzzmnf9
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Sun 2009-02-01 19:47:21 -0500
    message:
      Part of bug #306394: Raise an error (code 3) when status is invoked on
      nonexistent files; adjust tests to expect same.
      
      After this change, bzr still prints nonexistent files in the normal
      status output (under "nonexistent:", or with "X" in --short format),
      but then errors at the end so the user knows they ran status on
      non-existent files, and to match how commit would behave if invoked on
      the same arguments.
      
      This resulted from a conversation with Robert Collins in IRC, later
      immortalized in https://lists.ubuntu.com/archives/bazaar/2009q1/052295.html.
      
      * bzrlib/status.py
        (show_tree_status): If there are nonexistent files, raise an error
          about them at the very end.
      
      * bzr/bzr-repo/bzr.dev-306394/bzrlib/tests/blackbox/test_status.py
        (BranchStatus.test_status_nonexistent_file): Expect the error.
      
      * bzrlib/tests/blackbox/test_status.py
        (BranchStatus.test_tree_status_specific_files): Restore the
          expectation of error that was lost in revno 3935.
      
      * NEWS
        (BUG FIXES): Update the description of the new behavior.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/status.py               status.py-20050505062338-431bfa63ec9b19e6
      bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
    ------------------------------------------------------------
    revno: 3930.2.12
    revision-id: kfogel at red-bean.com-20090201234532-uzcsf0aliwzzmnf9
    parent: kfogel at red-bean.com-20090201192538-px8d6l3anbkw11b7
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Sun 2009-02-01 18:45:32 -0500
    message:
      Part of bug #306394: Add regression tests.
      
      * bzr/bzr-repo/bzr.dev-306394/bzrlib/tests/blackbox/test_status.py
        (BranchStatus.test_status_nonexistent_file): Rewrite for new behavior.
    modified:
      bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
    ------------------------------------------------------------
    revno: 3930.2.11
    revision-id: kfogel at red-bean.com-20090201192538-px8d6l3anbkw11b7
    parent: kfogel at red-bean.com-20090131000930-h986q3k4zumgvmtk
    parent: pqm at pqm.ubuntu.com-20090131231933-8o4phfvmuuizyyn6
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Sun 2009-02-01 14:25:38 -0500
    message:
      Merge changes from mainline, via local trunk.
    modified:
      bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
      bzrlib/tests/branch_implementations/test_iter_merge_sorted_revisions.py test_merge_sorted_re-20090121004847-to3gvjwigstu93eh-1
    ------------------------------------------------------------
    revno: 3930.2.10
    revision-id: kfogel at red-bean.com-20090131000930-h986q3k4zumgvmtk
    parent: kfogel at red-bean.com-20090130191710-dg41w3jxhg8ba3w7
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Fri 2009-01-30 19:09:30 -0500
    message:
      Two followup changes related to the fix for bug #306394:
      
      * bzrlib/help_topics/__init__.py
        (_status_flags): Describe new "X" status.
      
      * NEWS (BUG FIXES): List the new behavior here, somewhat arbitrarily
        choosing this location over "IMPROVEMENTS".
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
    ------------------------------------------------------------
    revno: 3930.2.9
    revision-id: kfogel at red-bean.com-20090130191710-dg41w3jxhg8ba3w7
    parent: kfogel at red-bean.com-20090121062351-d4fqiuma0ly73gta
    parent: pqm at pqm.ubuntu.com-20090130185542-dbj7mapm1fvtwm3y
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Fri 2009-01-30 14:17:10 -0500
    message:
      Merge from mainline, via local trunk.
    added:
      bzrlib/tests/branch_implementations/test_dotted_revno_to_revision_id.py test_dotted_revno_to-20090121014844-6x7d9jtri5sspg1o-1
      bzrlib/tests/branch_implementations/test_iter_merge_sorted_revisions.py test_merge_sorted_re-20090121004847-to3gvjwigstu93eh-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/annotate.py             annotate.py-20050922133147-7c60541d2614f022
      bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
      bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
      bzrlib/dirstate.py             dirstate.py-20060728012006-d6mvoihjb3je9peu-1
      bzrlib/fetch.py                fetch.py-20050818234941-26fea6105696365d
      bzrlib/foreign.py              foreign.py-20081112170002-olsxmandkk8qyfuq-1
      bzrlib/graph.py                graph_walker.py-20070525030359-y852guab65d4wtn0-1
      bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
      bzrlib/knit.py                 knit.py-20051212171256-f056ac8f0fbe1bd9
      bzrlib/log.py                  log.py-20050505065812-c40ce11702fe5fb1
      bzrlib/merge.py                merge.py-20050513021216-953b65a438527106
      bzrlib/missing.py              missing.py-20050812153334-097f7097e2a8bcd1
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
      bzrlib/progress.py             progress.py-20050610070202-df9faaab791964c0
      bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
      bzrlib/revisionspec.py         revisionspec.py-20050907152633-17567659fd5c0ddb
      bzrlib/tests/blackbox/test_annotate.py testannotate.py-20051013044000-457f44801bfa9d39
      bzrlib/tests/blackbox/test_breakin.py test_breakin.py-20070424043903-qyy6zm4pj3h4sbp3-1
      bzrlib/tests/blackbox/test_log.py test_log.py-20060112090212-78f6ea560c868e24
      bzrlib/tests/blackbox/test_missing.py test_missing.py-20051211212735-a2cf4c1840bb84c4
      bzrlib/tests/blackbox/test_serve.py test_serve.py-20060913064329-8t2pvmsikl4s3xhl-1
      bzrlib/tests/blackbox/test_shelve.py test_ls_shelf.py-20081202053526-thlo8yt0pi1cgor1-1
      bzrlib/tests/branch_implementations/__init__.py __init__.py-20060123013057-b12a52c3f361daf4
      bzrlib/tests/test_foreign.py   test_foreign.py-20081125004048-ywb901edgp9lluxo-1
      bzrlib/tests/test_graph.py     test_graph_walker.py-20070525030405-enq4r60hhi9xrujc-1
      bzrlib/tests/test_knit.py      test_knit.py-20051212171302-95d4c00dd5f11f2b
      bzrlib/tests/test_log.py       testlog.py-20050728115707-1a514809d7d49309
      bzrlib/tests/test_merge.py     testmerge.py-20050905070950-c1b5aa49ff911024
      bzrlib/tests/test_missing.py   test_missing.py-20051212000028-694fa4f658a81f48
      bzrlib/tests/test_osutils.py   test_osutils.py-20051201224856-e48ee24c12182989
      bzrlib/tests/test_progress.py  test_progress.py-20060308160359-978c397bc79b7fda
      bzrlib/tests/test_ui.py        test_ui.py-20051130162854-458e667a7414af09
      bzrlib/tests/test_versionedfile.py test_versionedfile.py-20060222045249-db45c9ed14a1c2e5
      bzrlib/tests/tree_implementations/test_get_symlink_target.py test_get_symlink_tar-20070225165554-ickod3w3t7u0zzqh-1
      bzrlib/tests/tree_implementations/test_path_content_summary.py test_path_content_su-20070904100855-3vrwedz6akn34kl5-1
      bzrlib/transport/http/__init__.py http_transport.py-20050711212304-506c5fd1059ace96
      bzrlib/transport/http/_pycurl.py pycurlhttp.py-20060110060940-4e2a705911af77a6
      bzrlib/transport/http/_urllib.py _urlgrabber.py-20060113083826-0bbf7d992fbf090c
      bzrlib/transport/http/response.py _response.py-20060613154423-a2ci7hd4iw5c7fnt-1
      bzrlib/ui/__init__.py          ui.py-20050824083933-8cf663c763ba53a9
      bzrlib/ui/text.py              text.py-20051130153916-2e438cffc8afc478
      bzrlib/util/bencode.py         bencode.py-20070220044742-sltr28q21w2wzlxi-1
      bzrlib/util/tests/test_bencode.py test_bencode.py-20070713042202-qjw8rppxaz7ky6i6-1
      bzrlib/versionedfile.py        versionedfile.py-20060222045106-5039c71ee3b65490
      bzrlib/workingtree.py          workingtree.py-20050511021032-29b6ec0a681e02e3
      doc/developers/api-versioning.txt apiversioning.txt-20070626065626-iiihgmhgkv91uphz-1
      doc/developers/plugin-api.txt  pluginapi.txt-20080229110225-q2j5y4agqhlkjn0s-1
    ------------------------------------------------------------
    revno: 3930.2.8
    revision-id: kfogel at red-bean.com-20090121062351-d4fqiuma0ly73gta
    parent: kfogel at red-bean.com-20090115201644-f1p6k3kmwltyoex8
    parent: pqm at pqm.ubuntu.com-20090120210300-641tutf1rkdn8a3n
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Wed 2009-01-21 01:23:51 -0500
    message:
      Merge from mainline.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
      bzrlib/help_topics/en/rules.txt rules.txt-20080516063844-ghr5l6pvvrhiycun-1
      bzrlib/log.py                  log.py-20050505065812-c40ce11702fe5fb1
      bzrlib/progress.py             progress.py-20050610070202-df9faaab791964c0
      bzrlib/remote.py               remote.py-20060720103555-yeeg2x51vn0rbtdp-1
      bzrlib/rules.py                properties.py-20080506032617-9k06uqalkf09ck0z-1
      bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
      bzrlib/tests/blackbox/test_log.py test_log.py-20060112090212-78f6ea560c868e24
      bzrlib/tests/blackbox/test_upgrade.py test_upgrade.py-20060120060132-b41e5ed2f886ad28
      bzrlib/tests/bzrdir_implementations/test_bzrdir.py test_bzrdir.py-20060131065642-0ebeca5e30e30866
      bzrlib/tests/test_bzrdir.py    test_bzrdir.py-20060131065654-deba40eef51cf220
      bzrlib/tests/test_log.py       testlog.py-20050728115707-1a514809d7d49309
      bzrlib/tests/test_rules.py     test_properties.py-20080506033501-3p9kmuob25dho8xl-1
      bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
      bzrlib/upgrade.py              history2weaves.py-20050818063535-e7d319791c19a8b2
    ------------------------------------------------------------
    revno: 3930.2.7
    revision-id: kfogel at red-bean.com-20090115201644-f1p6k3kmwltyoex8
    parent: kfogel at red-bean.com-20090115190924-6fd31v7e57umhqsi
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Thu 2009-01-15 15:16:44 -0500
    message:
      * bzrlib/tests/blackbox/test_status.py
        (BranchStatus.test_status_nonexistent_file): Remove debugging code.
    modified:
      bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
    ------------------------------------------------------------
    revno: 3930.2.6
    revision-id: kfogel at red-bean.com-20090115190924-6fd31v7e57umhqsi
    parent: kfogel at red-bean.com-20090115190630-1e4ck3ma14d5hmri
    parent: pqm at pqm.ubuntu.com-20090115163104-30i51kcr1zepm2f7
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Thu 2009-01-15 14:09:24 -0500
    message:
      Merge from mainline, via local trunk.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
      bzrlib/commands.py             bzr.py-20050309040720-d10f4714595cf8c3
      bzrlib/delta.py                delta.py-20050729221636-54cf14ef94783d0a
      bzrlib/errors.py               errors.py-20050309040759-20512168c4e14fbd
      bzrlib/merge.py                merge.py-20050513021216-953b65a438527106
      bzrlib/progress.py             progress.py-20050610070202-df9faaab791964c0
      bzrlib/status.py               status.py-20050505062338-431bfa63ec9b19e6
      bzrlib/tests/blackbox/test_init.py test_init.py-20060309032856-a292116204d86eb7
      bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
      bzrlib/tests/blackbox/test_upgrade.py test_upgrade.py-20060120060132-b41e5ed2f886ad28
      bzrlib/tests/test_delta.py     test_delta.py-20070110134455-sqpd1y7mbjndelxf-1
      bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
      bzrlib/tests/test_status.py    test_status.py-20060516190614-fbf6432e4a6e8aa5
      bzrlib/tests/test_ui.py        test_ui.py-20051130162854-458e667a7414af09
      bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
      bzrlib/transport/sftp.py       sftp.py-20051019050329-ab48ce71b7e32dfe
      bzrlib/ui/__init__.py          ui.py-20050824083933-8cf663c763ba53a9
      bzrlib/ui/text.py              text.py-20051130153916-2e438cffc8afc478
    ------------------------------------------------------------
    revno: 3930.2.5
    revision-id: kfogel at red-bean.com-20090115190630-1e4ck3ma14d5hmri
    parent: kfogel at red-bean.com-20090114011842-xhcw9hhtrwtz8wfk
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Thu 2009-01-15 14:06:30 -0500
    message:
      * bzrlib/tests/blackbox/test_status.py
        (BranchStatus.test_status_nonexistent_file): Expect the new behavior.
        (BranchStatus.test_tree_status_specific_files): Don't expect error.
    modified:
      bzrlib/tests/blackbox/test_status.py teststatus.py-20050712014354-508855eb9f29f7dc
    ------------------------------------------------------------
    revno: 3930.2.4
    revision-id: kfogel at red-bean.com-20090114011842-xhcw9hhtrwtz8wfk
    parent: kfogel at red-bean.com-20090113175526-j9r5jmjiw5lp6ml5
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Tue 2009-01-13 20:18:42 -0500
    message:
      * bzrlib/status.py
        (_filter_nonexistent): Give "filter_nonexistent" an underscore
          prefix, as it is not used outside this file.  Caller changed.
    modified:
      bzrlib/status.py               status.py-20050505062338-431bfa63ec9b19e6
    ------------------------------------------------------------
    revno: 3930.2.3
    revision-id: kfogel at red-bean.com-20090113175526-j9r5jmjiw5lp6ml5
    parent: kfogel at red-bean.com-20090108210756-lv0v40emd2z3r2cd
    parent: kfogel at red-bean.com-20090113175350-ua7s18ga1baf4r7f
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Tue 2009-01-13 12:55:26 -0500
    message:
      Merge from mainline.
    added:
      bzrlib/tests/blackbox/test_filesystem_cicp.py test_filesystem_cicp-20081028010456-vclkg401m81keaxc-1
      doc/developers/case-insensitive-file-systems.txt caseinsensitivefiles-20081117224243-p84xpmqnsa1p8k91-1
      doc/news-template.txt          newstemplate.txt-20090113030949-kn6dn0xcj1rd6vmn-1
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzr                            bzr.py-20050313053754-5485f144c7006fa6
      bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
      bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
      bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
      bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
      bzrlib/mutabletree.py          mutabletree.py-20060906023413-4wlkalbdpsxi2r4y-2
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
      bzrlib/smart/medium.py         medium.py-20061103051856-rgu2huy59fkz902q-1
      bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
      bzrlib/tests/blackbox/__init__.py __init__.py-20051128053524-eba30d8255e08dc3
      bzrlib/tests/branch_implementations/test_stacking.py test_stacking.py-20080214020755-msjlkb7urobwly0f-1
      bzrlib/tests/commands/test_push.py test_push.py-20070525122003-gc1ob0ea0nueoqgj-1
      bzrlib/tests/test_bzrdir.py    test_bzrdir.py-20060131065654-deba40eef51cf220
      bzrlib/tests/test_osutils.py   test_osutils.py-20051201224856-e48ee24c12182989
      bzrlib/tests/test_plugins.py   plugins.py-20050622075746-32002b55e5e943e9
      bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
      bzrlib/tests/tree_implementations/test_inv.py test_inv.py-20070312023226-0cdvk5uwhutis9vg-1
      bzrlib/tree.py                 tree.py-20050309040759-9d5f2496be663e77
      doc/developers/index.txt       index.txt-20070508041241-qznziunkg0nffhiw-1
      setup.py                       setup.py-20050314065409-02f8a0a6e3f9bc70
      tools/win32/build_release.py   build_release.py-20081105204355-2ghh5cv01v1x4rzz-1
      tools/win32/bzr.iss.cog        bzr.iss.cog-20060622100836-b3yup582rt3y0nvm-5
        ------------------------------------------------------------
        revno: 3930.1.2
        revision-id: kfogel at red-bean.com-20090113175350-ua7s18ga1baf4r7f
        parent: kfogel at red-bean.com-20090108210552-4cv8mvc6sv0gdbn1
        parent: pqm at pqm.ubuntu.com-20090113051424-nrk3zkfe09h46i9y
        committer: Karl Fogel <kfogel at red-bean.com>
        branch nick: bzr.dev-trunk
        timestamp: Tue 2009-01-13 12:53:50 -0500
        message:
          Merge from mainline.
        added:
          bzrlib/tests/blackbox/test_filesystem_cicp.py test_filesystem_cicp-20081028010456-vclkg401m81keaxc-1
          doc/developers/case-insensitive-file-systems.txt caseinsensitivefiles-20081117224243-p84xpmqnsa1p8k91-1
          doc/news-template.txt          newstemplate.txt-20090113030949-kn6dn0xcj1rd6vmn-1
        modified:
          NEWS                           NEWS-20050323055033-4e00b5db738777ff
          bzr                            bzr.py-20050313053754-5485f144c7006fa6
          bzrlib/__init__.py             __init__.py-20050309040759-33e65acf91bbcd5d
          bzrlib/branch.py               branch.py-20050309040759-e4baf4e0d046576e
          bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
          bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
          bzrlib/mutabletree.py          mutabletree.py-20060906023413-4wlkalbdpsxi2r4y-2
          bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
          bzrlib/smart/medium.py         medium.py-20061103051856-rgu2huy59fkz902q-1
          bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
          bzrlib/tests/blackbox/__init__.py __init__.py-20051128053524-eba30d8255e08dc3
          bzrlib/tests/branch_implementations/test_stacking.py test_stacking.py-20080214020755-msjlkb7urobwly0f-1
          bzrlib/tests/commands/test_push.py test_push.py-20070525122003-gc1ob0ea0nueoqgj-1
          bzrlib/tests/test_bzrdir.py    test_bzrdir.py-20060131065654-deba40eef51cf220
          bzrlib/tests/test_osutils.py   test_osutils.py-20051201224856-e48ee24c12182989
          bzrlib/tests/test_plugins.py   plugins.py-20050622075746-32002b55e5e943e9
          bzrlib/tests/test_transform.py test_transaction.py-20060105172520-b3ffb3946550e6c4
          bzrlib/tests/tree_implementations/test_inv.py test_inv.py-20070312023226-0cdvk5uwhutis9vg-1
          bzrlib/tree.py                 tree.py-20050309040759-9d5f2496be663e77
          doc/developers/index.txt       index.txt-20070508041241-qznziunkg0nffhiw-1
          setup.py                       setup.py-20050314065409-02f8a0a6e3f9bc70
          tools/win32/build_release.py   build_release.py-20081105204355-2ghh5cv01v1x4rzz-1
          tools/win32/bzr.iss.cog        bzr.iss.cog-20060622100836-b3yup582rt3y0nvm-5
    ------------------------------------------------------------
    revno: 3930.2.2
    revision-id: kfogel at red-bean.com-20090108210756-lv0v40emd2z3r2cd
    parent: kfogel at red-bean.com-20090108210607-5fvq8opxpq171zwg
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Thu 2009-01-08 16:07:56 -0500
    message:
      * bzrlib/status.py
        (filter_nonexistent): Replaces _raise_if_nonexistent, and now
          return two lists instead of raising an error.
        (show_tree_status): Use above to print the status of nonexistent
          files in the normal status style.
    modified:
      bzrlib/status.py               status.py-20050505062338-431bfa63ec9b19e6
    ------------------------------------------------------------
    revno: 3930.2.1
    revision-id: kfogel at red-bean.com-20090108210607-5fvq8opxpq171zwg
    parent: pqm at pqm.ubuntu.com-20090108195901-lechto0ubxsirqrd
    parent: kfogel at red-bean.com-20090108210552-4cv8mvc6sv0gdbn1
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-306394
    timestamp: Thu 2009-01-08 16:06:07 -0500
    message:
      Merge from mainline, via local trunk.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/dirstate.py             dirstate.py-20060728012006-d6mvoihjb3je9peu-1
      bzrlib/tests/workingtree_implementations/test_move.py test_move.py-20070225171927-mohn2vqj5fx7edc6-1
    ------------------------------------------------------------
    revno: 3930.1.1
    revision-id: kfogel at red-bean.com-20090108210552-4cv8mvc6sv0gdbn1
    parent: pqm at pqm.ubuntu.com-20090108195901-lechto0ubxsirqrd
    parent: pqm at pqm.ubuntu.com-20090108205158-sez8mmopbhn2xkr5
    committer: Karl Fogel <kfogel at red-bean.com>
    branch nick: bzr.dev-trunk
    timestamp: Thu 2009-01-08 16:05:52 -0500
    message:
      Merge from mainline.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/dirstate.py             dirstate.py-20060728012006-d6mvoihjb3je9peu-1
      bzrlib/tests/workingtree_implementations/test_move.py test_move.py-20070225171927-mohn2vqj5fx7edc6-1
=== modified file 'NEWS'
--- a/NEWS	2009-02-09 22:39:06 +0000
+++ b/NEWS	2009-02-10 00:29:26 +0000
@@ -110,6 +110,9 @@
       now interprets filenames in their historical context.
       (Ian Clatworthy, #175520)
 
+    * ``bzr status`` now reports nonexistent files and continues, then
+       errors (with code 3) at the end.  (Karl Fogel, #306394)
+
     * Don't require the present compression base in knits to be the same
       when adding records in knits. (Jelmer Vernooij, #307394)
 

=== modified file 'bzrlib/help_topics/__init__.py'
--- a/bzrlib/help_topics/__init__.py	2009-02-05 05:42:28 +0000
+++ b/bzrlib/help_topics/__init__.py	2009-02-10 00:29:26 +0000
@@ -542,6 +542,7 @@
   - File unversioned
   R File renamed
   ? File unknown
+  X File nonexistent (and unknown to bzr)
   C File has conflicts
   P Entry for a pending merge (not a file)
 

=== modified file 'bzrlib/status.py'
--- a/bzrlib/status.py	2009-01-14 03:57:48 +0000
+++ b/bzrlib/status.py	2009-02-10 00:29:26 +0000
@@ -103,7 +103,8 @@
         old.lock_read()
         new.lock_read()
         try:
-            _raise_if_nonexistent(specific_files, old, new)
+            specific_files, nonexistents \
+                = _filter_nonexistent(specific_files, old, new)
             want_unversioned = not versioned
             if short:
                 changes = new.iter_changes(old, show_unchanged, specific_files,
@@ -137,11 +138,29 @@
                 else:
                     prefix = ' '
                 to_file.write("%s %s\n" % (prefix, conflict))
+            # Show files that were requested but don't exist (and are
+            # not versioned).  We don't involve delta in this; these
+            # paths are really the province of just the status
+            # command, since they have more to do with how it was
+            # invoked than with the tree it's operating on.
+            if nonexistents and not short:
+                to_file.write("nonexistent:\n")
+            for nonexistent in nonexistents:
+                # We could calculate prefix outside the loop but, given
+                # how rarely this ought to happen, it's OK and arguably
+                # slightly faster to do it here (ala conflicts above)
+                if short:
+                    prefix = 'X  '
+                else:
+                    prefix = ' '
+                to_file.write("%s %s\n" % (prefix, nonexistent))
             if (new_is_working_tree and show_pending):
                 show_pending_merges(new, to_file, short, verbose=verbose)
         finally:
             old.unlock()
             new.unlock()
+            if nonexistents:
+              raise errors.PathsDoNotExist(nonexistents)
     finally:
         wt.unlock()
 
@@ -254,22 +273,28 @@
             to_file.write(sub_prefix + log_message + '\n')
 
 
-def _raise_if_nonexistent(paths, old_tree, new_tree):
-    """Complain if paths are not in either inventory or tree.
-
-    It's OK with the files exist in either tree's inventory, or 
-    if they exist in the tree but are not versioned.
-    
+def _filter_nonexistent(orig_paths, old_tree, new_tree):
+    """Convert orig_paths to two sorted lists and return them.
+
+    The first is orig_paths paths minus the items in the second list,
+    and the second list is paths that are not in either inventory or
+    tree (they don't qualify if they exist in the tree's inventory, or
+    if they exist in the tree but are not versioned.)
+
+    If either of the two lists is empty, return it as an empty list.
+
     This can be used by operations such as bzr status that can accept
     unknown or ignored files.
     """
-    mutter("check paths: %r", paths)
-    if not paths:
-        return
-    s = old_tree.filter_unversioned_files(paths)
+    mutter("check paths: %r", orig_paths)
+    if not orig_paths:
+        return orig_paths, []
+    s = old_tree.filter_unversioned_files(orig_paths)
     s = new_tree.filter_unversioned_files(s)
-    s = [path for path in s if not new_tree.has_filename(path)]
-    if s:
-        raise errors.PathsDoNotExist(sorted(s))
-
-
+    nonexistent = [path for path in s if not new_tree.has_filename(path)]
+    remaining   = [path for path in orig_paths if not path in nonexistent]
+    # Sorting the 'remaining' list doesn't have much effect in
+    # practice, since the various status output sections will sort
+    # their groups individually.  But for consistency of this
+    # function's API, it's better to sort both than just 'nonexistent'.
+    return sorted(remaining), sorted(nonexistent)

=== modified file 'bzrlib/tests/blackbox/test_status.py'
--- a/bzrlib/tests/blackbox/test_status.py	2009-01-14 03:57:48 +0000
+++ b/bzrlib/tests/blackbox/test_status.py	2009-02-10 00:22:46 +0000
@@ -284,12 +284,176 @@
         self.assertEqualDiff('conflicts:\n  Contents conflict in dir2/file1\n',
                              tof.getvalue())
 
+    def _prepare_nonexistent(self):
+        wt = self.make_branch_and_tree('.')
+        self.assertStatus([], wt)
+        self.build_tree(['FILE_A', 'FILE_B', 'FILE_C', 'FILE_D', 'FILE_E', ])
+        wt.add('FILE_A')
+        wt.add('FILE_B')
+        wt.add('FILE_C')
+        wt.add('FILE_D')
+        wt.add('FILE_E')
+        wt.commit('Create five empty files.')
+        open('FILE_B', 'w').write('Modification to file FILE_B.')
+        open('FILE_C', 'w').write('Modification to file FILE_C.')
+        unlink('FILE_E')  # FILE_E will be versioned but missing 
+        open('FILE_Q', 'w').write('FILE_Q is added but not committed.')
+        wt.add('FILE_Q')  # FILE_Q will be added but not committed
+        open('UNVERSIONED_BUT_EXISTING', 'w')
+        return wt
+
     def test_status_nonexistent_file(self):
         # files that don't exist in either the basis tree or working tree
         # should give an error
-        wt = self.make_branch_and_tree('.')
-        out, err = self.run_bzr('status does-not-exist', retcode=3)
-        self.assertContainsRe(err, r'do not exist.*does-not-exist')
+        wt = self._prepare_nonexistent()
+        self.assertStatus([
+            'removed:\n',
+            '  FILE_E\n',
+            'added:\n',
+            '  FILE_Q\n',
+            'modified:\n',
+            '  FILE_B\n',
+            '  FILE_C\n',
+            'unknown:\n',
+            '  UNVERSIONED_BUT_EXISTING\n',
+            ],
+            wt)
+        self.assertStatus([
+            ' M  FILE_B\n',
+            ' M  FILE_C\n',
+            ' D  FILE_E\n',
+            '+N  FILE_Q\n',
+            '?   UNVERSIONED_BUT_EXISTING\n',
+            ],
+            wt, short=True)
+
+        # Okay, everything's looking good with the existent files.
+        # Let's see what happens when we throw in non-existent files.
+
+        # bzr st [--short] NONEXISTENT '
+        expected = [
+          'nonexistent:\n',
+          '  NONEXISTENT\n',
+          ]
+        out, err = self.run_bzr('status NONEXISTENT', retcode=3)
+        self.assertEqual(expected, out.splitlines(True))
+        self.assertContainsRe(err,
+                              r'.*ERROR: Path\(s\) do not exist: '
+                              'NONEXISTENT.*')
+        expected = [
+          'X:   NONEXISTENT\n',
+          ]
+        out, err = self.run_bzr('status --short NONEXISTENT', retcode=3)
+        self.assertContainsRe(err,
+                              r'.*ERROR: Path\(s\) do not exist: '
+                              'NONEXISTENT.*')
+        
+    def test_status_nonexistent_file_with_others(self):
+        # bzr st [--short] NONEXISTENT ...others..
+        wt = self._prepare_nonexistent()
+        expected = [
+          'removed:\n',
+          '  FILE_E\n',
+          'modified:\n',
+          '  FILE_B\n',
+          '  FILE_C\n',
+          'nonexistent:\n',
+          '  NONEXISTENT\n',
+          ]
+        out, err = self.run_bzr('status NONEXISTENT '
+                                'FILE_A FILE_B FILE_C FILE_D FILE_E',
+                                retcode=3)
+        self.assertEqual(expected, out.splitlines(True))
+        self.assertContainsRe(err,
+                              r'.*ERROR: Path\(s\) do not exist: '
+                              'NONEXISTENT.*')
+        expected = [
+          ' D  FILE_E\n',
+          ' M  FILE_C\n',
+          ' M  FILE_B\n',
+          'X   NONEXISTENT\n',
+          ]
+        out, err = self.run_bzr('status --short NONEXISTENT '
+                                'FILE_A FILE_B FILE_C FILE_D FILE_E',
+                                retcode=3)
+        self.assertEqual(expected, out.splitlines(True))
+        self.assertContainsRe(err,
+                              r'.*ERROR: Path\(s\) do not exist: '
+                              'NONEXISTENT.*')
+        
+    def test_status_multiple_nonexistent_files(self):
+        # bzr st [--short] NONEXISTENT ... ANOTHER_NONEXISTENT ...
+        wt = self._prepare_nonexistent()
+        expected = [
+          'removed:\n',
+          '  FILE_E\n',
+          'modified:\n',
+          '  FILE_B\n',
+          '  FILE_C\n',
+          'nonexistent:\n',
+          '  ANOTHER_NONEXISTENT\n',
+          '  NONEXISTENT\n',
+          ]
+        out, err = self.run_bzr('status NONEXISTENT '
+                                'FILE_A FILE_B ANOTHER_NONEXISTENT '
+                                'FILE_C FILE_D FILE_E', retcode=3)
+        self.assertEqual(expected, out.splitlines(True))
+        self.assertContainsRe(err,
+                              r'.*ERROR: Path\(s\) do not exist: '
+                              'ANOTHER_NONEXISTENT NONEXISTENT.*')
+        expected = [
+          ' D  FILE_E\n',
+          ' M  FILE_C\n',
+          ' M  FILE_B\n',
+          'X   ANOTHER_NONEXISTENT\n',
+          'X   NONEXISTENT\n',
+          ]
+        out, err = self.run_bzr('status --short NONEXISTENT '
+                                'FILE_A FILE_B ANOTHER_NONEXISTENT '
+                                'FILE_C FILE_D FILE_E', retcode=3)
+        self.assertEqual(expected, out.splitlines(True))
+        self.assertContainsRe(err,
+                              r'.*ERROR: Path\(s\) do not exist: '
+                              'ANOTHER_NONEXISTENT NONEXISTENT.*')
+        
+    def test_status_nonexistent_file_with_unversioned(self):
+        # bzr st [--short] NONEXISTENT A B UNVERSIONED_BUT_EXISTING C D E Q
+        wt = self._prepare_nonexistent()
+        expected = [
+          'removed:\n',
+          '  FILE_E\n',
+          'added:\n',
+          '  FILE_Q\n',
+          'modified:\n',
+          '  FILE_B\n',
+          '  FILE_C\n',
+          'unknown:\n',
+          '  UNVERSIONED_BUT_EXISTING\n',
+          'nonexistent:\n',
+          '  NONEXISTENT\n',
+          ]
+        out, err = self.run_bzr('status NONEXISTENT '
+                                'FILE_A FILE_B UNVERSIONED_BUT_EXISTING '
+                                'FILE_C FILE_D FILE_E FILE_Q', retcode=3)
+        self.assertEqual(expected, out.splitlines(True))
+        self.assertContainsRe(err,
+                              r'.*ERROR: Path\(s\) do not exist: '
+                              'NONEXISTENT.*')
+        expected = [
+          '+N  FILE_Q\n',
+          '?   UNVERSIONED_BUT_EXISTING\n',
+          ' D  FILE_E\n',
+          ' M  FILE_C\n',
+          ' M  FILE_B\n',
+          'X   NONEXISTENT\n',
+          ]
+        out, err = self.run_bzr('status --short NONEXISTENT '
+                                'FILE_A FILE_B UNVERSIONED_BUT_EXISTING '
+                                'FILE_C FILE_D FILE_E FILE_Q', retcode=3)
+        self.assertEqual(expected, out.splitlines(True))
+        self.assertContainsRe(err,
+                              r'.*ERROR: Path\(s\) do not exist: '
+                              'NONEXISTENT.*')
 
     def test_status_out_of_date(self):
         """Simulate status of out-of-date tree after remote push"""




More information about the bazaar-commits mailing list