Merge lp:~gz/bzr/2.5_2.4_integration into lp:bzr

Proposed by Martin Packman
Status: Merged
Approved by: Martin Packman
Approved revision: no longer in the source branch.
Merged at revision: 6513
Proposed branch: lp:~gz/bzr/2.5_2.4_integration
Merge into: lp:bzr
Diff against target: 93 lines (+37/-7)
3 files modified
bzrlib/_walkdirs_win32.pyx (+14/-7)
bzrlib/tests/test__walkdirs_win32.py (+19/-0)
doc/en/release-notes/bzr-2.4.txt (+4/-0)
To merge this branch: bzr merge lp:~gz/bzr/2.5_2.4_integration
Reviewer Review Type Date Requested Status
bzr-core Pending
Review via email: mp+99915@code.launchpad.net

Commit message

Merge 2.4 for feature flag conflict resolution and _Win32Stat fix

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/_walkdirs_win32.pyx'
--- bzrlib/_walkdirs_win32.pyx 2011-04-05 12:15:34 +0000
+++ bzrlib/_walkdirs_win32.pyx 2012-03-29 12:00:28 +0000
@@ -1,4 +1,4 @@
1# Copyright (C) 2008-2011 Canonical Ltd1# Copyright (C) 2008-2012 Canonical Ltd
2#2#
3# This program is free software; you can redistribute it and/or modify3# This program is free software; you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by4# it under the terms of the GNU General Public License as published by
@@ -95,8 +95,19 @@
95 return self._st_size95 return self._st_size
9696
97 # os.stat always returns 0, so we hard code it here97 # os.stat always returns 0, so we hard code it here
98 cdef readonly int st_dev98 property st_dev:
99 cdef readonly int st_ino99 def __get__(self):
100 return 0
101 property st_ino:
102 def __get__(self):
103 return 0
104 # st_uid and st_gid required for some external tools like bzr-git & dulwich
105 property st_uid:
106 def __get__(self):
107 return 0
108 property st_gid:
109 def __get__(self):
110 return 0
100111
101 def __repr__(self):112 def __repr__(self):
102 """Repr is the same as a Stat object.113 """Repr is the same as a Stat object.
@@ -195,8 +206,6 @@
195 statvalue.st_mtime = _ftime_to_timestamp(&data.ftLastWriteTime)206 statvalue.st_mtime = _ftime_to_timestamp(&data.ftLastWriteTime)
196 statvalue.st_atime = _ftime_to_timestamp(&data.ftLastAccessTime)207 statvalue.st_atime = _ftime_to_timestamp(&data.ftLastAccessTime)
197 statvalue._st_size = _get_size(data)208 statvalue._st_size = _get_size(data)
198 statvalue.st_ino = 0
199 statvalue.st_dev = 0
200 return statvalue209 return statvalue
201210
202 def read_dir(self, prefix, top):211 def read_dir(self, prefix, top):
@@ -288,6 +297,4 @@
288 statvalue.st_mtime = st.st_mtime297 statvalue.st_mtime = st.st_mtime
289 statvalue.st_atime = st.st_atime298 statvalue.st_atime = st.st_atime
290 statvalue._st_size = st.st_size299 statvalue._st_size = st.st_size
291 statvalue.st_ino = 0
292 statvalue.st_dev = 0
293 return statvalue300 return statvalue
294301
=== modified file 'bzrlib/config.py'
=== modified file 'bzrlib/tests/test__walkdirs_win32.py'
--- bzrlib/tests/test__walkdirs_win32.py 2011-06-14 01:26:41 +0000
+++ bzrlib/tests/test__walkdirs_win32.py 2012-03-29 12:00:28 +0000
@@ -96,3 +96,22 @@
96 self.assertEqual(errno.ENOENT, e.errno)96 self.assertEqual(errno.ENOENT, e.errno)
97 self.assertEqual(3, e.winerror)97 self.assertEqual(3, e.winerror)
98 self.assertEqual((3, u'no_such_dir/*'), e.args)98 self.assertEqual((3, u'no_such_dir/*'), e.args)
99
100
101class Test_Win32Stat(tests.TestCaseInTempDir):
102
103 _test_needs_features = [win32_readdir_feature]
104
105 def setUp(self):
106 super(Test_Win32Stat, self).setUp()
107 from bzrlib._walkdirs_win32 import lstat
108 self.win32_lstat = lstat
109
110 def test_zero_members_present(self):
111 self.build_tree(['foo'])
112 st = self.win32_lstat('foo')
113 # we only want to ensure that some members are present
114 self.assertEqual(0, st.st_dev)
115 self.assertEqual(0, st.st_ino)
116 self.assertEqual(0, st.st_uid)
117 self.assertEqual(0, st.st_gid)
99118
=== modified file 'bzrlib/tests/test_config.py'
=== modified file 'doc/en/release-notes/bzr-2.4.txt'
--- doc/en/release-notes/bzr-2.4.txt 2012-02-27 13:07:18 +0000
+++ doc/en/release-notes/bzr-2.4.txt 2012-03-29 12:00:28 +0000
@@ -55,6 +55,10 @@
55* Prevent a traceback being printed to stderr when logging has problems and55* Prevent a traceback being printed to stderr when logging has problems and
56 accept utf-8 byte string without breaking. (Martin Packman, #714449)56 accept utf-8 byte string without breaking. (Martin Packman, #714449)
5757
58* _Win32Stat object provides members st_uid and st_gid, those are present
59 in Python's os.stat object. These members required for external tools like
60 bzr-git and dulwich. (Alexander Belchenko, #967060)
61
58Documentation62Documentation
59*************63*************
6064
6165
=== modified file 'doc/en/release-notes/bzr-2.5.txt'