changeset 14024:92b768e9f80c

merge with stable
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 29 Apr 2011 11:10:11 +0200
parents f8e1dc896e5f (current diff) 2cd1520664b8 (diff)
children 4f19242dac6c 7e453770b364
files hgext/extdiff.py tests/test-extdiff.t tests/test-http-proxy.t
diffstat 4 files changed, 22 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/extdiff.py	Fri Apr 29 09:43:21 2011 +0200
+++ b/hgext/extdiff.py	Fri Apr 29 11:10:11 2011 +0200
@@ -100,7 +100,8 @@
             if 'x' in fctx.flags():
                 util.set_flags(dest, False, True)
         if node is None:
-            fns_and_mtime.append((dest, repo.wjoin(fn), os.path.getmtime(dest)))
+            fns_and_mtime.append((dest, repo.wjoin(fn),
+                                  os.lstat(dest).st_mtime))
     return dirname, fns_and_mtime
 
 def dodiff(ui, repo, diffcmd, diffopts, pats, opts):
@@ -222,7 +223,7 @@
         util.system(cmdline, cwd=tmproot)
 
         for copy_fn, working_fn, mtime in fns_and_mtime:
-            if os.path.getmtime(copy_fn) != mtime:
+            if os.lstat(copy_fn).st_mtime != mtime:
                 ui.debug('file changed while diffing. '
                          'Overwriting: %s (src: %s)\n' % (working_fn, copy_fn))
                 util.copyfile(copy_fn, working_fn)
--- a/tests/test-extdiff.t	Fri Apr 29 09:43:21 2011 +0200
+++ b/tests/test-extdiff.t	Fri Apr 29 11:10:11 2011 +0200
@@ -177,3 +177,20 @@
   $ hg extdif -p echo -r "0::1"
   */extdiff.*/a.8a5febb7f867/a a.34eed99112ab/a (glob)
   [1]
+
+  $ cd ..
+
+Test symlinks handling (issue1909)
+
+  $ hg init testsymlinks
+  $ cd testsymlinks
+  $ echo a > a
+  $ hg ci -Am adda
+  adding a
+  $ echo a >> a
+  $ ln -s missing linka
+  $ hg add linka
+  $ hg falabala -r 0 --traceback
+  diffing testsymlinks.07f494440405 testsymlinks
+  [1]
+  $ cd ..
--- a/tests/test-http-proxy.t	Fri Apr 29 09:43:21 2011 +0200
+++ b/tests/test-http-proxy.t	Fri Apr 29 11:10:11 2011 +0200
@@ -17,7 +17,7 @@
   $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --uncompressed http://localhost:$HGPORT/ b
   streaming all changes
   3 files to transfer, 303 bytes of data
-  transferred * bytes in * seconds (*B/sec) (glob)
+  transferred * bytes in * seconds (*/sec) (glob)
   updating to branch default
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cd b
--- a/tests/test-http.t	Fri Apr 29 09:43:21 2011 +0200
+++ b/tests/test-http.t	Fri Apr 29 11:10:11 2011 +0200
@@ -27,7 +27,7 @@
   $ hg clone --uncompressed http://localhost:$HGPORT/ copy 2>&1
   streaming all changes
   6 files to transfer, 606 bytes of data
-  transferred * bytes in * seconds (*B/sec) (glob)
+  transferred * bytes in * seconds (*/sec) (glob)
   updating to branch default
   4 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg verify -R copy