Commits

Matt Mackall committed 4438875 Merge

merge with stable

Comments (0)

Files changed (4)

   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.
 """
                 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':

mercurial/cmdutil.py

                     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 = []
 
             # 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)

tests/test-eol-tag.t

+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
   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
   +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
+  
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.