Rev 3493: (mbp) \#212289 avoid assuming Windows diff tools can understand in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Jun 11 05:21:09 BST 2008


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

------------------------------------------------------------
revno: 3493
revision-id:pqm at pqm.ubuntu.com-20080611042056-m5e074q47s9gwwjj
parent: pqm at pqm.ubuntu.com-20080611031047-5iokv2feh83kznkz
parent: mbp at sourcefrog.net-20080611035646-gcfmu3tzavlvxj3z
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2008-06-11 05:20:56 +0100
message:
  (mbp) \#212289 avoid assuming Windows diff tools can understand
  	symlinks
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
  bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
  bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
  bzrlib/tests/test_osutils.py   test_osutils.py-20051201224856-e48ee24c12182989
    ------------------------------------------------------------
    revno: 3490.1.1
    revision-id:mbp at sourcefrog.net-20080611035646-gcfmu3tzavlvxj3z
    parent: pqm at pqm.ubuntu.com-20080610081519-95unlj6ayptlh2uv
    parent: mlm at aya.yale.edu-20080526173104-qanydmcvilg7j186
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: integration
    timestamp: Wed 2008-06-11 13:56:46 +1000
    message:
      \#212289 avoid assuming Windows diff tools can understand symlinks
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
      bzrlib/tests/test_osutils.py   test_osutils.py-20051201224856-e48ee24c12182989
    ------------------------------------------------------------
    revno: 3452.1.1
    revision-id:mlm at aya.yale.edu-20080526173104-qanydmcvilg7j186
    parent: pqm at pqm.ubuntu.com-20080524120232-22xdromy706t0x16
    parent: mlm at aya.yale.edu-20080526125512-t7s0z2ulnx5gjq0g
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.dev.mlm
    timestamp: Mon 2008-05-26 13:31:04 -0400
    message:
      Merges fix for bug 209281 from my development branch.  Adds a NEWS entry.
    modified:
      NEWS*                          NEWS-20050323055033-4e00b5db738777ff
      bzrlib/diff.py*                diff.py-20050309040759-26944fbbf2ebbf36
      bzrlib/osutils.py*             osutils.py-20050309040759-eeaff12fbf77ac86
      bzrlib/tests/test_diff.py*     testdiff.py-20050727164403-d1a3496ebb12e339
      bzrlib/tests/test_osutils.py*  test_osutils.py-20051201224856-e48ee24c12182989
    ------------------------------------------------------------
    revno: 3287.6.3.5.26
    revision-id:mlm at aya.yale.edu-20080526125512-t7s0z2ulnx5gjq0g
    parent: mlm at aya.yale.edu-20080501201451-fitwacrf1o11255h
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Mon 2008-05-26 08:55:12 -0400
    message:
      Addresses concerns raised in
      http://article.gmane.org/gmane.comp.version-control.bazaar-ng.general/41967
      .
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
      bzrlib/tests/test_osutils.py*  test_osutils.py-20051201224856-e48ee24c12182989
    ------------------------------------------------------------
    revno: 3287.6.3.5.25
    revision-id:mlm at aya.yale.edu-20080501201451-fitwacrf1o11255h
    parent: mlm at aya.yale.edu-20080501194325-6r8nftyba1fj6kid
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Thu 2008-05-01 16:14:51 -0400
    message:
      Uses the correct file_id as the argument to _prepare_files.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.24
    revision-id:mlm at aya.yale.edu-20080501194325-6r8nftyba1fj6kid
    parent: mlm at aya.yale.edu-20080430221557-vow32hmue2onoh52
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Thu 2008-05-01 15:43:25 -0400
    message:
      Cleans up for submission.  Removes comments.
    modified:
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.23
    revision-id:mlm at aya.yale.edu-20080430221557-vow32hmue2onoh52
    parent: mlm at aya.yale.edu-20080428223526-mi721m30pvw1ghey
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Wed 2008-04-30 18:15:57 -0400
    message:
      Adds comments that document my understanding of
      DiffFromTool._prepare_files, and implements a fix for
      TestDiffFromTool.test_prepare_files that I think uses satisfies the
      contract I understand.
    modified:
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.22
    revision-id:mlm at aya.yale.edu-20080428223526-mi721m30pvw1ghey
    parent: mlm at aya.yale.edu-20080419000253-hugwapxqferl51u5
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Mon 2008-04-28 18:35:26 -0400
    message:
      Reverts to prior decomposition of exercise and verification, as suggested
      by abentley.  Renames the test method accordingly.  Extracts a method for
      the formerly repeated verification idiom.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.21
    revision-id:mlm at aya.yale.edu-20080419000253-hugwapxqferl51u5
    parent: mlm at aya.yale.edu-20080418235805-6b9w9w31pevnls6b
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Fri 2008-04-18 20:02:53 -0400
    message:
      Fixes capitalization of False.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.20
    revision-id:mlm at aya.yale.edu-20080418235805-6b9w9w31pevnls6b
    parent: mlm at aya.yale.edu-20080418025135-o29ysst4f3sz116n
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Fri 2008-04-18 19:58:05 -0400
    message:
      Introduces a Feature subclass to encapsulate the availability of 'attrib'.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.19
    revision-id:mlm at aya.yale.edu-20080418025135-o29ysst4f3sz116n
    parent: mlm at aya.yale.edu-20080418024527-c2gvhn7f1pzkmy4t
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Thu 2008-04-17 22:51:35 -0400
    message:
      Changed tested sys.platform value from 'windows' (mistaken) to 'win32'
      (valid).
    modified:
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.18
    revision-id:mlm at aya.yale.edu-20080418024527-c2gvhn7f1pzkmy4t
    parent: mlm at aya.yale.edu-20080418023847-2i1hesorilr05vhz
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Thu 2008-04-17 22:45:27 -0400
    message:
      Removes an unnecessary tree.add().
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.17
    revision-id:mlm at aya.yale.edu-20080418023847-2i1hesorilr05vhz
    parent: mlm at aya.yale.edu-20080418022021-gyyj3e9jsdng924i
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Thu 2008-04-17 22:38:47 -0400
    message:
      Removes assertion that verified a (possibly) locale-dependent output string.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.16
    revision-id:mlm at aya.yale.edu-20080418022021-gyyj3e9jsdng924i
    parent: mlm at aya.yale.edu-20080412153142-ewdtd0niry4jquf5
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Thu 2008-04-17 22:20:21 -0400
    message:
      Uses 'in (tuple)' to test multiple values.
    modified:
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.15
    revision-id:mlm at aya.yale.edu-20080412153142-ewdtd0niry4jquf5
    parent: mlm at aya.yale.edu-20080412151153-lti0an0cmjfg993u
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Sat 2008-04-12 11:31:42 -0400
    message:
      Renames the Windows diff tool test.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.14
    revision-id:mlm at aya.yale.edu-20080412151153-lti0an0cmjfg993u
    parent: mlm at aya.yale.edu-20080412144809-xqncqxv0l3hricqh
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Sat 2008-04-12 11:11:53 -0400
    message:
      Extracted a host_os_dereferences_symlinks method.
    modified:
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
      bzrlib/osutils.py*             osutils.py-20050309040759-eeaff12fbf77ac86
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.13
    revision-id:mlm at aya.yale.edu-20080412144809-xqncqxv0l3hricqh
    parent: mlm at aya.yale.edu-20080412143746-n8e55rmny1pn8c3z
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Sat 2008-04-12 10:48:09 -0400
    message:
      Uses triple-quoted string for easier reading.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.12
    revision-id:mlm at aya.yale.edu-20080412143746-n8e55rmny1pn8c3z
    parent: mlm at aya.yale.edu-20080412140429-x4uh1p0tk56vqzut
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Sat 2008-04-12 10:37:46 -0400
    message:
      Cleans up test_execute_windows_tool to clarify what it's testing.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.11
    revision-id:mlm at aya.yale.edu-20080412140429-x4uh1p0tk56vqzut
    parent: mlm at aya.yale.edu-20080406143356-qk6jroao9t21ai8z
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Sat 2008-04-12 10:04:29 -0400
    message:
      Removed unnecessary timestamp parameter.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.10
    revision-id:mlm at aya.yale.edu-20080406143356-qk6jroao9t21ai8z
    parent: mlm at aya.yale.edu-20080405154855-aqidwbrbkwu7w37m
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Sun 2008-04-06 10:33:56 -0400
    message:
      Uses TestSkipped for test_execute_windows_tool on non-Windows platforms.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.9
    revision-id:mlm at aya.yale.edu-20080405154855-aqidwbrbkwu7w37m
    parent: mlm at aya.yale.edu-20080405142409-wib7xfn23vnrcx7i
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Sat 2008-04-05 11:48:55 -0400
    message:
      Adds a test asserting that a Windows tool that understands forward slashes
      can find the files on both sides of the diff.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.8
    revision-id:mlm at aya.yale.edu-20080405142409-wib7xfn23vnrcx7i
    parent: mlm at aya.yale.edu-20080405141059-fhfvg4emma6jbjz6
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Sat 2008-04-05 10:24:09 -0400
    message:
      Cleans up.
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.7
    revision-id:mlm at aya.yale.edu-20080405141059-fhfvg4emma6jbjz6
    parent: mlm at aya.yale.edu-20080405141005-d3rb5agukzaporwd
    parent: mlm at aya.yale.edu-20080405140558-grt4kmwli0ed9g9t
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Sat 2008-04-05 10:10:59 -0400
    message:
      Merges my patch for https://bugs.launchpad.net/bzr/+bug/212289
    modified:
      bzrlib/tests/test_diff.py      testdiff.py-20050727164403-d1a3496ebb12e339
        ------------------------------------------------------------
        revno: 3287.6.3.6.1
        revision-id:mlm at aya.yale.edu-20080405140558-grt4kmwli0ed9g9t
        parent: pqm at pqm.ubuntu.com-20080320092314-y4i0bpy37v8i1mc5
        committer: Matt McClure <mlm at aya.yale.edu>
        branch nick: bzr.1.3.bug.test_prepare_files
        timestamp: Sat 2008-04-05 10:05:58 -0400
        message:
          Fixes https://bugs.launchpad.net/bzr/+bug/212289.  I submitted this patch.
        modified:
          bzrlib/tests/test_diff.py*     testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.6
    revision-id:mlm at aya.yale.edu-20080405141005-d3rb5agukzaporwd
    parent: mlm at aya.yale.edu-20080403032323-p17mcxj8tuyeh1hw
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Sat 2008-04-05 10:10:05 -0400
    message:
      Snapshot of unfinished work.
    modified:
      bzrlib/tests/test_diff.py*     testdiff.py-20050727164403-d1a3496ebb12e339
    ------------------------------------------------------------
    revno: 3287.6.3.5.5
    revision-id:mlm at aya.yale.edu-20080403032323-p17mcxj8tuyeh1hw
    parent: mlm at aya.yale.edu-20080403032127-66fxtfr5dfyfztcs
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Wed 2008-04-02 23:23:23 -0400
    message:
      Reverts to 3293.
    modified:
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
    ------------------------------------------------------------
    revno: 3287.6.3.5.4
    revision-id:mlm at aya.yale.edu-20080403032127-66fxtfr5dfyfztcs
    parent: mlm at aya.yale.edu-20080403030509-9mj65c4a5qcb923z
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Wed 2008-04-02 23:21:27 -0400
    message:
      Symlinks individual files instead of symlinking the working tree to 'new'.
      TortoiseMerge still didn't recognize the symlink, so I'll revert this
      momentarily.
    modified:
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
    ------------------------------------------------------------
    revno: 3287.6.3.5.3
    revision-id:mlm at aya.yale.edu-20080403030509-9mj65c4a5qcb923z
    parent: mlm at aya.yale.edu-20080403025540-h1lzhmde4ii73qoo
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Wed 2008-04-02 23:05:09 -0400
    message:
      Toward a more acceptable patch for bug 209281.
    modified:
      bzrlib/diff.py*                diff.py-20050309040759-26944fbbf2ebbf36
    ------------------------------------------------------------
    revno: 3287.6.3.5.2
    revision-id:mlm at aya.yale.edu-20080403025540-h1lzhmde4ii73qoo
    parent: mlm at aya.yale.edu-20080401133605-e58m95z3n1sri0uy
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Wed 2008-04-02 22:55:40 -0400
    message:
      Reverts to 3290.
    removed:
      TODO.mlm.txt                   todo.mlm.txt-20080317130007-g11ordlhf20lkwzd-1
    modified:
      bzrlib/diff.py*                diff.py-20050309040759-26944fbbf2ebbf36
      bzrlib/osutils.py*             osutils.py-20050309040759-eeaff12fbf77ac86
    ------------------------------------------------------------
    revno: 3287.6.3.5.1
    revision-id:mlm at aya.yale.edu-20080401133605-e58m95z3n1sri0uy
    parent: pqm at pqm.ubuntu.com-20080320092314-y4i0bpy37v8i1mc5
    parent: mmcclure at choicestream.com-20080331141035-d3yova7t8c03615b
    committer: Matt McClure <mlm at aya.yale.edu>
    branch nick: bzr.1.3.mlm
    timestamp: Tue 2008-04-01 09:36:05 -0400
    message:
      Merges my changes from my 1.2 branch.
    added:
      TODO.mlm.txt                   todo.mlm.txt-20080317130007-g11ordlhf20lkwzd-1
    modified:
      bzrlib/diff.py*                diff.py-20050309040759-26944fbbf2ebbf36
      bzrlib/osutils.py*             osutils.py-20050309040759-eeaff12fbf77ac86
    ------------------------------------------------------------
    revno: 3221.4.7
    revision-id:mmcclure at choicestream.com-20080331141035-d3yova7t8c03615b
    parent: mmcclure at choicestream.com-20080331132110-gbrrzivan9ta7sno
    committer: Matt McClure <mmcclure at choicestream.com>
    branch nick: bzr.1.2.mlm
    timestamp: Mon 2008-03-31 10:10:35 -0400
    message:
      Captures the state of my patch to https://bugs.launchpad.net/bzr/+bug/209281
    modified:
      TODO.mlm.txt                   todo.mlm.txt-20080317130007-g11ordlhf20lkwzd-1
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
    ------------------------------------------------------------
    revno: 3221.4.6
    revision-id:mmcclure at choicestream.com-20080331132110-gbrrzivan9ta7sno
    parent: mmcclure at choicestream.com-20080330183922-am66qzk8v5t0q1xr
    committer: Matt McClure <mmcclure at choicestream.com>
    branch nick: bzr.1.2.mlm
    timestamp: Mon 2008-03-31 09:21:10 -0400
    message:
      Cleans up previous change.
    modified:
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
      bzrlib/osutils.py              osutils.py-20050309040759-eeaff12fbf77ac86
    ------------------------------------------------------------
    revno: 3221.4.5
    revision-id:mmcclure at choicestream.com-20080330183922-am66qzk8v5t0q1xr
    parent: mmcclure at choicestream.com-20080317130331-gsd94usreozna307
    committer: Matt McClure <mmcclure at choicestream.com>
    branch nick: bzr.1.2.mlm
    timestamp: Sun 2008-03-30 14:39:22 -0400
    message:
      Uses cygpath to construct a physical path for an external diff utility.
      Works, but needs a lot of cleanup.
    modified:
      TODO.mlm.txt                   todo.mlm.txt-20080317130007-g11ordlhf20lkwzd-1
      bzrlib/diff.py                 diff.py-20050309040759-26944fbbf2ebbf36
      bzrlib/osutils.py*             osutils.py-20050309040759-eeaff12fbf77ac86
    ------------------------------------------------------------
    revno: 3221.4.4
    revision-id:mmcclure at choicestream.com-20080317130331-gsd94usreozna307
    parent: mmcclure at choicestream.com-20080317130041-kb97a8xsrgzsz7l0
    committer: Matt McClure <mmcclure at choicestream.com>
    branch nick: bzr.1.2.mlm
    timestamp: Mon 2008-03-17 09:03:31 -0400
    message:
      My TODO list.
    added:
      TODO.mlm.txt                   todo.mlm.txt-20080317130007-g11ordlhf20lkwzd-1
    ------------------------------------------------------------
    revno: 3221.4.3
    revision-id:mmcclure at choicestream.com-20080317130041-kb97a8xsrgzsz7l0
    parent: pqm at pqm.ubuntu.com-20080215084056-2vb2i797v2pkp0ih
    committer: Matt McClure <mmcclure at choicestream.com>
    branch nick: bzr.1.2.mlm
    timestamp: Mon 2008-03-17 09:00:41 -0400
    message:
      Works around the false assumption that an external diff program will be
      able to use paths that include symlinks if the bzr runtime environment
      supports symlinks.  The assumption is false if the bzr runtime environment
      is Cygwin, and the external diff program is a native Windows program.
    modified:
      bzrlib/diff.py*                diff.py-20050309040759-26944fbbf2ebbf36
