Mercurial > hg-stable
changeset 12987:4438875ec01b stable 1.7.1
merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 15 Nov 2010 10:55:36 -0600 |
parents | 062ae1aeb84d (current diff) 20974e51383a (diff) |
children | 83841063e0c3 |
files | |
diffstat | 4 files changed, 89 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/eol.py Sun Nov 14 23:28:44 2010 -0200 +++ b/hgext/eol.py Mon Nov 15 10:55:36 2010 -0600 @@ -61,6 +61,11 @@ Such files are normally not touched under the assumption that they have mixed EOLs on purpose. +The ``win32text.forbid*`` hooks provided by the win32text extension +have been unified into a single hook named ``eol.hook``. The hook will +lookup the expected line endings from the ``.hgeol`` file, which means +you must migrate to a ``.hgeol`` file first before using the hook. + See :hg:`help patterns` for more information about the glob patterns used. """ @@ -176,6 +181,10 @@ self._decode['NATIVE'] = 'to-crlf' eol = config.config() + # Our files should not be touched. The pattern must be + # inserted first override a '** = native' pattern. + eol.set('patterns', '.hg*', 'BIN') + # We can then parse the user's patterns. eol.parse('.hgeol', data) if eol.get('repository', 'native') == 'CRLF':
--- a/mercurial/cmdutil.py Sun Nov 14 23:28:44 2010 -0200 +++ b/mercurial/cmdutil.py Mon Nov 15 10:55:36 2010 -0600 @@ -1138,7 +1138,7 @@ continue # only yield rev for which we have the changelog, it can # happen while doing "hg log" during a pull or commit - if linkrev > maxrev or linkrev >= cl_count: + if linkrev >= cl_count: break parentlinkrevs = [] @@ -1180,11 +1180,20 @@ # iterate from latest to oldest revision for rev, flparentlinkrevs, copied in filerevgen(filelog, last): - if rev not in ancestors: - continue - # XXX insert 1327 fix here - if flparentlinkrevs: - ancestors.update(flparentlinkrevs) + if not follow: + if rev > maxrev: + continue + else: + # Note that last might not be the first interesting + # rev to us: + # if the file has been changed after maxrev, we'll + # have linkrev(last) > maxrev, and we still need + # to explore the file graph + if rev not in ancestors: + continue + # XXX insert 1327 fix here + if flparentlinkrevs: + ancestors.update(flparentlinkrevs) fncache.setdefault(rev, []).append(file_) wanted.add(rev)
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-eol-tag.t Mon Nov 15 10:55:36 2010 -0600 @@ -0,0 +1,40 @@ +http://mercurial.selenic.com/bts/issue2493 + +Testing tagging with the EOL extension + + $ cat > $HGRCPATH <<EOF + > [diff] + > git = True + > + > [extensions] + > eol = + > + > [eol] + > native = CRLF + > EOF + +setup repository + + $ hg init repo + $ cd repo + $ cat > .hgeol <<EOF + > [patterns] + > ** = native + > EOF + $ printf "first\r\nsecond\r\nthird\r\n" > a.txt + $ hg commit --addremove -m 'checkin' + adding .hgeol + adding a.txt + +Tag: + + $ hg tag 1.0 + +Rewrite .hgtags file as it would look on a new checkout: + + $ hg update -q null + $ hg update -q + +Touch .hgtags file again: + + $ hg tag 2.0
--- a/tests/test-log.t Sun Nov 14 23:28:44 2010 -0200 +++ b/tests/test-log.t Mon Nov 15 10:55:36 2010 -0600 @@ -1020,6 +1020,15 @@ summary: add foo, related +Also check when maxrev < lastrevfilelog + + $ hg --traceback log -f -r4 foo + changeset: 4:88176d361b69 + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: add foo, related + + Issue2383: hg log showing _less_ differences than hg diff $ hg init issue2383 @@ -1092,3 +1101,19 @@ +b $ cd .. + +'hg log -r rev fn' when last(filelog(fn)) != rev + + $ hg init simplelog; cd simplelog + $ echo f > a + $ hg ci -Am'a' -d '0 0' + adding a + $ echo f >> a + $ hg ci -Am'a bis' -d '1 0' + + $ hg log -r0 a + changeset: 0:9f758d63dcde + user: test + date: Thu Jan 01 00:00:00 1970 +0000 + summary: a +