{author|user}@{rev}
+ title="{node|short}: {desc|escape|firstline}">{author|user}@{rev}
|
{linenumber}
@@ -129,7 +129,7 @@
{changesetlink}'
changesetparentdiff = '
parent {rev}
- {changesetlink} {ifeq(node, basenode, '(current diff)', \'({difffrom})\')}'
+ {changesetlink} {ifeq(node, basenode, '(current diff)', '({difffrom})')}'
difffrom = 'diff'
filerevbranch = 'branch{name|escape}'
filerevparent = '
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/monoblue/shortlog.tmpl
--- a/mercurial/templates/monoblue/shortlog.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/monoblue/shortlog.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -26,8 +26,8 @@
bookmarks
branches
files
- {archives%archiveentry}
- help
+ {archives%archiveentry}
+ help
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/monoblue/summary.tmpl
--- a/mercurial/templates/monoblue/summary.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/monoblue/summary.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -26,7 +26,7 @@
bookmarks
branches
files
- help
+ help
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/monoblue/tags.tmpl
--- a/mercurial/templates/monoblue/tags.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/monoblue/tags.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -26,7 +26,7 @@
bookmarks
branches
files
- help
+ help
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/paper/bookmarks.tmpl
--- a/mercurial/templates/paper/bookmarks.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/paper/bookmarks.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -23,7 +23,6 @@
-
@@ -42,10 +41,12 @@
+
bookmark |
node |
+
{entries%bookmarkentry}
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/paper/branches.tmpl
--- a/mercurial/templates/paper/branches.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/paper/branches.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -23,7 +23,6 @@
-
@@ -42,10 +41,12 @@
+
branch |
node |
+
{entries % branchentry}
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/paper/changeset.tmpl
--- a/mercurial/templates/paper/changeset.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/paper/changeset.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -48,7 +48,8 @@
date |
- {date|rfc822date} |
+ {date|rfc822date} |
+
parents |
{ifeq(count(parent), '2', parent%changesetparentdiff, parent%changesetparent)} |
@@ -68,8 +69,7 @@
[+]
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/paper/fileannotate.tmpl
--- a/mercurial/templates/paper/fileannotate.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/paper/fileannotate.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -68,10 +68,12 @@
+
rev |
line source |
+
{annotate%annotateline}
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/paper/filelog.tmpl
--- a/mercurial/templates/paper/filelog.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/paper/filelog.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -35,7 +35,6 @@
-
+
age |
author |
description |
+
{entries%filelogentry}
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/paper/graph.tmpl
--- a/mercurial/templates/paper/graph.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/paper/graph.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -28,7 +28,6 @@
-
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/paper/index.tmpl
--- a/mercurial/templates/paper/index.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/paper/index.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -12,6 +12,7 @@
Mercurial {pathdef%breadcrumb}
+
Name |
Description |
@@ -20,6 +21,7 @@
|
|
+
{entries%indexentry}
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/paper/manifest.tmpl
--- a/mercurial/templates/paper/manifest.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/paper/manifest.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -39,11 +39,13 @@
+
name |
size |
permissions |
+
[up] |
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/paper/search.tmpl
--- a/mercurial/templates/paper/search.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/paper/search.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -43,11 +43,13 @@
+
age |
author |
description |
+
{entries}
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/paper/shortlog.tmpl
--- a/mercurial/templates/paper/shortlog.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/paper/shortlog.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -30,7 +30,6 @@
-
+
age |
author |
description |
+
{entries%shortlogentry}
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/paper/tags.tmpl
--- a/mercurial/templates/paper/tags.tmpl Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/paper/tags.tmpl Thu Mar 05 15:52:07 2015 -0600
@@ -23,7 +23,6 @@
-
@@ -42,10 +41,12 @@
+
tag |
node |
+
{entries%tagentry}
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/templates/static/style-paper.css
--- a/mercurial/templates/static/style-paper.css Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/templates/static/style-paper.css Thu Mar 05 15:52:07 2015 -0600
@@ -60,6 +60,10 @@
border: 0;
}
+div.atom-logo {
+ margin-top: 10px;
+}
+
.atom-logo img{
width: 14px;
height: 14px;
@@ -104,6 +108,9 @@
.minusline { color: #dc143c; } /* crimson */
.atline { color: purple; }
+.diffstat-table {
+ margin-top: 1em;
+}
.diffstat-file {
white-space: nowrap;
font-size: 90%;
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/unionrepo.py
--- a/mercurial/unionrepo.py Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/unionrepo.py Thu Mar 05 15:52:07 2015 -0600
@@ -160,8 +160,11 @@
def baserevdiff(self, rev1, rev2):
return filelog.filelog.revdiff(self, rev1, rev2)
- def _file(self, f):
- self._repo.file(f)
+ def iscensored(self, rev):
+ """Check if a revision is censored."""
+ if rev <= self.repotiprev:
+ return filelog.filelog.iscensored(self, rev)
+ return self.revlog2.iscensored(rev)
class unionpeer(localrepo.localpeer):
def canpush(self):
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/util.h
--- a/mercurial/util.h Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/util.h Thu Mar 05 15:52:07 2015 -0600
@@ -172,6 +172,22 @@
(d[3]));
}
+static inline int16_t getbeint16(const char *c)
+{
+ const unsigned char *d = (const unsigned char *)c;
+
+ return ((d[0] << 8) |
+ (d[1]));
+}
+
+static inline uint16_t getbeuint16(const char *c)
+{
+ const unsigned char *d = (const unsigned char *)c;
+
+ return ((d[0] << 8) |
+ (d[1]));
+}
+
static inline void putbe32(uint32_t x, char *c)
{
c[0] = (x >> 24) & 0xff;
@@ -180,4 +196,17 @@
c[3] = (x) & 0xff;
}
+static inline double getbefloat64(const char *c)
+{
+ const unsigned char *d = (const unsigned char *)c;
+ double ret;
+ int i;
+ uint64_t t = 0;
+ for (i = 0; i < 8; i++) {
+ t = (t<<8) + d[i];
+ }
+ memcpy(&ret, &t, sizeof(t));
+ return ret;
+}
+
#endif /* _HG_UTIL_H_ */
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/util.py
--- a/mercurial/util.py Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/util.py Thu Mar 05 15:52:07 2015 -0600
@@ -1352,11 +1352,11 @@
formats = defaultdateformats
date = date.strip()
- if date == _('now'):
+ if date == 'now' or date == _('now'):
return makedate()
- if date == _('today'):
+ if date == 'today' or date == _('today'):
date = datetime.date.today().strftime('%b %d')
- elif date == _('yesterday'):
+ elif date == 'yesterday' or date == _('yesterday'):
date = (datetime.date.today() -
datetime.timedelta(days=1)).strftime('%b %d')
diff -r 3cc630be5f09 -r 4ef4e3c3c006 mercurial/windows.py
--- a/mercurial/windows.py Fri Mar 06 00:14:22 2015 +0900
+++ b/mercurial/windows.py Thu Mar 05 15:52:07 2015 -0600
@@ -26,14 +26,22 @@
unlink = win32.unlink
umask = 0022
+_SEEK_END = 2 # os.SEEK_END was introduced in Python 2.5
-# wrap osutil.posixfile to provide friendlier exceptions
def posixfile(name, mode='r', buffering=-1):
+ '''Open a file with even more POSIX-like semantics'''
try:
- return osutil.posixfile(name, mode, buffering)
+ fp = osutil.posixfile(name, mode, buffering) # may raise WindowsError
+
+ # The position when opening in append mode is implementation defined, so
+ # make it consistent with other platforms, which position at EOF.
+ if 'a' in mode:
+ fp.seek(0, _SEEK_END)
+
+ return fp
except WindowsError, err:
+ # convert to a friendlier exception
raise IOError(err.errno, '%s: %s' % (name, err.strerror))
-posixfile.__doc__ = osutil.posixfile.__doc__
class winstdout(object):
'''stdout on windows misbehaves if sent through a pipe'''
diff -r 3cc630be5f09 -r 4ef4e3c3c006 setup.py
--- a/setup.py Fri Mar 06 00:14:22 2015 +0900
+++ b/setup.py Thu Mar 05 15:52:07 2015 -0600
@@ -63,6 +63,8 @@
raise SystemExit(
"Couldn't import standard bz2 (incomplete Python install).")
+ispypy = "PyPy" in sys.version
+
import os, stat, subprocess, time
import re
import shutil
@@ -276,7 +278,7 @@
class hgdist(Distribution):
- pure = 0
+ pure = ispypy
global_options = Distribution.global_options + \
[('pure', None, "use pure (slow) Python "
@@ -555,7 +557,7 @@
if py2exeloaded:
extra['console'] = [
{'script':'hg',
- 'copyright':'Copyright (C) 2005-2010 Matt Mackall and others',
+ 'copyright':'Copyright (C) 2005-2015 Matt Mackall and others',
'product_version':version}]
# sub command of 'build' because 'py2exe' does not handle sub_commands
build.sub_commands.insert(0, ('build_hgextindex', None))
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/run-tests.py
--- a/tests/run-tests.py Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/run-tests.py Thu Mar 05 15:52:07 2015 -0600
@@ -1863,6 +1863,17 @@
'prefix': self._installdir, 'libdir': self._pythondir,
'bindir': self._bindir,
'nohome': nohome, 'logfile': installerrs})
+
+ # setuptools requires install directories to exist.
+ def makedirs(p):
+ try:
+ os.makedirs(p)
+ except OSError, e:
+ if e.errno != errno.EEXIST:
+ raise
+ makedirs(self._pythondir)
+ makedirs(self._bindir)
+
vlog("# Running", cmd)
if os.system(cmd) == 0:
if not self.options.verbose:
@@ -1870,7 +1881,7 @@
else:
f = open(installerrs, 'rb')
for line in f:
- print line
+ sys.stdout.write(line)
f.close()
sys.exit(1)
os.chdir(self._testdir)
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-addremove.t
--- a/tests/test-addremove.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-addremove.t Thu Mar 05 15:52:07 2015 -0600
@@ -30,12 +30,12 @@
adding foo
$ hg forget foo
#if windows
- $ hg -v addremove nonexistant
- nonexistant: The system cannot find the file specified
+ $ hg -v addremove nonexistent
+ nonexistent: The system cannot find the file specified
[1]
#else
- $ hg -v addremove nonexistant
- nonexistant: No such file or directory
+ $ hg -v addremove nonexistent
+ nonexistent: No such file or directory
[1]
#endif
$ cd ..
@@ -88,13 +88,13 @@
$ rm c
#if windows
- $ hg ci -A -m "c" nonexistant
- nonexistant: The system cannot find the file specified
+ $ hg ci -A -m "c" nonexistent
+ nonexistent: The system cannot find the file specified
abort: failed to mark all new/missing files as added/removed
[255]
#else
- $ hg ci -A -m "c" nonexistant
- nonexistant: No such file or directory
+ $ hg ci -A -m "c" nonexistent
+ nonexistent: No such file or directory
abort: failed to mark all new/missing files as added/removed
[255]
#endif
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-bundle-type.t
--- a/tests/test-bundle-type.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-bundle-type.t Thu Mar 05 15:52:07 2015 -0600
@@ -87,6 +87,7 @@
$ hg init tgarbage
$ cd tgarbage
$ hg pull ../bgarbage
+ pulling from ../bgarbage
abort: ../bgarbage: not a Mercurial bundle
[255]
$ cd ..
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-churn.t
--- a/tests/test-churn.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-churn.t Thu Mar 05 15:52:07 2015 -0600
@@ -171,4 +171,27 @@
El Ni\xc3\xb1o 1 *************** (esc)
with space 1 ***************
+Test --template argument, with backwards compatiblity
+
+ $ hg churn -t '{author|user}'
+ user1 4 ***************************************************************
+ user3 3 ***********************************************
+ user2 2 ********************************
+ nino 1 ****************
+ with 1 ****************
+ 0
+ user4 0
+ $ hg churn -T '{author|user}'
+ user1 4 ***************************************************************
+ user3 3 ***********************************************
+ user2 2 ********************************
+ nino 1 ****************
+ with 1 ****************
+ 0
+ user4 0
+ $ hg churn -t 'alltogether'
+ alltogether 11 *********************************************************
+ $ hg churn -T 'alltogether'
+ alltogether 11 *********************************************************
+
$ cd ..
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-completion.t
--- a/tests/test-completion.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-completion.t Thu Mar 05 15:52:07 2015 -0600
@@ -278,7 +278,7 @@
phase: public, draft, secret, force, rev
recover:
rename: after, force, include, exclude, dry-run
- resolve: all, list, mark, unmark, no-status, tool, include, exclude
+ resolve: all, list, mark, unmark, no-status, tool, include, exclude, template
revert: all, date, rev, no-backup, include, exclude, dry-run
rollback: dry-run, force
root:
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-context.py
--- a/tests/test-context.py Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-context.py Thu Mar 05 15:52:07 2015 -0600
@@ -51,7 +51,7 @@
for d in ctxb.diff(ctxa, git=True):
print d
-# test safeness and correctness of "cxt.status()"
+# test safeness and correctness of "ctx.status()"
print '= checking context.status():'
# ancestor "wcctx ~ 2"
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-extension.t
--- a/tests/test-extension.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-extension.t Thu Mar 05 15:52:07 2015 -0600
@@ -1140,3 +1140,27 @@
C sub3/3
$ cd ..
+
+Test synopsis and docstring extending
+
+ $ hg init exthelp
+ $ cat > exthelp.py < from mercurial import commands, extensions
+ > def exbookmarks(orig, *args, **opts):
+ > return orig(*args, **opts)
+ > def uisetup(ui):
+ > synopsis = ' GREPME [--foo] [-x]'
+ > docstring = '''
+ > GREPME make sure that this is in the help!
+ > '''
+ > extensions.wrapcommand(commands.table, 'bookmarks', exbookmarks,
+ > synopsis, docstring)
+ > EOF
+ $ abspath=`pwd`/exthelp.py
+ $ echo '[extensions]' >> $HGRCPATH
+ $ echo "exthelp = $abspath" >> $HGRCPATH
+ $ cd exthelp
+ $ hg help bookmarks | grep GREPME
+ hg bookmarks [OPTIONS]... [NAME]... GREPME [--foo] [-x]
+ GREPME make sure that this is in the help!
+
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-gendoc.t
--- a/tests/test-gendoc.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-gendoc.t Thu Mar 05 15:52:07 2015 -0600
@@ -1,4 +1,5 @@
#require docutils
+#require gettext
Test document extraction
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-glog.t
--- a/tests/test-glog.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-glog.t Thu Mar 05 15:52:07 2015 -0600
@@ -1541,6 +1541,9 @@
$ testlog --follow
[]
[]
+ $ testlog -rnull
+ ['null']
+ []
$ echo a > a
$ echo aa > aa
$ echo f > f
@@ -1764,6 +1767,13 @@
nodetag 1
nodetag 0
+Test --follow null parent
+
+ $ hg up -q null
+ $ testlog -f
+ []
+ []
+
Test --follow-first
$ hg up -q 3
@@ -2192,13 +2202,6 @@
(func
('symbol', 'rev')
('symbol', '6'))))
- --- log.nodes * (glob)
- +++ glog.nodes * (glob)
- @@ -1,3 +1,3 @@
- -nodetag 6
- nodetag 8
- nodetag 7
- +nodetag 6
Test --follow-first and forward --rev
@@ -2240,6 +2243,14 @@
('symbol', 'rev')
('symbol', '6'))))
+Test --follow with --rev of graphlog extension
+
+ $ hg --config extensions.graphlog= glog -qfr1
+ o 1:216d4c92cf98
+ |
+ o 0:f8035bb17114
+
+
Test subdir
$ hg up -q 3
@@ -2354,4 +2365,14 @@
date: Thu Jan 01 00:00:00 1970 +0000
+should not draw line down to null due to the magic of fullreposet
+
+ $ hg log -G -r 'all()' | tail -6
+ |
+ o changeset: 0:f8035bb17114
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: add a
+
+
$ cd ..
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-grep.t
--- a/tests/test-grep.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-grep.t Thu Mar 05 15:52:07 2015 -0600
@@ -82,6 +82,10 @@
port:1:2:+:eggs:export
port:0:1:+:spam:import
+ $ hg up -q null
+ $ hg grep -f port
+ [1]
+
$ cd ..
$ hg init t2
$ cd t2
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-help.t
--- a/tests/test-help.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-help.t Thu Mar 05 15:52:07 2015 -0600
@@ -411,7 +411,7 @@
Mercurial Distributed SCM (version *) (glob)
(see http://mercurial.selenic.com for more information)
- Copyright (C) 2005-2014 Matt Mackall and others
+ Copyright (C) 2005-2015 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
@@ -1101,6 +1101,125 @@
abort: help section not found
[255]
+Test dynamic list of merge tools only shows up once
+ $ hg help merge-tools
+ Merge Tools
+ """""""""""
+
+ To merge files Mercurial uses merge tools.
+
+ A merge tool combines two different versions of a file into a merged file.
+ Merge tools are given the two files and the greatest common ancestor of
+ the two file versions, so they can determine the changes made on both
+ branches.
+
+ Merge tools are used both for "hg resolve", "hg merge", "hg update", "hg
+ backout" and in several extensions.
+
+ Usually, the merge tool tries to automatically reconcile the files by
+ combining all non-overlapping changes that occurred separately in the two
+ different evolutions of the same initial base file. Furthermore, some
+ interactive merge programs make it easier to manually resolve conflicting
+ merges, either in a graphical way, or by inserting some conflict markers.
+ Mercurial does not include any interactive merge programs but relies on
+ external tools for that.
+
+ Available merge tools
+ =====================
+
+ External merge tools and their properties are configured in the merge-
+ tools configuration section - see hgrc(5) - but they can often just be
+ named by their executable.
+
+ A merge tool is generally usable if its executable can be found on the
+ system and if it can handle the merge. The executable is found if it is an
+ absolute or relative executable path or the name of an application in the
+ executable search path. The tool is assumed to be able to handle the merge
+ if it can handle symlinks if the file is a symlink, if it can handle
+ binary files if the file is binary, and if a GUI is available if the tool
+ requires a GUI.
+
+ There are some internal merge tools which can be used. The internal merge
+ tools are:
+
+ ":dump"
+ Creates three versions of the files to merge, containing the contents of
+ local, other and base. These files can then be used to perform a merge
+ manually. If the file to be merged is named "a.txt", these files will
+ accordingly be named "a.txt.local", "a.txt.other" and "a.txt.base" and
+ they will be placed in the same directory as "a.txt".
+
+ ":fail"
+ Rather than attempting to merge files that were modified on both
+ branches, it marks them as unresolved. The resolve command must be used
+ to resolve these conflicts.
+
+ ":local"
+ Uses the local version of files as the merged version.
+
+ ":merge"
+ Uses the internal non-interactive simple merge algorithm for merging
+ files. It will fail if there are any conflicts and leave markers in the
+ partially merged file. Markers will have two sections, one for each side
+ of merge.
+
+ ":merge3"
+ Uses the internal non-interactive simple merge algorithm for merging
+ files. It will fail if there are any conflicts and leave markers in the
+ partially merged file. Marker will have three sections, one from each
+ side of the merge and one for the base content.
+
+ ":other"
+ Uses the other version of files as the merged version.
+
+ ":prompt"
+ Asks the user which of the local or the other version to keep as the
+ merged version.
+
+ ":tagmerge"
+ Uses the internal tag merge algorithm (experimental).
+
+ Internal tools are always available and do not require a GUI but will by
+ default not handle symlinks or binary files.
+
+ Choosing a merge tool
+ =====================
+
+ Mercurial uses these rules when deciding which merge tool to use:
+
+ 1. If a tool has been specified with the --tool option to merge or
+ resolve, it is used. If it is the name of a tool in the merge-tools
+ configuration, its configuration is used. Otherwise the specified tool
+ must be executable by the shell.
+ 2. If the "HGMERGE" environment variable is present, its value is used and
+ must be executable by the shell.
+ 3. If the filename of the file to be merged matches any of the patterns in
+ the merge-patterns configuration section, the first usable merge tool
+ corresponding to a matching pattern is used. Here, binary capabilities
+ of the merge tool are not considered.
+ 4. If ui.merge is set it will be considered next. If the value is not the
+ name of a configured tool, the specified value is used and must be
+ executable by the shell. Otherwise the named tool is used if it is
+ usable.
+ 5. If any usable merge tools are present in the merge-tools configuration
+ section, the one with the highest priority is used.
+ 6. If a program named "hgmerge" can be found on the system, it is used -
+ but it will by default not be used for symlinks and binary files.
+ 7. If the file to be merged is not binary and is not a symlink, then
+ internal ":merge" is used.
+ 8. The merge of the file fails and must be resolved before commit.
+
+ Note:
+ After selecting a merge program, Mercurial will by default attempt to
+ merge the files using a simple merge algorithm first. Only if it
+ doesn't succeed because of conflicting changes Mercurial will actually
+ execute the merge program. Whether to use the simple merge algorithm
+ first can be controlled by the premerge setting of the merge tool.
+ Premerge is enabled by default unless the file is binary or a symlink.
+
+ See the merge-tools and ui sections of hgrc(5) for details on the
+ configuration of merge tools.
+
Test usage of section marks in help documents
$ cd "$TESTDIR"/../doc
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-hgrc.t
--- a/tests/test-hgrc.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-hgrc.t Thu Mar 05 15:52:07 2015 -0600
@@ -71,7 +71,7 @@
Mercurial Distributed SCM (version *) (glob)
(see http://mercurial.selenic.com for more information)
- Copyright (C) 2005-2014 Matt Mackall and others
+ Copyright (C) 2005-2015 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ unset FAKEPATH
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-hgweb-commands.t
--- a/tests/test-hgweb-commands.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-hgweb-commands.t Thu Mar 05 15:52:07 2015 -0600
@@ -726,7 +726,6 @@
-
+
age |
author |
description |
+
Thu, 01 Jan 1970 00:00:00 +0000 |
@@ -873,7 +874,8 @@
date |
- Thu, 01 Jan 1970 00:00:00 +0000 |
+ Thu, 01 Jan 1970 00:00:00 +0000 |
+
parents |
|
@@ -894,8 +896,7 @@
[+]
[-]
-
-
+
da/foo |
1 |
@@ -1012,11 +1013,13 @@
+
age |
author |
description |
+
Thu, 01 Jan 1970 00:00:00 +0000 |
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-hgweb-descend-empties.t
--- a/tests/test-hgweb-descend-empties.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-hgweb-descend-empties.t Thu Mar 05 15:52:07 2015 -0600
@@ -81,11 +81,13 @@
+
name |
size |
permissions |
+
[up] |
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-hgweb-diffs.t
--- a/tests/test-hgweb-diffs.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-hgweb-diffs.t Thu Mar 05 15:52:07 2015 -0600
@@ -97,7 +97,8 @@
date |
- Thu, 01 Jan 1970 00:00:00 +0000 |
+ Thu, 01 Jan 1970 00:00:00 +0000 |
+
parents |
|
@@ -118,8 +119,7 @@
[+]
[-]
-
-
+
a |
1 |
@@ -369,7 +369,8 @@
|
date |
- Thu, 01 Jan 1970 00:00:00 +0000 |
+ Thu, 01 Jan 1970 00:00:00 +0000 |
+
parents |
|
@@ -390,8 +391,7 @@
[+]
[-]
-
-
+
a |
1 |
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-hgweb-empty.t
--- a/tests/test-hgweb-empty.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-hgweb-empty.t Thu Mar 05 15:52:07 2015 -0600
@@ -48,7 +48,6 @@
-
+
age |
author |
description |
+
@@ -158,7 +159,6 @@
-
+
age |
author |
description |
+
@@ -264,7 +266,6 @@
-
@@ -431,11 +432,13 @@
+
name |
size |
permissions |
+
[up] |
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-hgweb-filelog.t
--- a/tests/test-hgweb-filelog.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-hgweb-filelog.t Thu Mar 05 15:52:07 2015 -0600
@@ -156,7 +156,6 @@
-
+
age |
author |
description |
+
Thu, 01 Jan 1970 00:00:00 +0000 |
@@ -266,7 +267,6 @@
-
+
age |
author |
description |
+
Thu, 01 Jan 1970 00:00:00 +0000 |
@@ -376,7 +378,6 @@
-
+
age |
author |
description |
+
Thu, 01 Jan 1970 00:00:00 +0000 |
@@ -481,7 +484,6 @@
-
+
age |
author |
description |
+
Thu, 01 Jan 1970 00:00:00 +0000 |
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-hgweb-removed.t
--- a/tests/test-hgweb-removed.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-hgweb-removed.t Thu Mar 05 15:52:07 2015 -0600
@@ -78,7 +78,8 @@
date |
- Thu, 01 Jan 1970 00:00:00 +0000 |
+ Thu, 01 Jan 1970 00:00:00 +0000 |
+
parents |
cb9a9f314b8b |
@@ -99,8 +100,7 @@
[+]
[-]
-
-
+
a |
1 |
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-hgweb.t
--- a/tests/test-hgweb.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-hgweb.t Thu Mar 05 15:52:07 2015 -0600
@@ -272,11 +272,13 @@
+
name |
size |
permissions |
+
[up] |
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-hgwebdir.t
--- a/tests/test-hgwebdir.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-hgwebdir.t Thu Mar 05 15:52:07 2015 -0600
@@ -201,6 +201,7 @@
+
Name |
Description |
@@ -209,6 +210,7 @@
|
|
+
@@ -699,6 +701,7 @@
+
Name |
Description |
@@ -707,6 +710,7 @@
|
|
+
@@ -1128,6 +1132,7 @@
+
Name |
Description |
@@ -1136,6 +1141,7 @@
|
|
+
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-highlight.t
--- a/tests/test-highlight.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-highlight.t Thu Mar 05 15:52:07 2015 -0600
@@ -268,10 +268,12 @@
+
rev |
line source |
+
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-histedit-arguments.t
--- a/tests/test-histedit-arguments.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-histedit-arguments.t Thu Mar 05 15:52:07 2015 -0600
@@ -103,6 +103,15 @@
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg up --quiet
+Test config specified default
+-----------------------------
+
+ $ HGEDITOR=cat hg histedit --config "histedit.defaultrev=only(.) - ::eb57da33312f" --commands - << EOF
+ > pick c8e68270e35a 3 four
+ > pick 08d98a8350f3 4 five
+ > EOF
+ 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
+
Run on a revision not descendants of the initial parent
--------------------------------------------------------------------
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-histedit-drop.t
--- a/tests/test-histedit-drop.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-histedit-drop.t Thu Mar 05 15:52:07 2015 -0600
@@ -96,7 +96,6 @@
Check histedit_source
$ hg log --debug --rev f518305ce889
- invalid branchheads cache (visible): tip differs
changeset: 4:f518305ce889c07cb5bd05522176d75590ef3324
tag: tip
phase: draft
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-histedit-edit.t
--- a/tests/test-histedit-edit.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-histedit-edit.t Thu Mar 05 15:52:07 2015 -0600
@@ -3,13 +3,14 @@
$ cat >> $HGRCPATH < [extensions]
> histedit=
+ > strip=
> EOF
$ initrepo ()
> {
> hg init r
> cd r
- > for x in a b c d e f ; do
+ > for x in a b c d e f g; do
> echo $x > $x
> hg add $x
> hg ci -m $x
@@ -20,10 +21,15 @@
log before edit
$ hg log --graph
- @ changeset: 5:652413bf663e
+ @ changeset: 6:3c6a8ed2ebe8
| tag: tip
| user: test
| date: Thu Jan 01 00:00:00 1970 +0000
+ | summary: g
+ |
+ o changeset: 5:652413bf663e
+ | user: test
+ | date: Thu Jan 01 00:00:00 1970 +0000
| summary: f
|
o changeset: 4:e860deea161a
@@ -58,11 +64,19 @@
> pick 055a42cdd887 d
> edit e860deea161a e
> pick 652413bf663e f
+ > pick 3c6a8ed2ebe8 g
> EOF
- 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+ 0 files updated, 0 files merged, 3 files removed, 0 files unresolved
Make changes as needed, you may commit or record as needed now.
When you are finished, run hg histedit --continue to resume.
+edit the plan
+ $ hg histedit --edit-plan --commands - 2>&1 << EOF
+ > edit e860deea161a e
+ > pick 652413bf663e f
+ > drop 3c6a8ed2ebe8 g
+ > EOF
+
Go at a random point and try to continue
$ hg id -n
@@ -72,6 +86,11 @@
(use 'hg histedit --continue' or 'hg histedit --abort')
[255]
+Try to delete necessary commit
+ $ hg strip -r 652413bf663e
+ abort: histedit in progress, can't strip 363532343133
+ [255]
+
commit, then edit the revision
$ hg ci -m 'wat'
created new head
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-https.t
--- a/tests/test-https.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-https.t Thu Mar 05 15:52:07 2015 -0600
@@ -156,8 +156,8 @@
$ echo '[hooks]' >> .hg/hgrc
$ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc
$ hg pull $DISABLEOSXDUMMYCERT
+ pulling from https://localhost:$HGPORT/
warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
- pulling from https://localhost:$HGPORT/
searching for changes
adding changesets
adding manifests
@@ -188,28 +188,30 @@
searching for changes
no changes found
$ P=`pwd` hg -R copy-pull pull --insecure
+ pulling from https://localhost:$HGPORT/
warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
- pulling from https://localhost:$HGPORT/
searching for changes
no changes found
cacert mismatch
$ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/
+ pulling from https://127.0.0.1:$HGPORT/
abort: 127.0.0.1 certificate error: certificate is for localhost
(configure hostfingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca or use --insecure to connect insecurely)
[255]
$ hg -R copy-pull pull --config web.cacerts=pub.pem https://127.0.0.1:$HGPORT/ --insecure
+ pulling from https://127.0.0.1:$HGPORT/
warning: 127.0.0.1 certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
- pulling from https://127.0.0.1:$HGPORT/
searching for changes
no changes found
$ hg -R copy-pull pull --config web.cacerts=pub-other.pem
+ pulling from https://localhost:$HGPORT/
abort: error: *certificate verify failed* (glob)
[255]
$ hg -R copy-pull pull --config web.cacerts=pub-other.pem --insecure
+ pulling from https://localhost:$HGPORT/
warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
- pulling from https://localhost:$HGPORT/
searching for changes
no changes found
@@ -218,6 +220,7 @@
$ hg -R test serve -p $HGPORT1 -d --pid-file=hg1.pid --certificate=server-not-yet.pem
$ cat hg1.pid >> $DAEMON_PIDS
$ hg -R copy-pull pull --config web.cacerts=pub-not-yet.pem https://localhost:$HGPORT1/
+ pulling from https://localhost:$HGPORT1/
abort: error: *certificate verify failed* (glob)
[255]
@@ -226,6 +229,7 @@
$ hg -R test serve -p $HGPORT2 -d --pid-file=hg2.pid --certificate=server-expired.pem
$ cat hg2.pid >> $DAEMON_PIDS
$ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/
+ pulling from https://localhost:$HGPORT2/
abort: error: *certificate verify failed* (glob)
[255]
@@ -267,8 +271,8 @@
Test unvalidated https through proxy
$ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --insecure --traceback
+ pulling from https://localhost:$HGPORT/
warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting)
- pulling from https://localhost:$HGPORT/
searching for changes
no changes found
@@ -286,8 +290,10 @@
Test https with cert problems through proxy
$ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-other.pem
+ pulling from https://localhost:$HGPORT/
abort: error: *certificate verify failed* (glob)
[255]
$ http_proxy=http://localhost:$HGPORT1/ hg -R copy-pull pull --config web.cacerts=pub-expired.pem https://localhost:$HGPORT2/
+ pulling from https://localhost:$HGPORT2/
abort: error: *certificate verify failed* (glob)
[255]
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-largefiles-cache.t
--- a/tests/test-largefiles-cache.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-largefiles-cache.t Thu Mar 05 15:52:07 2015 -0600
@@ -136,7 +136,7 @@
#endif
Test issue 4053 (remove --after on a deleted, uncommitted file shouldn't say
-it is missing, but a remove on a nonexistant unknown file still should. Same
+it is missing, but a remove on a nonexistent unknown file still should. Same
for a forget.)
$ cd src
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-largefiles-misc.t
--- a/tests/test-largefiles-misc.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-largefiles-misc.t Thu Mar 05 15:52:07 2015 -0600
@@ -362,6 +362,14 @@
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg status -S
+ $ hg forget -v subrepo/large.txt
+ removing subrepo/large.txt (glob)
+
+Test reverting a forgotten file
+ $ hg revert -R subrepo subrepo/large.txt
+ $ hg status -SA subrepo/large.txt
+ C subrepo/large.txt
+
$ hg rm -v subrepo/large.txt
removing subrepo/large.txt (glob)
$ hg revert -R subrepo subrepo/large.txt
@@ -443,6 +451,10 @@
date: Thu Jan 01 00:00:00 1970 +0000
summary: anotherlarge
+ $ hg --debug log -T '{rev}: {desc}\n' ../sub/anotherlarge
+ updated patterns: ['../.hglf/sub/../sub/anotherlarge', '../sub/anotherlarge']
+ 1: anotherlarge
+
$ hg log -G anotherlarge
@ changeset: 1:9627a577c5e9
| tag: tip
@@ -450,6 +462,30 @@
| date: Thu Jan 01 00:00:00 1970 +0000
| summary: anotherlarge
|
+
+ $ hg log glob:another*
+ changeset: 1:9627a577c5e9
+ tag: tip
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: anotherlarge
+
+ $ hg --debug log -T '{rev}: {desc}\n' -G glob:another*
+ updated patterns: ['glob:../.hglf/sub/another*', 'glob:another*']
+ @ 1: anotherlarge
+ |
+
+#if no-msys
+ $ hg --debug log -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys
+ updated patterns: ['glob:../.hglf/sub/another*']
+ 1: anotherlarge
+
+ $ hg --debug log -G -T '{rev}: {desc}\n' 'glob:../.hglf/sub/another*' # no-msys
+ updated patterns: ['glob:../.hglf/sub/another*']
+ @ 1: anotherlarge
+ |
+#endif
+
$ echo more >> anotherlarge
$ hg st .
M anotherlarge
@@ -460,8 +496,33 @@
? sub/anotherlarge.orig
$ cd ..
+Test glob logging from the root dir
+ $ hg log glob:**another*
+ changeset: 1:9627a577c5e9
+ tag: tip
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: anotherlarge
+
+ $ hg log -G glob:**another*
+ @ changeset: 1:9627a577c5e9
+ | tag: tip
+ | user: test
+ | date: Thu Jan 01 00:00:00 1970 +0000
+ | summary: anotherlarge
+ |
+
$ cd ..
+Log from outer space
+ $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/sub/anotherlarge'
+ updated patterns: ['addrm2/.hglf/sub/anotherlarge', 'addrm2/sub/anotherlarge']
+ 1: anotherlarge
+ $ hg --debug log -R addrm2 -T '{rev}: {desc}\n' 'addrm2/.hglf/sub/anotherlarge'
+ updated patterns: ['addrm2/.hglf/sub/anotherlarge']
+ 1: anotherlarge
+
+
Check error message while exchange
=========================================================
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-largefiles.t
--- a/tests/test-largefiles.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-largefiles.t Thu Mar 05 15:52:07 2015 -0600
@@ -1183,12 +1183,12 @@
adding manifests
adding file changes
added 1 changesets with 2 changes to 2 files (+1 heads)
- 0 largefiles cached
rebasing 8:f574fb32bb45 "modify normal file largefile in repo d"
Invoking status precommit hook
M sub/normal4
M sub2/large6
saved backup bundle to $TESTTMP/d/.hg/strip-backup/f574fb32bb45-dd1d9f80-backup.hg (glob)
+ 0 largefiles cached
$ [ -f .hg/largefiles/e166e74c7303192238d60af5a9c4ce9bef0b7928 ]
$ hg log --template '{rev}:{node|short} {desc|firstline}\n'
9:598410d3eb9a modify normal file largefile in repo d
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-log.t
--- a/tests/test-log.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-log.t Thu Mar 05 15:52:07 2015 -0600
@@ -46,18 +46,31 @@
$ hg ci -me -d '5 0'
Make sure largefiles doesn't interfere with logging a regular file
- $ hg log a --config extensions.largefiles=
- changeset: 0:9161b9aeaf16
- user: test
- date: Thu Jan 01 00:00:01 1970 +0000
- summary: a
-
+ $ hg --debug log a -T '{rev}: {desc}\n' --config extensions.largefiles=
+ updated patterns: ['.hglf/a', 'a']
+ 0: a
$ hg log a
changeset: 0:9161b9aeaf16
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: a
+ $ hg log glob:a*
+ changeset: 3:2ca5ba701980
+ user: test
+ date: Thu Jan 01 00:00:04 1970 +0000
+ summary: d
+
+ changeset: 0:9161b9aeaf16
+ user: test
+ date: Thu Jan 01 00:00:01 1970 +0000
+ summary: a
+
+ $ hg --debug log glob:a* -T '{rev}: {desc}\n' --config extensions.largefiles=
+ updated patterns: ['glob:.hglf/a*', 'glob:a*']
+ 3: d
+ 0: a
+
log on directory
$ hg log dir
@@ -631,7 +644,7 @@
-log -f -r 1:tip
+log -f -r '1 + 4'
$ hg up -C 0
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
@@ -639,25 +652,24 @@
$ hg ci -Amb2 -d '1 0'
adding b2
created new head
- $ hg log -f -r 1:tip
+ $ hg log -f -r '1 + 4'
+ changeset: 4:ddb82e70d1a1
+ tag: tip
+ parent: 0:67e992f2c4f3
+ user: test
+ date: Thu Jan 01 00:00:01 1970 +0000
+ summary: b2
+
changeset: 1:3d5bf5654eda
user: test
date: Thu Jan 01 00:00:01 1970 +0000
summary: r1
- changeset: 2:60c670bf5b30
+ changeset: 0:67e992f2c4f3
user: test
date: Thu Jan 01 00:00:01 1970 +0000
- summary: r2
+ summary: base
- changeset: 3:e62f78d544b4
- parent: 1:3d5bf5654eda
- user: test
- date: Thu Jan 01 00:00:01 1970 +0000
- summary: b1
-
-
-
log -f -r null
$ hg log -f -r null
@@ -672,10 +684,17 @@
+log -f with null parent
+
+ $ hg up -C null
+ 0 files updated, 0 files merged, 2 files removed, 0 files unresolved
+ $ hg log -f
+
+
log -r . with two parents
$ hg up -C 3
- 2 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg merge tip
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
(branch merge, don't forget to commit)
@@ -1339,6 +1358,11 @@
date: Thu Jan 01 00:00:00 1970 +0000
summary: add foo, related
+ changeset: 2:c4c64aedf0f7
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: add unrelated old foo
+
$ cd ..
Issue2383: hg log showing _less_ differences than hg diff
@@ -1652,7 +1676,7 @@
|
o a
-Ensure that largefiles doesn't intefere with following a normal file
+Ensure that largefiles doesn't interfere with following a normal file
$ hg --config extensions.largefiles= log -f d -T '{desc}' -G
@ c
|
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-merge-tools.t
--- a/tests/test-merge-tools.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-merge-tools.t Thu Mar 05 15:52:07 2015 -0600
@@ -603,7 +603,8 @@
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg debugsetparent 0
+ $ hg update -q 0
+ $ hg revert -q -r 1 .
$ hg update -r 2
merging f
revision 1
@@ -628,7 +629,8 @@
true.priority=1
true.executable=cat
# hg update -C 1
- $ hg debugsetparent 0
+ $ hg update -q 0
+ $ hg revert -q -r 1 .
$ hg update -r 2 --tool false
merging f
merging f failed!
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-obsolete-tag-cache.t
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-obsolete-tag-cache.t Thu Mar 05 15:52:07 2015 -0600
@@ -0,0 +1,70 @@
+ $ cat >> $HGRCPATH << EOF
+ > [extensions]
+ > rebase=
+ >
+ > [experimental]
+ > evolution = createmarkers
+ > EOF
+
+Create a repo with some tags
+
+ $ hg init repo
+ $ cd repo
+ $ echo initial > foo
+ $ hg -q commit -A -m initial
+ $ hg tag -m 'test tag' test1
+ $ echo first > first
+ $ hg -q commit -A -m first
+ $ hg tag -m 'test2 tag' test2
+ $ hg -q up -r 0
+ $ echo newhead > newhead
+ $ hg commit -A -m newhead
+ adding newhead
+ created new head
+
+Trigger tags cache population by doing something that accesses tags info
+
+ $ hg log -G -T '{rev}:{node|short} {tags} {desc}\n'
+ @ 4:042eb6bfcc49 tip newhead
+ |
+ | o 3:c3cb30f2d2cd test2 tag
+ | |
+ | o 2:d75775ffbc6b test2 first
+ | |
+ | o 1:5f97d42da03f test tag
+ |/
+ o 0:55482a6fb4b1 test1 initial
+
+
+ $ cat .hg/cache/tags
+ 4 042eb6bfcc4909bad84a1cbf6eb1ddf0ab587d41
+ 3 c3cb30f2d2cd0aae008cc91a07876e3c5131fd22 b3bce87817fe7ac9dca2834366c1d7534c095cf1
+
+ 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
+ d75775ffbc6bca1794d300f5571272879bd280da test2
+
+Create some hidden changesets via a rebase and trigger tags cache
+repopulation
+
+ $ hg -q rebase -s 1 -d 4
+ $ hg log -G -T '{rev}:{node|short} {tags} {desc}\n'
+ o 7:eb610439e10e tip test2 tag
+ |
+ o 6:7b4af00c3c83 first
+ |
+ o 5:43ac2a539b3c test tag
+ |
+ @ 4:042eb6bfcc49 newhead
+ |
+ o 0:55482a6fb4b1 test1 initial
+
+
+.hgtags filenodes for hidden heads should be visible (issue4550)
+(currently broken)
+
+ $ cat .hg/cache/tags
+ 7 eb610439e10e0c6b296f97b59624c2e24fc59e30 b3bce87817fe7ac9dca2834366c1d7534c095cf1
+
+ 55482a6fb4b1881fa8f746fd52cf6f096bb21c89 test1
+ d75775ffbc6bca1794d300f5571272879bd280da test2
+
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-obsolete.t
--- a/tests/test-obsolete.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-obsolete.t Thu Mar 05 15:52:07 2015 -0600
@@ -11,7 +11,7 @@
> hg ci -m "add $1"
> }
$ getid() {
- > hg id --debug --hidden -ir "desc('$1')"
+ > hg log -T "{node}\n" --hidden -r "desc('$1')"
> }
$ cat > debugkeys.py < foo
+ $ hg add foo
+ $ hg ci -m "content-0"
+
+ $ hg up null
+ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ $ echo "1" > bar
+ $ hg add bar
+ $ hg ci -m "content-1"
+ created new head
+ $ hg up 0
+ 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ $ hg graft 1
+ grafting 1:1c9eddb02162 "content-1" (tip)
+
+ $ hg debugobsolete `hg log -r1 -T'{node}'` `hg log -r2 -T'{node}'`
+
+ $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
+ $ cat hg.pid >> $DAEMON_PIDS
+
+ $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'rev/1'
+ 404 Not Found
+ [1]
+ $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'file/tip/bar'
+ 200 Script output follows
+ $ "$TESTDIR/get-with-headers.py" --headeronly localhost:$HGPORT 'annotate/tip/bar'
+ 200 Script output follows
+
+ $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
+
+#endif
+
+ $ hg init a
+ $ cd a
+ $ touch foo
+ $ hg add foo
+ $ hg ci -mfoo
+ $ touch bar
+ $ hg add bar
+ $ hg ci -mbar
+ $ hg up 0
+ 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ $ touch quux
+ $ hg add quux
+ $ hg ci -m quux
+ created new head
+ $ hg up 1
+ 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ $ hg tag 1.0
+
+ $ hg up 2
+ 1 files updated, 0 files merged, 2 files removed, 0 files unresolved
+ $ hg log -G
+ o 3:bc47fc7e1c1d (draft) [tip ] Added tag 1.0 for changeset 50c889141114
+ |
+ | @ 2:3d7f255a0081 (draft) [ ] quux
+ | |
+ o | 1:50c889141114 (draft) [1.0 ] bar
+ |/
+ o 0:1f7b0de80e11 (draft) [ ] foo
+
+ $ hg debugobsolete `getid bar`
+ $ hg debugobsolete `getid 1.0`
+ $ hg tag 1.0
+ $ hg log -G
+ @ 4:f9f2ab71ffd5 (draft) [tip ] Added tag 1.0 for changeset 3d7f255a0081
+ |
+ o 2:3d7f255a0081 (draft) [1.0 ] quux
+ |
+ o 0:1f7b0de80e11 (draft) [ ] foo
+
+ $ cat .hgtags
+ 3d7f255a008103380aeb2a7d581fe257f40969e7 1.0
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-pull.t
--- a/tests/test-pull.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-pull.t Thu Mar 05 15:52:07 2015 -0600
@@ -76,7 +76,7 @@
abort: file:// URLs can only refer to localhost
[255]
- $ hg pull -q file:../test
+ $ hg pull -q file:../test # no-msys
It's tricky to make file:// URLs working on every platform with
regular shell commands.
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-rebase-pull.t
--- a/tests/test-rebase-pull.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-rebase-pull.t Thu Mar 05 15:52:07 2015 -0600
@@ -165,5 +165,47 @@
|
o 0: 'C1'
+pull --rebase works with bundle2 turned on
-
+ $ cd ../a
+ $ echo R4 > R4
+ $ hg ci -Am R4
+ adding R4
+ $ hg tglog
+ @ 5: 'R4'
+ |
+ o 4: 'R3'
+ |
+ o 3: 'R2'
+ |
+ o 2: 'R1'
+ |
+ o 1: 'C2'
+ |
+ o 0: 'C1'
+
+ $ cd ../c
+ $ hg pull --rebase --config experimental.bundle2-exp=True --config experimental.strip-bundle2-version=02
+ pulling from $TESTTMP/a (glob)
+ searching for changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 1 changes to 1 files (+1 heads)
+ rebasing 5:518d153c0ba3 "L1"
+ saved backup bundle to $TESTTMP/c/.hg/strip-backup/518d153c0ba3-73407f14-backup.hg (glob)
+ $ hg tglog
+ @ 6: 'L1'
+ |
+ o 5: 'R4'
+ |
+ o 4: 'R3'
+ |
+ o 3: 'R2'
+ |
+ o 2: 'R1'
+ |
+ o 1: 'C2'
+ |
+ o 0: 'C1'
+
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-rename.t
--- a/tests/test-rename.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-rename.t Thu Mar 05 15:52:07 2015 -0600
@@ -620,10 +620,16 @@
$ hg rename d1/d11/a1 .hg
abort: path contains illegal component: .hg/a1 (glob)
[255]
+ $ hg --config extensions.largefiles= rename d1/d11/a1 .hg
+ abort: path contains illegal component: .hg/a1 (glob)
+ [255]
$ hg status -C
$ hg rename d1/d11/a1 ..
abort: ../a1 not under root '$TESTTMP' (glob)
[255]
+ $ hg --config extensions.largefiles= rename d1/d11/a1 ..
+ abort: ../a1 not under root '$TESTTMP' (glob)
+ [255]
$ hg status -C
$ mv d1/d11/a1 .hg
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-resolve.t
--- a/tests/test-resolve.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-resolve.t Thu Mar 05 15:52:07 2015 -0600
@@ -43,10 +43,15 @@
U file1
U file2
-resolving an unknown path should emit a warning
+ $ hg resolve -l --no-status
+ file1
+ file2
+
+resolving an unknown path should emit a warning, but not for -l
$ hg resolve -m does-not-exist
arguments do not match paths that need resolving
+ $ hg resolve -l does-not-exist
resolve the failure
@@ -59,6 +64,18 @@
R file1
U file2
+ $ hg resolve -l -Tjson
+ [
+ {
+ "path": "file1",
+ "status": "R"
+ },
+ {
+ "path": "file2",
+ "status": "U"
+ }
+ ]
+
resolve -m without paths should mark all resolved
$ hg resolve -m
@@ -69,6 +86,10 @@
$ hg resolve -l
+ $ hg resolve -l -Tjson
+ [
+ ]
+
resolve --all should abort when no merge in progress
$ hg resolve --all
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-revset.t
--- a/tests/test-revset.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-revset.t Thu Mar 05 15:52:07 2015 -0600
@@ -478,8 +478,36 @@
[255]
Test null revision
+ $ log '(null)'
+ -1
+ $ log '(null:0)'
+ -1
+ 0
+ $ log '(0:null)'
+ 0
+ -1
+ $ log 'null::0'
+ -1
+ 0
+ $ log 'null:tip - 0:'
+ -1
+ $ log 'null: and null::' | head -1
+ -1
+ $ log 'null: or 0:' | head -2
+ -1
+ 0
$ log 'ancestors(null)'
-1
+ $ log 'reverse(null:)' | tail -2
+ 0
+ -1
+ $ log 'first(null:)'
+ -1
+ $ log 'min(null:)'
+ -1
+ $ log 'tip:null and all()' | tail -2
+ 1
+ 0
$ log 'outgoing()'
8
@@ -1029,6 +1057,19 @@
('symbol', 'tip')
warning: failed to parse the declaration of revset alias "bad name": at 4: invalid token
9
+ $ echo 'strictreplacing($1, $10) = $10 or desc("$1")' >> .hg/hgrc
+ $ try 'strictreplacing("foo", tip)'
+ (func
+ ('symbol', 'strictreplacing')
+ (list
+ ('string', 'foo')
+ ('symbol', 'tip')))
+ (or
+ ('symbol', 'tip')
+ (func
+ ('symbol', 'desc')
+ ('string', '$1')))
+ 9
$ try 'd(2:5)'
(func
@@ -1114,6 +1155,62 @@
3
2
+issue4553: check that revset aliases override existing hash prefix
+
+ $ hg log -qr e
+ 6:e0cc66ef77e8
+
+ $ hg log -qr e --config revsetalias.e="all()"
+ 0:2785f51eece5
+ 1:d75937da8da0
+ 2:5ed5505e9f1c
+ 3:8528aa5637f2
+ 4:2326846efdab
+ 5:904fa392b941
+ 6:e0cc66ef77e8
+ 7:013af1973af4
+ 8:d5d0dcbdc4d9
+ 9:24286f4ae135
+
+ $ hg log -qr e: --config revsetalias.e="0"
+ 0:2785f51eece5
+ 1:d75937da8da0
+ 2:5ed5505e9f1c
+ 3:8528aa5637f2
+ 4:2326846efdab
+ 5:904fa392b941
+ 6:e0cc66ef77e8
+ 7:013af1973af4
+ 8:d5d0dcbdc4d9
+ 9:24286f4ae135
+
+ $ hg log -qr :e --config revsetalias.e="9"
+ 0:2785f51eece5
+ 1:d75937da8da0
+ 2:5ed5505e9f1c
+ 3:8528aa5637f2
+ 4:2326846efdab
+ 5:904fa392b941
+ 6:e0cc66ef77e8
+ 7:013af1973af4
+ 8:d5d0dcbdc4d9
+ 9:24286f4ae135
+
+ $ hg log -qr e:
+ 6:e0cc66ef77e8
+ 7:013af1973af4
+ 8:d5d0dcbdc4d9
+ 9:24286f4ae135
+
+ $ hg log -qr :e
+ 0:2785f51eece5
+ 1:d75937da8da0
+ 2:5ed5505e9f1c
+ 3:8528aa5637f2
+ 4:2326846efdab
+ 5:904fa392b941
+ 6:e0cc66ef77e8
+
issue2549 - correct optimizations
$ log 'limit(1 or 2 or 3, 2) and not 2'
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-ssh.t
--- a/tests/test-ssh.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-ssh.t Thu Mar 05 15:52:07 2015 -0600
@@ -116,6 +116,14 @@
searching for changes
no changes found
+pull from wrong ssh URL
+
+ $ hg pull -e "python \"$TESTDIR/dummyssh\"" ssh://user@dummy/doesnotexist
+ pulling from ssh://user@dummy/doesnotexist
+ remote: abort: there is no Mercurial repository here (.hg not found)!
+ abort: no suitable response from remote hg!
+ [255]
+
local change
$ echo bleah > foo
@@ -446,6 +454,7 @@
Got arguments 1:user@dummy 2:hg -R local-stream serve --stdio
Got arguments 1:user@dummy 2:hg -R remote serve --stdio
Got arguments 1:user@dummy 2:hg -R remote serve --stdio
+ Got arguments 1:user@dummy 2:hg -R doesnotexist serve --stdio
Got arguments 1:user@dummy 2:hg -R remote serve --stdio
Got arguments 1:user@dummy 2:hg -R local serve --stdio
Got arguments 1:user@dummy 2:hg -R $TESTTMP/local serve --stdio
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-status-color.t
--- a/tests/test-status-color.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-status-color.t Thu Mar 05 15:52:07 2015 -0600
@@ -338,8 +338,8 @@
hg resolve with one unresolved, one resolved:
$ hg resolve --color=always -l
- \x1b[0;31;1mU a\x1b[0m (esc)
- \x1b[0;32;1mR b\x1b[0m (esc)
+ \x1b[0;31;1mU \x1b[0m\x1b[0;31;1ma\x1b[0m (esc)
+ \x1b[0;32;1mR \x1b[0m\x1b[0;32;1mb\x1b[0m (esc)
color coding of error message with current availability of curses
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-strip.t
--- a/tests/test-strip.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-strip.t Thu Mar 05 15:52:07 2015 -0600
@@ -220,8 +220,69 @@
Stream params: {}
b2x:changegroup -- "{'version': '02'}"
264128213d290d868c54642d13aeaa3675551a78
+ $ hg incoming .hg/strip-backup/*
+ comparing with .hg/strip-backup/264128213d29-0b39d6bf-backup.hg
+ searching for changes
+ changeset: 4:264128213d29
+ tag: tip
+ parent: 1:ef3a871183d7
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: c
+
$ restore
-
+ $ hg up -C 4
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ $ hg --config experimental.bundle2-exp=True --config experimental.strip-bundle2-version=02 --traceback strip 4
+ 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+ saved backup bundle to $TESTTMP/test/.hg/strip-backup/264128213d29-0b39d6bf-backup.hg (glob)
+ $ hg parents
+ changeset: 1:ef3a871183d7
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: b
+
+ $ hg debugbundle .hg/strip-backup/*
+ Stream params: {}
+ b2x:changegroup -- "{'version': '02'}"
+ 264128213d290d868c54642d13aeaa3675551a78
+ $ hg pull .hg/strip-backup/*
+ pulling from .hg/strip-backup/264128213d29-0b39d6bf-backup.hg
+ searching for changes
+ adding changesets
+ adding manifests
+ adding file changes
+ added 1 changesets with 0 changes to 0 files (+1 heads)
+ (run 'hg heads' to see heads, 'hg merge' to merge)
+ $ rm .hg/strip-backup/*
+ $ hg log --graph
+ o changeset: 4:264128213d29
+ | tag: tip
+ | parent: 1:ef3a871183d7
+ | user: test
+ | date: Thu Jan 01 00:00:00 1970 +0000
+ | summary: c
+ |
+ | o changeset: 3:443431ffac4f
+ | | user: test
+ | | date: Thu Jan 01 00:00:00 1970 +0000
+ | | summary: e
+ | |
+ | o changeset: 2:65bd5f99a4a3
+ |/ user: test
+ | date: Thu Jan 01 00:00:00 1970 +0000
+ | summary: d
+ |
+ @ changeset: 1:ef3a871183d7
+ | user: test
+ | date: Thu Jan 01 00:00:00 1970 +0000
+ | summary: b
+ |
+ o changeset: 0:9ab35a2d17cb
+ user: test
+ date: Thu Jan 01 00:00:00 1970 +0000
+ summary: a
+
$ hg up -C 2
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ hg merge 4
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-subrepo-deep-nested-change.t
--- a/tests/test-subrepo-deep-nested-change.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-subrepo-deep-nested-change.t Thu Mar 05 15:52:07 2015 -0600
@@ -46,12 +46,29 @@
Clone main
- $ hg clone main cloned
+ $ hg --config extensions.largefiles= clone main cloned
updating to branch default
cloning subrepo sub1 from $TESTTMP/sub1
cloning subrepo sub1/sub2 from $TESTTMP/sub2 (glob)
3 files updated, 0 files merged, 0 files removed, 0 files unresolved
+Largefiles is NOT enabled in the clone if the source repo doesn't require it
+ $ cat cloned/.hg/hgrc
+ # example repository config (see "hg help config" for more info)
+ [paths]
+ default = $TESTTMP/main (glob)
+
+ # path aliases to other clones of this repo in URLs or filesystem paths
+ # (see "hg help config.paths" for more info)
+ #
+ # default-push = ssh://jdoe@example.net/hg/jdoes-fork
+ # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
+ # my-clone = /home/jdoe/jdoes-clone
+
+ [ui]
+ # name and email (local to this repository, optional), e.g.
+ # username = Jane Doe
+
Checking cloned repo ids
$ printf "cloned " ; hg id -R cloned
@@ -319,6 +336,31 @@
../archive_lf/sub1/sub2/large.bin
$ rm -rf ../archive_lf
+The local repo enables largefiles if a largefiles repo is cloned
+ $ hg showconfig extensions
+ abort: repository requires features unknown to this Mercurial: largefiles!
+ (see http://mercurial.selenic.com/wiki/MissingRequirement for more information)
+ [255]
+ $ hg --config extensions.largefiles= clone -qU . ../lfclone
+ $ cat ../lfclone/.hg/hgrc
+ # example repository config (see "hg help config" for more info)
+ [paths]
+ default = $TESTTMP/cloned (glob)
+
+ # path aliases to other clones of this repo in URLs or filesystem paths
+ # (see "hg help config.paths" for more info)
+ #
+ # default-push = ssh://jdoe@example.net/hg/jdoes-fork
+ # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
+ # my-clone = /home/jdoe/jdoes-clone
+
+ [ui]
+ # name and email (local to this repository, optional), e.g.
+ # username = Jane Doe
+
+ [extensions]
+ largefiles=
+
Find an exact match to a standin (should archive nothing)
$ hg --config extensions.largefiles= archive -S -I 'sub/sub2/.hglf/large.bin' ../archive_lf
$ find ../archive_lf 2> /dev/null | sort
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-subrepo-git.t
--- a/tests/test-subrepo-git.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-subrepo-git.t Thu Mar 05 15:52:07 2015 -0600
@@ -134,6 +134,7 @@
$ hg status --subrepos
? s/f
$ hg add .
+ adding f
$ git add f
$ cd ..
@@ -802,4 +803,197 @@
$ hg status --subrepos
? s/barfoo
+show file at specific revision
+ $ cat > s/foobar << EOF
+ > woop woop
+ > fooo bar
+ > EOF
+ $ hg commit --subrepos -m "updated foobar"
+ committing subrepository s
+ $ cat > s/foobar << EOF
+ > current foobar
+ > (should not be visible using hg cat)
+ > EOF
+
+ $ hg cat -r . s/foobar
+ woop woop
+ fooo bar (no-eol)
+ $ hg cat -r "parents(.)" s/foobar > catparents
+
+ $ mkdir -p tmp/s
+
+ $ hg cat -r "parents(.)" --output tmp/%% s/foobar
+ $ diff tmp/% catparents
+
+ $ hg cat -r "parents(.)" --output tmp/%s s/foobar
+ $ diff tmp/foobar catparents
+
+ $ hg cat -r "parents(.)" --output tmp/%d/otherfoobar s/foobar
+ $ diff tmp/s/otherfoobar catparents
+
+ $ hg cat -r "parents(.)" --output tmp/%p s/foobar
+ $ diff tmp/s/foobar catparents
+
+ $ hg cat -r "parents(.)" --output tmp/%H s/foobar
+ $ diff tmp/255ee8cf690ec86e99b1e80147ea93ece117cd9d catparents
+
+ $ hg cat -r "parents(.)" --output tmp/%R s/foobar
+ $ diff tmp/10 catparents
+
+ $ hg cat -r "parents(.)" --output tmp/%h s/foobar
+ $ diff tmp/255ee8cf690e catparents
+
+ $ rm tmp/10
+ $ hg cat -r "parents(.)" --output tmp/%r s/foobar
+ $ diff tmp/10 catparents
+
+ $ mkdir tmp/tc
+ $ hg cat -r "parents(.)" --output tmp/%b/foobar s/foobar
+ $ diff tmp/tc/foobar catparents
+
+cleanup
+ $ rm -r tmp
+ $ rm catparents
+
+add git files, using either files or patterns
+ $ echo "hsss! hsssssssh!" > s/snake.python
+ $ echo "ccc" > s/c.c
+ $ echo "cpp" > s/cpp.cpp
+
+ $ hg add s/snake.python s/c.c s/cpp.cpp
+ $ hg st --subrepos s
+ M s/foobar
+ A s/c.c
+ A s/cpp.cpp
+ A s/snake.python
+ ? s/barfoo
+ $ hg revert s
+ reverting subrepo ../gitroot
+
+ $ hg add --subrepos "glob:**.python"
+ adding s/snake.python (glob)
+ $ hg st --subrepos s
+ A s/snake.python
+ ? s/barfoo
+ ? s/c.c
+ ? s/cpp.cpp
+ ? s/foobar.orig
+ $ hg revert s
+ reverting subrepo ../gitroot
+
+ $ hg add --subrepos s
+ adding s/barfoo (glob)
+ adding s/c.c (glob)
+ adding s/cpp.cpp (glob)
+ adding s/foobar.orig (glob)
+ adding s/snake.python (glob)
+ $ hg st --subrepos s
+ A s/barfoo
+ A s/c.c
+ A s/cpp.cpp
+ A s/foobar.orig
+ A s/snake.python
+ $ hg revert s
+ reverting subrepo ../gitroot
+make sure everything is reverted correctly
+ $ hg st --subrepos s
+ ? s/barfoo
+ ? s/c.c
+ ? s/cpp.cpp
+ ? s/foobar.orig
+ ? s/snake.python
+
+ $ hg add --subrepos --exclude "path:s/c.c"
+ adding s/barfoo (glob)
+ adding s/cpp.cpp (glob)
+ adding s/foobar.orig (glob)
+ adding s/snake.python (glob)
+ $ hg st --subrepos s
+ A s/barfoo
+ A s/cpp.cpp
+ A s/foobar.orig
+ A s/snake.python
+ ? s/c.c
+ $ hg revert --all -q
+
+.hgignore should not have influence in subrepos
+ $ cat > .hgignore << EOF
+ > syntax: glob
+ > *.python
+ > EOF
+ $ hg add .hgignore
+ $ hg add --subrepos "glob:**.python" s/barfoo
+ adding s/snake.python (glob)
+ $ hg st --subrepos s
+ A s/barfoo
+ A s/snake.python
+ ? s/c.c
+ ? s/cpp.cpp
+ ? s/foobar.orig
+ $ hg revert --all -q
+
+.gitignore should have influence,
+except for explicitly added files (no patterns)
+ $ cat > s/.gitignore << EOF
+ > *.python
+ > EOF
+ $ hg add s/.gitignore
+ $ hg st --subrepos s
+ A s/.gitignore
+ ? s/barfoo
+ ? s/c.c
+ ? s/cpp.cpp
+ ? s/foobar.orig
+ $ hg add --subrepos "glob:**.python"
+ $ hg st --subrepos s
+ A s/.gitignore
+ ? s/barfoo
+ ? s/c.c
+ ? s/cpp.cpp
+ ? s/foobar.orig
+ $ hg add --subrepos s/snake.python
+ $ hg st --subrepos s
+ A s/.gitignore
+ A s/snake.python
+ ? s/barfoo
+ ? s/c.c
+ ? s/cpp.cpp
+ ? s/foobar.orig
+
+correctly do a dry run
+ $ hg add --subrepos s --dry-run
+ adding s/barfoo (glob)
+ adding s/c.c (glob)
+ adding s/cpp.cpp (glob)
+ adding s/foobar.orig (glob)
+ $ hg st --subrepos s
+ A s/.gitignore
+ A s/snake.python
+ ? s/barfoo
+ ? s/c.c
+ ? s/cpp.cpp
+ ? s/foobar.orig
+
+error given when adding an already tracked file
+ $ hg add s/.gitignore
+ s/.gitignore already tracked!
+ [1]
+
+removed files can be re-added
+ $ hg ci --subrepos -m 'snake'
+ committing subrepository s
+ $ cd s
+ $ git rm snake.python
+ rm 'snake.python'
+ $ touch snake.python
$ cd ..
+ $ hg add s/snake.python
+ $ hg status -S
+ M s/snake.python
+ ? .hgignore
+ ? s/barfoo
+ ? s/c.c
+ ? s/cpp.cpp
+ ? s/foobar.orig
+
+ $ cd ..
diff -r 3cc630be5f09 -r 4ef4e3c3c006 tests/test-subrepo.t
--- a/tests/test-subrepo.t Fri Mar 06 00:14:22 2015 +0900
+++ b/tests/test-subrepo.t Thu Mar 05 15:52:07 2015 -0600
@@ -50,9 +50,16 @@
Revert subrepo and test subrepo fileset keyword:
$ echo b > s/a
+ $ hg revert --dry-run "set:subrepo('glob:s*')"
+ reverting subrepo s
+ reverting s/a (glob)
+ $ cat s/a
+ b
$ hg revert "set:subrepo('glob:s*')"
reverting subrepo s
reverting s/a (glob)
+ $ cat s/a
+ a
$ rm s/a.orig
Revert subrepo with no backup. The "reverting s/a" line is gone since
| | | |