=== modified file 'NEWS'
--- a/NEWS	2008-06-11 03:10:47 +0000
+++ b/NEWS	2008-06-11 04:20:56 +0000
@@ -18,6 +18,10 @@
 
   BUGFIXES:
 
+    * You can now compare file revisions in Windows diff programs from 
+      Cygwin Bazaar.
+      (Matt McClure, #209281)
+
   DOCUMENTATION:
 
    * Updated developer documentation.

=== modified file 'bzrlib/diff.py'
--- a/bzrlib/diff.py	2008-05-08 04:33:38 +0000
+++ b/bzrlib/diff.py	2008-06-11 03:56:46 +0000
@@ -717,8 +717,8 @@
         return proc.wait()
 
     def _try_symlink_root(self, tree, prefix):
-        if not (getattr(tree, 'abspath', None) is not None
-                and osutils.has_symlinks()):
+        if (getattr(tree, 'abspath', None) is None
+            or not osutils.host_os_dereferences_symlinks()):
             return False
         try:
             os.symlink(tree.abspath(''), osutils.pathjoin(self._root, prefix))

=== modified file 'bzrlib/osutils.py'
--- a/bzrlib/osutils.py	2008-05-22 12:53:10 +0000
+++ b/bzrlib/osutils.py	2008-06-11 03:56:46 +0000
@@ -848,6 +848,11 @@
         return False
 
 
+def host_os_dereferences_symlinks():
+    return (has_symlinks()
+            and sys.platform not in ('cygwin', 'win32'))
+
+
 def contains_whitespace(s):
     """True if there are any whitespace characters in s."""
     # string.whitespace can include '\xa0' in certain locales, because it is

=== modified file 'bzrlib/tests/test_diff.py'
--- a/bzrlib/tests/test_diff.py	2008-06-06 13:30:30 +0000
+++ b/bzrlib/tests/test_diff.py	2008-06-11 03:56:46 +0000
@@ -19,6 +19,7 @@
 from cStringIO import StringIO
 import errno
 import subprocess
+import sys
 from tempfile import TemporaryFile
 
 from bzrlib import tests
@@ -41,6 +42,23 @@
                           TestCaseInTempDir, TestSkipped)
 
 
