##// 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 'allow-attr-methods': args.allow_attr_methods,
328 'allow-attr-methods': args.allow_attr_methods,
329 }
329 }
330 for fname in args.files:
330 for fname in args.files:
331 fname = os.path.realpath(fname)
331 if args.inplace:
332 if args.inplace:
332 with editinplace(fname) as fout:
333 with editinplace(fname) as fout:
333 with open(fname, 'rb') as fin:
334 with open(fname, 'rb') as fin:
@@ -6,7 +6,7 b' before_script:'
6 - hg clone . /tmp/mercurial-ci/ --noupdate
6 - hg clone . /tmp/mercurial-ci/ --noupdate
7 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
7 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
8 - cd /tmp/mercurial-ci/
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 variables:
11 variables:
12 PYTHON: python
12 PYTHON: python
@@ -14,10 +14,9 b' variables:'
14
14
15 .runtests_template: &runtests
15 .runtests_template: &runtests
16 script:
16 script:
17 - cd tests/
18 - echo "python used, $PYTHON"
17 - echo "python used, $PYTHON"
19 - echo "$RUNTEST_ARGS"
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 checks-py2:
21 checks-py2:
23 <<: *runtests
22 <<: *runtests
@@ -135,11 +135,15 b' class tarit(object):'
135 '''write archive to tar file or stream. can write uncompressed,
135 '''write archive to tar file or stream. can write uncompressed,
136 or compress with gzip or bzip2.'''
136 or compress with gzip or bzip2.'''
137
137
138 if pycompat.ispy3:
139 GzipFileWithTime = gzip.GzipFile # camelcase-required
140 else:
141
138 class GzipFileWithTime(gzip.GzipFile):
142 class GzipFileWithTime(gzip.GzipFile):
139 def __init__(self, *args, **kw):
143 def __init__(self, *args, **kw):
140 timestamp = None
144 timestamp = None
141 if 'timestamp' in kw:
145 if 'mtime' in kw:
142 timestamp = kw.pop('timestamp')
146 timestamp = kw.pop('mtime')
143 if timestamp is None:
147 if timestamp is None:
144 self.timestamp = time.time()
148 self.timestamp = time.time()
145 else:
149 else:
@@ -178,7 +182,7 b' class tarit(object):'
178 pycompat.sysstr(mode + b'b'),
182 pycompat.sysstr(mode + b'b'),
179 zlib.Z_BEST_COMPRESSION,
183 zlib.Z_BEST_COMPRESSION,
180 fileobj,
184 fileobj,
181 timestamp=mtime,
185 mtime=mtime,
182 )
186 )
183 self.fileobj = gzfileobj
187 self.fileobj = gzfileobj
184 return tarfile.TarFile.taropen( # pytype: disable=attribute-error
188 return tarfile.TarFile.taropen( # pytype: disable=attribute-error
@@ -159,7 +159,10 b' static const char *index_deref(indexObje'
159 sizeof(*self->offsets));
159 sizeof(*self->offsets));
160 if (self->offsets == NULL)
160 if (self->offsets == NULL)
161 return (const char *)PyErr_NoMemory();
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 return self->offsets[pos];
167 return self->offsets[pos];
165 }
168 }
@@ -27,6 +27,14 b' pub use revlog::*;'
27 pub mod re2;
27 pub mod re2;
28 pub mod utils;
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 use crate::utils::hg_path::{HgPathBuf, HgPathError};
38 use crate::utils::hg_path::{HgPathBuf, HgPathError};
31 pub use filepatterns::{
39 pub use filepatterns::{
32 parse_pattern_syntax, read_pattern_file, IgnorePattern,
40 parse_pattern_syntax, read_pattern_file, IgnorePattern,
@@ -1632,7 +1632,7 b' class TTest(Test):'
1632 return self._have.get(allreqs)
1632 return self._have.get(allreqs)
1633
1633
1634 # TODO do something smarter when all other uses of hghave are gone.
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 tdir = runtestdir.replace(b'\\', b'/')
1636 tdir = runtestdir.replace(b'\\', b'/')
1637 proc = Popen4(
1637 proc = Popen4(
1638 b'%s -c "%s/hghave %s"' % (self._shell, tdir, allreqs),
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