# HG changeset patch # User Matt Mackall # Date 1289840136 21600 # Node ID 4438875ec01bd0fc32be92b0872eb6daeed4d44f # Parent 062ae1aeb84d19b8b86ecf2989bee2b80dfed4b3# Parent 20974e51383ae93bb7cdf3ee3c649e68e397d59f merge with stable diff -r 062ae1aeb84d -r 4438875ec01b hgext/eol.py --- 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': diff -r 062ae1aeb84d -r 4438875ec01b mercurial/cmdutil.py --- 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) diff -r 062ae1aeb84d -r 4438875ec01b tests/test-eol-tag.t --- /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 < [diff] + > git = True + > + > [extensions] + > eol = + > + > [eol] + > native = CRLF + > EOF + +setup repository + + $ hg init repo + $ cd repo + $ cat > .hgeol < [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 diff -r 062ae1aeb84d -r 4438875ec01b tests/test-log.t --- 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 +