+class _AttribFeature(Feature):
+
+    def _probe(self):
+        if (sys.platform not in ('cygwin', 'win32')):
+            return False
+        try:
+            proc = subprocess.Popen(['attrib', '.'], stdout=subprocess.PIPE)
+        except OSError, e:
+            return False
+        return (0 == proc.wait())
+
+    def feature_name(self):
+        return 'attrib Windows command-line tool'
+
+AttribFeature = _AttribFeature()
+
+
 class _CompiledPatienceDiffFeature(Feature):
 
     def _probe(self):
@@ -1278,14 +1296,42 @@
         self.assertEqual('a-tool-which-is-unlikely-to-exist could not be found'
                          ' on this machine', str(e))
 
+    def test_prepare_files_creates_paths_readable_by_windows_tool(self):
+        self.requireFeature(AttribFeature)
+        output = StringIO()
+        tree = self.make_branch_and_tree('tree')
+        self.build_tree_contents([('tree/file', 'content')])
+        tree.add('file', 'file-id')
+        tree.commit('old tree')
+        tree.lock_read()
+        self.addCleanup(tree.unlock)
+        diff_obj = DiffFromTool(['python', '-c',
+                                 'print "%(old_path)s %(new_path)s"'],
+                                tree, tree, output)
+        diff_obj._prepare_files('file-id', 'file', 'file')
+        self.assertReadableByAttrib(diff_obj._root, 'old\\file', r'old\\file')
+        self.assertReadableByAttrib(diff_obj._root, 'new\\file', r'new\\file')
+
+    def assertReadableByAttrib(self, cwd, relpath, regex):
+        proc = subprocess.Popen(['attrib', relpath],
+                                stdout=subprocess.PIPE,
+                                cwd=cwd)
+        proc.wait()
+        result = proc.stdout.read()
+        self.assertContainsRe(result, regex)
+
     def test_prepare_files(self):
         output = StringIO()
         tree = self.make_branch_and_tree('tree')
         self.build_tree_contents([('tree/oldname', 'oldcontent')])
