##// END OF EJS Templates
merge with stable
Yuya Nishihara -
r45068:f8427841 merge default
parent child Browse files
Show More
@@ -328,6 +328,7 b' def main():'
328 328 'allow-attr-methods': args.allow_attr_methods,
329 329 }
330 330 for fname in args.files:
331 fname = os.path.realpath(fname)
331 332 if args.inplace:
332 333 with editinplace(fname) as fout:
333 334 with open(fname, 'rb') as fin:
@@ -6,7 +6,7 b' before_script:'
6 6 - hg clone . /tmp/mercurial-ci/ --noupdate
7 7 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
8 8 - cd /tmp/mercurial-ci/
9 - (cd tests; ls -1 test-check-*.*) > /tmp/check-tests.txt
9 - ls -1 tests/test-check-*.* > /tmp/check-tests.txt
10 10
11 11 variables:
12 12 PYTHON: python
@@ -14,10 +14,9 b' variables:'
14 14
15 15 .runtests_template: &runtests
16 16 script:
17 - cd tests/
18 17 - echo "python used, $PYTHON"
19 18 - echo "$RUNTEST_ARGS"
20 - HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" run-tests.py --color=always $RUNTEST_ARGS
19 - HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS
21 20
22 21 checks-py2:
23 22 <<: *runtests
@@ -135,11 +135,15 b' class tarit(object):'
135 135 '''write archive to tar file or stream. can write uncompressed,
136 136 or compress with gzip or bzip2.'''
137 137
138 if pycompat.ispy3:
139 GzipFileWithTime = gzip.GzipFile # camelcase-required
140 else:
141
138 142 class GzipFileWithTime(gzip.GzipFile):
139 143 def __init__(self, *args, **kw):
140 144 timestamp = None
141 if 'timestamp' in kw:
142 timestamp = kw.pop('timestamp')
145 if 'mtime' in kw:
146 timestamp = kw.pop('mtime')
143 147 if timestamp is None:
144 148 self.timestamp = time.time()
145 149 else:
@@ -178,7 +182,7 b' class tarit(object):'
178 182 pycompat.sysstr(mode + b'b'),
179 183 zlib.Z_BEST_COMPRESSION,
180 184 fileobj,
181 timestamp=mtime,
185 mtime=mtime,
182 186 )
183 187 self.fileobj = gzfileobj
184 188 return tarfile.TarFile.taropen( # pytype: disable=attribute-error
@@ -159,7 +159,10 b' static const char *index_deref(indexObje'
159 159 sizeof(*self->offsets));
160 160 if (self->offsets == NULL)
161 161 return (const char *)PyErr_NoMemory();
162 inline_scan(self, self->offsets);
162 Py_ssize_t ret = inline_scan(self, self->offsets);
163 if (ret == -1) {
164 return NULL;
165 };
163 166 }
164 167 return self->offsets[pos];
165 168 }
@@ -27,6 +27,14 b' pub use revlog::*;'
27 27 pub mod re2;
28 28 pub mod utils;
29 29
30 // Remove this to see (potential) non-artificial compile failures. MacOS
31 // *should* compile, but fail to compile tests for example as of 2020-03-06
32 #[cfg(not(target_os = "linux"))]
33 compile_error!(
34 "`hg-core` has only been tested on Linux and will most \
35 likely not behave correctly on other platforms."
36 );
37
30 38 use crate::utils::hg_path::{HgPathBuf, HgPathError};
31 39 pub use filepatterns::{
32 40 parse_pattern_syntax, read_pattern_file, IgnorePattern,
@@ -1632,7 +1632,7 b' class TTest(Test):'
1632 1632 return self._have.get(allreqs)
1633 1633
1634 1634 # TODO do something smarter when all other uses of hghave are gone.
1635 runtestdir = os.path.abspath(os.path.dirname(_sys2bytes(__file__)))
1635 runtestdir = osenvironb[b'RUNTESTDIR']
1636 1636 tdir = runtestdir.replace(b'\\', b'/')
1637 1637 proc = Popen4(
1638 1638 b'%s -c "%s/hghave %s"' % (self._shell, tdir, allreqs),
General Comments 0
You need to be logged in to leave comments. Login now