##// END OF EJS Templates
merge with stable
Augie Fackler -
r33720:86aca74a merge default
parent child Browse files
Show More
@@ -147,3 +147,5 b' bb96d4a497432722623ae60d9bc734a1e360179e'
147 c850f0ed54c1d42f9aa079ad528f8127e5775217 0 iQIVAwUAWTQINUemf/qjRqrOAQjZDw//b4pEgHYfWRVDEmLZtevysfhlJzbSyLAnWgNnRUVdSwl4WRF1r6ds/q7N4Ege5wQHjOpRtx4jC3y/riMbrLUlaeUXzCdqKgm4JcINS1nXy3IfkeDdUKyOR9upjaVhIEzCMRpyzabdYuflh5CoxayO7GFk2iZ8c1oAl4QzuLSspn9w+znqDg0HrMDbRNijStSulNjkqutih9UqT/PYizhE1UjL0NSnpYyD1vDljsHModJc2dhSzuZ1c4VFZHkienk+CNyeLtVKg8aC+Ej/Ppwq6FlE461T/RxOEzf+WFAc9F4iJibSN2kAFB4ySJ43y+OKkvzAwc5XbUx0y6OlWn2Ph+5T54sIwqasG3DjXyVrwVtAvCrcWUmOyS0RfkKoDVepMPIhFXyrhGqUYSq25Gt6tHVtIrlcWARIGGWlsE+PSHi87qcnSjs4xUzZwVvJWz4fuM1AUG/GTpyt4w3kB85XQikIINkmSTmsM/2/ar75T6jBL3kqOCGOL3n7bVZsGXllhkkQ7e/jqPPWnNXm8scDYdT3WENNu34zZp5ZmqdTXPAIIaqGswnU04KfUSEoYtOMri3E2VvrgMkiINm9BOKpgeTsMb3dkYRw2ZY3UAH9QfdX9BZywk6v3kkE5ghLWMUoQ4sqRlTo7mJKA8+EodjmIGRV/kAv1f7pigg6pIWWEyo=
147 c850f0ed54c1d42f9aa079ad528f8127e5775217 0 iQIVAwUAWTQINUemf/qjRqrOAQjZDw//b4pEgHYfWRVDEmLZtevysfhlJzbSyLAnWgNnRUVdSwl4WRF1r6ds/q7N4Ege5wQHjOpRtx4jC3y/riMbrLUlaeUXzCdqKgm4JcINS1nXy3IfkeDdUKyOR9upjaVhIEzCMRpyzabdYuflh5CoxayO7GFk2iZ8c1oAl4QzuLSsp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258 0 iQIcBAABCAAGBQJZjKKZAAoJELnJ3IJKpb3VGQkP/0iF6Khef0lBaRhbSAPwa7RUBb3iaBeuwmeic/hUjMoU1E5NR36bDDaF3u2di5mIYPBONFIeCPf9/DKyFkidueX1UnlAQa3mjh/QfKTb4/yO2Nrk7eH+QtrYxVUUYYjwgp4rS0Nd/++I1IUOor54vqJzJ7ZnM5O1RsE7VI1esAC/BTlUuO354bbm08B0owsZBwVvcVvpV4zeTvq5qyPxBJ3M0kw83Pgwh3JZB9IYhOabhSUBcA2fIPHgYGYnJVC+bLOeMWI1HJkJeoYfClNUiQUjAmi0cdTC733eQnHkDw7xyyFi+zkKu6JmU1opxkHSuj4Hrjul7Gtw3vVWWUPufz3AK7oymNp2Xr5y1HQLDtNJP3jicTTG1ae2TdX5Az3ze0I8VGbpR81/6ShAvY2cSKttV3I+2k4epxTTTf0xaZS1eUdnFOox6acElG2reNzx7EYYxpHj17K8N2qNzyY78iPgbJ+L39PBFoiGXMZJqWCxxIHoK1MxlXa8WwSnsXAU768dJvEn2N1x3fl+aeaWzeM4/5Qd83YjFuCeycuRnIo3rejSX3rWFAwZE0qQHKI5YWdKDLxIfdHTjdfMP7np+zLcHt0DV/dHmj2hKQgU0OK04fx7BrmdS1tw67Y9bL3H3TDohn7khU1FrqrKVuqSLbLsxnNyWRbZQF+DCoYrHlIW
@@ -160,3 +160,5 b' bb96d4a497432722623ae60d9bc734a1e360179e'
160 c850f0ed54c1d42f9aa079ad528f8127e5775217 4.2.1
160 c850f0ed54c1d42f9aa079ad528f8127e5775217 4.2.1
161 26c49ed51a698ec016d2b4c6b44ca3c3f73cc788 4.2.2
161 26c49ed51a698ec016d2b4c6b44ca3c3f73cc788 4.2.2
162 857876ebaed4e315f63157bd157d6ce553c7ab73 4.3-rc
162 857876ebaed4e315f63157bd157d6ce553c7ab73 4.3-rc
163 5544af8622863796a0027566f6b646e10d522c4c 4.3
164 943c91326b23954e6e1c6960d0239511f9530258 4.2.3
@@ -4,14 +4,14 b' Mercurial'
4 Mercurial is a fast, easy to use, distributed revision control tool
4 Mercurial is a fast, easy to use, distributed revision control tool
5 for software developers.
5 for software developers.
6
6
7 Basic install:
7 Basic install::
8
8
9 $ make # see install targets
9 $ make # see install targets
10 $ make install # do a system-wide install
10 $ make install # do a system-wide install
11 $ hg debuginstall # sanity-check setup
11 $ hg debuginstall # sanity-check setup
12 $ hg # see help
12 $ hg # see help
13
13
14 Running without installing:
14 Running without installing::
15
15
16 $ make local # build for inplace usage
16 $ make local # build for inplace usage
17 $ ./hg --version # should show the latest version
17 $ ./hg --version # should show the latest version
@@ -5,7 +5,7 b' SRCS = chg.c hgclient.c procutil.c util.'
5 OBJS = $(SRCS:.c=.o)
5 OBJS = $(SRCS:.c=.o)
6
6
7 CFLAGS ?= -O2 -Wall -Wextra -pedantic -g
7 CFLAGS ?= -O2 -Wall -Wextra -pedantic -g
8 CPPFLAGS ?= -D_FORTIFY_SOURCE=2
8 CPPFLAGS ?= -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
9 override CFLAGS += -std=gnu99
9 override CFLAGS += -std=gnu99
10 ifdef HGPATH
10 ifdef HGPATH
11 override CPPFLAGS += -DHGPATH=\"$(HGPATH)\"
11 override CPPFLAGS += -DHGPATH=\"$(HGPATH)\"
@@ -1,4 +1,7 b''
1 FROM centos:centos5
1 FROM centos:centos5
2 RUN sed -i 's/^mirrorlist/#mirrorlist/' /etc/yum.repos.d/*.repo
3 RUN sed -i 's/^#\(baseurl=\)http:\/\/mirror.centos.org\/centos/\1http:\/\/vault.centos.org/' /etc/yum.repos.d/*.repo
4 RUN sed -i 's/\$releasever/5.11/' /etc/yum.repos.d/*.repo
2 RUN yum install -y gcc make rpm-build gettext tar
5 RUN yum install -y gcc make rpm-build gettext tar
3 RUN yum install -y python-devel python-docutils
6 RUN yum install -y python-devel python-docutils
4 # For creating repo meta data
7 # For creating repo meta data
@@ -472,7 +472,7 b' class rebaseruntime(object):'
472 commitmsg = self.collapsemsg
472 commitmsg = self.collapsemsg
473 else:
473 else:
474 commitmsg = 'Collapsed revision'
474 commitmsg = 'Collapsed revision'
475 for rebased in self.state:
475 for rebased in sorted(self.state):
476 if rebased not in self.skipped and\
476 if rebased not in self.skipped and\
477 self.state[rebased] > nullmerge:
477 self.state[rebased] > nullmerge:
478 commitmsg += '\n* %s' % repo[rebased].description()
478 commitmsg += '\n* %s' % repo[rebased].description()
@@ -112,14 +112,20 b' def docstrings(path):'
112
112
113 for func, rstrip in functions:
113 for func, rstrip in functions:
114 if func.__doc__:
114 if func.__doc__:
115 funcmod = inspect.getmodule(func)
116 extra = ''
117 if funcmod.__package__ == funcmod.__name__:
118 extra = '/__init__'
119 actualpath = '%s%s.py' % (funcmod.__name__.replace('.', '/'), extra)
120
115 src = inspect.getsource(func)
121 src = inspect.getsource(func)
116 name = "%s.%s" % (path, func.__name__)
122 name = "%s.%s" % (actualpath, func.__name__)
117 lineno = inspect.getsourcelines(func)[1]
123 lineno = inspect.getsourcelines(func)[1]
118 doc = func.__doc__
124 doc = func.__doc__
119 if rstrip:
125 if rstrip:
120 doc = doc.rstrip()
126 doc = doc.rstrip()
121 lineno += offset(src, doc, name, 1)
127 lineno += offset(src, doc, name, 1)
122 print(poentry(path, lineno, doc))
128 print(poentry(actualpath, lineno, doc))
123
129
124
130
125 def rawtext(path):
131 def rawtext(path):
@@ -26,6 +26,7 b' from . import ('
26 changelog,
26 changelog,
27 copies,
27 copies,
28 crecord as crecordmod,
28 crecord as crecordmod,
29 dirstateguard,
29 encoding,
30 encoding,
30 error,
31 error,
31 formatter,
32 formatter,
@@ -2889,14 +2890,23 b' def commit(ui, repo, commitfunc, pats, o'
2889 message = logmessage(ui, opts)
2890 message = logmessage(ui, opts)
2890 matcher = scmutil.match(repo[None], pats, opts)
2891 matcher = scmutil.match(repo[None], pats, opts)
2891
2892
2893 dsguard = None
2892 # extract addremove carefully -- this function can be called from a command
2894 # extract addremove carefully -- this function can be called from a command
2893 # that doesn't support addremove
2895 # that doesn't support addremove
2894 if opts.get('addremove'):
2896 try:
2895 if scmutil.addremove(repo, matcher, "", opts) != 0:
2897 if opts.get('addremove'):
2896 raise error.Abort(
2898 dsguard = dirstateguard.dirstateguard(repo, 'commit')
2897 _("failed to mark all new/missing files as added/removed"))
2899 if scmutil.addremove(repo, matcher, "", opts) != 0:
2898
2900 raise error.Abort(
2899 return commitfunc(ui, repo, message, matcher, opts)
2901 _("failed to mark all new/missing files as added/removed"))
2902
2903 r = commitfunc(ui, repo, message, matcher, opts)
2904 if dsguard:
2905 dsguard.close()
2906 return r
2907 finally:
2908 if dsguard:
2909 dsguard.release()
2900
2910
2901 def samefile(f, ctx1, ctx2):
2911 def samefile(f, ctx1, ctx2):
2902 if f in ctx1.manifest():
2912 if f in ctx1.manifest():
@@ -828,6 +828,7 b' def _dispatch(req):'
828 color.setup(ui_)
828 color.setup(ui_)
829
829
830 if util.parsebool(options['pager']):
830 if util.parsebool(options['pager']):
831 # ui.pager() expects 'internal-always-' prefix in this case
831 ui.pager('internal-always-' + cmd)
832 ui.pager('internal-always-' + cmd)
832 elif options['pager'] != 'auto':
833 elif options['pager'] != 'auto':
833 ui.disablepager()
834 ui.disablepager()
@@ -16,6 +16,7 b' import shlex'
16 import sys
16 import sys
17
17
18 ispy3 = (sys.version_info[0] >= 3)
18 ispy3 = (sys.version_info[0] >= 3)
19 ispypy = (r'__pypy__' in sys.builtin_module_names)
19
20
20 if not ispy3:
21 if not ispy3:
21 import cookielib
22 import cookielib
@@ -945,8 +945,14 b' class ui(object):'
945 not "history, "summary" not "summ", etc.
945 not "history, "summary" not "summ", etc.
946 """
946 """
947 if (self._disablepager
947 if (self._disablepager
948 or self.pageractive
948 or self.pageractive):
949 or command in self.configlist('pager', 'ignore')
949 # how pager should do is already determined
950 return
951
952 if not command.startswith('internal-always-') and (
953 # explicit --pager=on (= 'internal-always-' prefix) should
954 # take precedence over disabling factors below
955 command in self.configlist('pager', 'ignore')
950 or not self.configbool('ui', 'paginate')
956 or not self.configbool('ui', 'paginate')
951 or not self.configbool('pager', 'attend-' + command, True)
957 or not self.configbool('pager', 'attend-' + command, True)
952 # TODO: if we want to allow HGPLAINEXCEPT=pager,
958 # TODO: if we want to allow HGPLAINEXCEPT=pager,
@@ -1209,6 +1215,7 b' class ui(object):'
1209 # call write() so output goes through subclassed implementation
1215 # call write() so output goes through subclassed implementation
1210 # e.g. color extension on Windows
1216 # e.g. color extension on Windows
1211 self.write(prompt, prompt=True)
1217 self.write(prompt, prompt=True)
1218 self.flush()
1212
1219
1213 # instead of trying to emulate raw_input, swap (self.fin,
1220 # instead of trying to emulate raw_input, swap (self.fin,
1214 # self.fout) with (sys.stdin, sys.stdout)
1221 # self.fout) with (sys.stdin, sys.stdout)
@@ -584,6 +584,14 b' class sortdict(collections.OrderedDict):'
584 del self[key]
584 del self[key]
585 super(sortdict, self).__setitem__(key, value)
585 super(sortdict, self).__setitem__(key, value)
586
586
587 if pycompat.ispypy:
588 # __setitem__() isn't called as of PyPy 5.8.0
589 def update(self, src):
590 if isinstance(src, dict):
591 src = src.iteritems()
592 for k, v in src:
593 self[k] = v
594
587 @contextlib.contextmanager
595 @contextlib.contextmanager
588 def acceptintervention(tr=None):
596 def acceptintervention(tr=None):
589 """A context manager that closes the transaction on InterventionRequired
597 """A context manager that closes the transaction on InterventionRequired
@@ -41,6 +41,9 b' filediff(){'
41 diff -u "$file1" "$file2" |
41 diff -u "$file1" "$file2" |
42 sed "s@^--- /dev/null\(.*\)\$@--- $1\1@" |
42 sed "s@^--- /dev/null\(.*\)\$@--- $1\1@" |
43 sed "s@^\+\+\+ /dev/null\(.*\)\$@+++ $2\1@"
43 sed "s@^\+\+\+ /dev/null\(.*\)\$@+++ $2\1@"
44
45 # in this case, files differ from each other
46 return 1
44 }
47 }
45
48
46 if test -d "$1" -o -d "$2"; then
49 if test -d "$1" -o -d "$2"; then
@@ -53,6 +56,14 b' if test -d "$1" -o -d "$2"; then'
53 while read file; do
56 while read file; do
54 filediff "$1/$file" "$2/$file" "diff -Nru $1/$file $2/$file"
57 filediff "$1/$file" "$2/$file" "diff -Nru $1/$file $2/$file"
55 done
58 done
59
60 # TODO: there is no portable way for current while-read based
61 # implementation to return 1 at detecting changes.
62 #
63 # On bash and dash, assignment to variable inside while-block
64 # doesn't affect outside, because inside while-block is executed
65 # in sub-shell. BTW, it affects outside while-block on ksh (as sh
66 # on Solaris).
56 else
67 else
57 filediff "$1" "$2"
68 filediff "$1" "$2"
58 fi
69 fi
@@ -47,21 +47,21 b' Make a helper function to check cache da'
47 > echo bad > $CACHE
47 > echo bad > $CACHE
48 > test -z "$CLEAN" || $CLEAN
48 > test -z "$CLEAN" || $CLEAN
49 > hg $CMD > after
49 > hg $CMD > after
50 > diff -u before after || echo "*** overwrite corruption"
50 > "$RUNTESTDIR/pdiff" before after || echo "*** overwrite corruption"
51 > echo corruption >> $CACHE
51 > echo corruption >> $CACHE
52 > test -z "$CLEAN" || $CLEAN
52 > test -z "$CLEAN" || $CLEAN
53 > hg $CMD > after
53 > hg $CMD > after
54 > diff -u before after || echo "*** append corruption"
54 > "$RUNTESTDIR/pdiff" before after || echo "*** append corruption"
55 > rm $CACHE
55 > rm $CACHE
56 > mkdir $CACHE
56 > mkdir $CACHE
57 > test -z "$CLEAN" || $CLEAN
57 > test -z "$CLEAN" || $CLEAN
58 > hg $CMD > after
58 > hg $CMD > after
59 > diff -u before after || echo "*** read-only corruption"
59 > "$RUNTESTDIR/pdiff" before after || echo "*** read-only corruption"
60 > test -d $CACHE || echo "*** directory clobbered"
60 > test -d $CACHE || echo "*** directory clobbered"
61 > rmdir $CACHE
61 > rmdir $CACHE
62 > test -z "$CLEAN" || $CLEAN
62 > test -z "$CLEAN" || $CLEAN
63 > hg $CMD > after
63 > hg $CMD > after
64 > diff -u before after || echo "*** missing corruption"
64 > "$RUNTESTDIR/pdiff" before after || echo "*** missing corruption"
65 > test -f $CACHE || echo "not rebuilt"
65 > test -f $CACHE || echo "not rebuilt"
66 > }
66 > }
67
67
@@ -147,6 +147,18 b' Using the advanced --extra flag'
147 oldhash=bar
147 oldhash=bar
148 sourcehash=foo
148 sourcehash=foo
149
149
150 Failed commit with --addremove should not update dirstate
151
152 $ echo foo > newfile
153 $ hg status
154 ? newfile
155 $ HGEDITOR=false hg ci --addremove
156 adding newfile
157 abort: edit failed: false exited with status 1
158 [255]
159 $ hg status
160 ? newfile
161
150 Make sure we do not obscure unknown requires file entries (issue2649)
162 Make sure we do not obscure unknown requires file entries (issue2649)
151
163
152 $ echo foo >> foo
164 $ echo foo >> foo
@@ -263,8 +263,16 b' Prepare custom diff/edit tool:'
263 will change to /tmp/extdiff.TMP and populate directories a.TMP and a
263 will change to /tmp/extdiff.TMP and populate directories a.TMP and a
264 and start tool
264 and start tool
265
265
266 #if windows
267 $ cat > 'diff tool.bat' << EOF
268 > @$PYTHON "`pwd`/diff tool.py"
269 > EOF
270 $ hg extdiff -p "`pwd`/diff tool.bat"
271 [1]
272 #else
266 $ hg extdiff -p "`pwd`/diff tool.py"
273 $ hg extdiff -p "`pwd`/diff tool.py"
267 [1]
274 [1]
275 #endif
268
276
269 Diff in working directory, after:
277 Diff in working directory, after:
270
278
@@ -245,6 +245,7 b' Check absolute/relative import of extens'
245
245
246 #if no-py3k
246 #if no-py3k
247 $ rm "$TESTTMP"/extroot/foo.*
247 $ rm "$TESTTMP"/extroot/foo.*
248 $ rm -Rf "$TESTTMP/extroot/__pycache__"
248 $ cat > $TESTTMP/extroot/foo.py <<EOF
249 $ cat > $TESTTMP/extroot/foo.py <<EOF
249 > # test relative import
250 > # test relative import
250 > buf = []
251 > buf = []
@@ -1238,6 +1239,7 b' empty declaration of supported version, '
1238 If the extension specifies a buglink, show that:
1239 If the extension specifies a buglink, show that:
1239 $ echo 'buglink = "http://example.com/bts"' >> throw.py
1240 $ echo 'buglink = "http://example.com/bts"' >> throw.py
1240 $ rm -f throw.pyc throw.pyo
1241 $ rm -f throw.pyc throw.pyo
1242 $ rm -Rf __pycache__
1241 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1243 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1242 ** Unknown exception encountered with possibly-broken third-party extension throw
1244 ** Unknown exception encountered with possibly-broken third-party extension throw
1243 ** which supports versions unknown of Mercurial.
1245 ** which supports versions unknown of Mercurial.
@@ -1253,6 +1255,7 b' If the extensions declare outdated versi'
1253 $ echo "testedwith = '1.9.3'" >> older.py
1255 $ echo "testedwith = '1.9.3'" >> older.py
1254 $ echo "testedwith = '2.1.1'" >> throw.py
1256 $ echo "testedwith = '2.1.1'" >> throw.py
1255 $ rm -f throw.pyc throw.pyo
1257 $ rm -f throw.pyc throw.pyo
1258 $ rm -Rf __pycache__
1256 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1259 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1257 > throw 2>&1 | egrep '^\*\*'
1260 > throw 2>&1 | egrep '^\*\*'
1258 ** Unknown exception encountered with possibly-broken third-party extension older
1261 ** Unknown exception encountered with possibly-broken third-party extension older
@@ -1266,6 +1269,7 b' If the extensions declare outdated versi'
1266 One extension only tested with older, one only with newer versions:
1269 One extension only tested with older, one only with newer versions:
1267 $ echo "util.version = lambda:'2.1'" >> older.py
1270 $ echo "util.version = lambda:'2.1'" >> older.py
1268 $ rm -f older.pyc older.pyo
1271 $ rm -f older.pyc older.pyo
1272 $ rm -Rf __pycache__
1269 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1273 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1270 > throw 2>&1 | egrep '^\*\*'
1274 > throw 2>&1 | egrep '^\*\*'
1271 ** Unknown exception encountered with possibly-broken third-party extension older
1275 ** Unknown exception encountered with possibly-broken third-party extension older
@@ -1279,6 +1283,7 b' One extension only tested with older, on'
1279 Older extension is tested with current version, the other only with newer:
1283 Older extension is tested with current version, the other only with newer:
1280 $ echo "util.version = lambda:'1.9.3'" >> older.py
1284 $ echo "util.version = lambda:'1.9.3'" >> older.py
1281 $ rm -f older.pyc older.pyo
1285 $ rm -f older.pyc older.pyo
1286 $ rm -Rf __pycache__
1282 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1287 $ hg --config extensions.throw=throw.py --config extensions.older=older.py \
1283 > throw 2>&1 | egrep '^\*\*'
1288 > throw 2>&1 | egrep '^\*\*'
1284 ** Unknown exception encountered with possibly-broken third-party extension throw
1289 ** Unknown exception encountered with possibly-broken third-party extension throw
@@ -1305,6 +1310,7 b' Declare the version as supporting this h'
1305 > echo "unable to fetch a mercurial version. Make sure __version__ is correct";
1310 > echo "unable to fetch a mercurial version. Make sure __version__ is correct";
1306 > fi
1311 > fi
1307 $ rm -f throw.pyc throw.pyo
1312 $ rm -f throw.pyc throw.pyo
1313 $ rm -Rf __pycache__
1308 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1314 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1309 ** unknown exception encountered, please report by visiting
1315 ** unknown exception encountered, please report by visiting
1310 ** https://mercurial-scm.org/wiki/BugTracker
1316 ** https://mercurial-scm.org/wiki/BugTracker
@@ -1316,6 +1322,7 b' Patch version is ignored during compatib'
1316 $ echo "testedwith = '3.2'" >> throw.py
1322 $ echo "testedwith = '3.2'" >> throw.py
1317 $ echo "util.version = lambda:'3.2.2'" >> throw.py
1323 $ echo "util.version = lambda:'3.2.2'" >> throw.py
1318 $ rm -f throw.pyc throw.pyo
1324 $ rm -f throw.pyc throw.pyo
1325 $ rm -Rf __pycache__
1319 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1326 $ hg --config extensions.throw=throw.py throw 2>&1 | egrep '^\*\*'
1320 ** unknown exception encountered, please report by visiting
1327 ** unknown exception encountered, please report by visiting
1321 ** https://mercurial-scm.org/wiki/BugTracker
1328 ** https://mercurial-scm.org/wiki/BugTracker
@@ -1326,6 +1333,7 b' Patch version is ignored during compatib'
1326 Test version number support in 'hg version':
1333 Test version number support in 'hg version':
1327 $ echo '__version__ = (1, 2, 3)' >> throw.py
1334 $ echo '__version__ = (1, 2, 3)' >> throw.py
1328 $ rm -f throw.pyc throw.pyo
1335 $ rm -f throw.pyc throw.pyo
1336 $ rm -Rf __pycache__
1329 $ hg version -v
1337 $ hg version -v
1330 Mercurial Distributed SCM (version *) (glob)
1338 Mercurial Distributed SCM (version *) (glob)
1331 (see https://mercurial-scm.org for more information)
1339 (see https://mercurial-scm.org for more information)
@@ -1350,6 +1358,7 b" Test version number support in 'hg versi"
1350 throw external 1.2.3
1358 throw external 1.2.3
1351 $ echo 'getversion = lambda: "1.twentythree"' >> throw.py
1359 $ echo 'getversion = lambda: "1.twentythree"' >> throw.py
1352 $ rm -f throw.pyc throw.pyo
1360 $ rm -f throw.pyc throw.pyo
1361 $ rm -Rf __pycache__
1353 $ hg version -v --config extensions.throw=throw.py --config extensions.strip=
1362 $ hg version -v --config extensions.throw=throw.py --config extensions.strip=
1354 Mercurial Distributed SCM (version *) (glob)
1363 Mercurial Distributed SCM (version *) (glob)
1355 (see https://mercurial-scm.org for more information)
1364 (see https://mercurial-scm.org for more information)
@@ -1674,7 +1683,7 b" Make sure a broken uisetup doesn't globa"
1674
1683
1675 Even though the extension fails during uisetup, hg is still basically usable:
1684 Even though the extension fails during uisetup, hg is still basically usable:
1676 $ hg version
1685 $ hg version
1677 *** failed to set up extension baduisetup: No module named bdiff
1686 \*\*\* failed to set up extension baduisetup: No module named (mercurial\.)?bdiff (re)
1678 Mercurial Distributed SCM (version *) (glob)
1687 Mercurial Distributed SCM (version *) (glob)
1679 (see https://mercurial-scm.org for more information)
1688 (see https://mercurial-scm.org for more information)
1680
1689
@@ -1696,8 +1705,8 b' Even though the extension fails during u'
1696 mod = _hgextimport(_origimport, head, globals, locals, None, level)
1705 mod = _hgextimport(_origimport, head, globals, locals, None, level)
1697 File "*/hgdemandimport/demandimportpy2.py", line *, in _hgextimport (glob)
1706 File "*/hgdemandimport/demandimportpy2.py", line *, in _hgextimport (glob)
1698 return importfunc(name, globals, *args, **kwargs)
1707 return importfunc(name, globals, *args, **kwargs)
1699 ImportError: No module named bdiff
1708 ImportError: No module named (mercurial\.)?bdiff (re)
1700 *** failed to set up extension baduisetup: No module named bdiff
1709 \*\*\* failed to set up extension baduisetup: No module named (mercurial\.)?bdiff (re)
1701 Mercurial Distributed SCM (version *) (glob)
1710 Mercurial Distributed SCM (version *) (glob)
1702 (see https://mercurial-scm.org for more information)
1711 (see https://mercurial-scm.org for more information)
1703
1712
@@ -152,6 +152,7 b''
152 $ hg commit -Aqm 'fail+base64+gzip+noop'
152 $ hg commit -Aqm 'fail+base64+gzip+noop'
153 abort: missing processor for flag '0x1'!
153 abort: missing processor for flag '0x1'!
154 [255]
154 [255]
155 $ rm fail-base64-gzip-noop
155
156
156 # TEST: ensure we cannot register several flag processors on the same flag
157 # TEST: ensure we cannot register several flag processors on the same flag
157 $ cat >> .hg/hgrc << EOF
158 $ cat >> .hg/hgrc << EOF
@@ -159,11 +160,11 b''
159 > extension=$TESTDIR/flagprocessorext.py
160 > extension=$TESTDIR/flagprocessorext.py
160 > duplicate=$TESTDIR/flagprocessorext.py
161 > duplicate=$TESTDIR/flagprocessorext.py
161 > EOF
162 > EOF
162 $ echo 'this should fail' > file
163 $ hg debugrebuilddirstate
163 $ hg commit -Aqm 'add file'
164 *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'.
164 *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'.
165 abort: missing processor for flag '0x1'!
165 $ hg st 2>&1 | egrep 'cannot register multiple processors|flagprocessorext'
166 [255]
166 *** failed to set up extension duplicate: cannot register multiple processors on flag '0x8'.
167 File "*/tests/flagprocessorext.py", line *, in b64decode (glob)
167
168
168 $ cd ..
169 $ cd ..
169
170
@@ -80,6 +80,34 b' We can control the pager from the config'
80 paged! 'summary: modify a 10\n'
80 paged! 'summary: modify a 10\n'
81 paged! '\n'
81 paged! '\n'
82
82
83 explicit --pager=on should take precedence over other configurations
84 (issue5580)
85
86 $ cat >> $HGRCPATH <<EOF
87 > [ui]
88 > paginate = false
89 > EOF
90 $ hg log --limit 1 --pager=on
91 paged! 'changeset: 10:46106edeeb38\n'
92 paged! 'tag: tip\n'
93 paged! 'user: test\n'
94 paged! 'date: Thu Jan 01 00:00:00 1970 +0000\n'
95 paged! 'summary: modify a 10\n'
96 paged! '\n'
97
98 $ cat >> $HGRCPATH <<EOF
99 > [ui]
100 > # true is default value of ui.paginate
101 > paginate = true
102 > EOF
103 $ hg log --limit 1 --pager=off
104 changeset: 10:46106edeeb38
105 tag: tip
106 user: test
107 date: Thu Jan 01 00:00:00 1970 +0000
108 summary: modify a 10
109
110
83 We can enable the pager on id:
111 We can enable the pager on id:
84
112
85 BROKEN: should be paged
113 BROKEN: should be paged
@@ -312,6 +312,7 b' of which length of byte sequence and col'
312 from each other.
312 from each other.
313
313
314 $ rm -f loop.pyc
314 $ rm -f loop.pyc
315 $ rm -Rf __pycache__
315 $ cat >> loop.py <<EOF
316 $ cat >> loop.py <<EOF
316 > # use non-ascii characters as loop items of progress
317 > # use non-ascii characters as loop items of progress
317 > loopitems = [
318 > loopitems = [
@@ -144,12 +144,18 b" def lowlevelcopy(rlog, tr, destname=b'_d"
144 text = None
144 text = None
145 cachedelta = (deltaparent, rlog.revdiff(deltaparent, r))
145 cachedelta = (deltaparent, rlog.revdiff(deltaparent, r))
146 flags = rlog.flags(r)
146 flags = rlog.flags(r)
147 ifh = dlog.opener(dlog.indexfile, 'a+')
147 ifh = dfh = None
148 dfh = None
148 try:
149 if not dlog._inline:
149 ifh = dlog.opener(dlog.indexfile, 'a+')
150 dfh = dlog.opener(dlog.datafile, 'a+')
150 if not dlog._inline:
151 dlog._addrevision(rlog.node(r), text, tr, r, p1, p2, flags, cachedelta,
151 dfh = dlog.opener(dlog.datafile, 'a+')
152 ifh, dfh)
152 dlog._addrevision(rlog.node(r), text, tr, r, p1, p2, flags,
153 cachedelta, ifh, dfh)
154 finally:
155 if dfh is not None:
156 dfh.close()
157 if ifh is not None:
158 ifh.close()
153 return dlog
159 return dlog
154
160
155 # Utilities to generate revisions for testing
161 # Utilities to generate revisions for testing
@@ -14,10 +14,12 b''
14 $ rm .hg/hgrc
14 $ rm .hg/hgrc
15
15
16 $ HGUSER=`(echo foo; echo bar2)` hg ci -Am m
16 $ HGUSER=`(echo foo; echo bar2)` hg ci -Am m
17 adding a
17 abort: username 'foo\nbar2' contains a newline
18 abort: username 'foo\nbar2' contains a newline
18
19
19 [255]
20 [255]
20 $ hg ci -Am m -u "`(echo foo; echo bar3)`"
21 $ hg ci -Am m -u "`(echo foo; echo bar3)`"
22 adding a
21 transaction abort!
23 transaction abort!
22 rollback completed
24 rollback completed
23 abort: username 'foo\nbar3' contains a newline!
25 abort: username 'foo\nbar3' contains a newline!
General Comments 0
You need to be logged in to leave comments. Login now