+        self.build_tree_contents([('tree/oldname2', 'oldcontent2')])
         tree.add('oldname', 'file-id')
+        tree.add('oldname2', 'file2-id')
         tree.commit('old tree', timestamp=0)
         tree.rename_one('oldname', 'newname')
+        tree.rename_one('oldname2', 'newname2')
         self.build_tree_contents([('tree/newname', 'newcontent')])
+        self.build_tree_contents([('tree/newname2', 'newcontent2')])
         old_tree = tree.basis_tree()
         old_tree.lock_read()
         self.addCleanup(old_tree.unlock)
@@ -1303,7 +1349,7 @@
         self.assertContainsRe(new_path, 'new/newname$')
         self.assertFileEqual('oldcontent', old_path)
         self.assertFileEqual('newcontent', new_path)
-        if osutils.has_symlinks():
+        if osutils.host_os_dereferences_symlinks():
             self.assertTrue(os.path.samefile('tree/newname', new_path))
         # make sure we can create files with the same parent directories
-        diff_obj._prepare_files('file-id', 'oldname2', 'newname2')
+        diff_obj._prepare_files('file2-id', 'oldname2', 'newname2')

=== modified file 'bzrlib/tests/test_osutils.py'
--- a/bzrlib/tests/test_osutils.py	2008-05-22 06:53:06 +0000
+++ b/bzrlib/tests/test_osutils.py	2008-06-11 03:56:46 +0000
@@ -322,6 +322,9 @@
         self.assertEqual("@", osutils.kind_marker("symlink"))
         self.assertRaises(errors.BzrError, osutils.kind_marker, "unknown")
 
+    def test_host_os_dereferences_symlinks(self):
+        osutils.host_os_dereferences_symlinks()
+
 
 class TestPumpFile(TestCase):
     """Test pumpfile method."""




More information about the bazaar-commits mailing list