tests/test-status.t
branchstable
changeset 49553 557f7e243ac9
parent 49498 f2b1bc19ce90
child 49555 8ee3889bab92
equal deleted inserted replaced
49552:1994842955db 49553:557f7e243ac9
   942   $ hg status
   942   $ hg status
   943   ? subdir/unknown
   943   ? subdir/unknown
   944   $ hg debugdirstate --all --no-dates | grep '^ '
   944   $ hg debugdirstate --all --no-dates | grep '^ '
   945       0         -1 unset               subdir
   945       0         -1 unset               subdir
   946 
   946 
   947 Now the directory is eligible for caching, so its mtime is save in the dirstate
   947 Now the directory is eligible for caching, so its mtime is saved in the dirstate
   948 
   948 
   949   $ rm subdir/unknown
   949   $ rm subdir/unknown
   950   $ sleep 0.1 # ensure the kernel’s internal clock for mtimes has ticked
   950   $ sleep 0.1 # ensure the kernel’s internal clock for mtimes has ticked
   951   $ hg status
   951   $ hg status
   952   $ hg debugdirstate --all --no-dates | grep '^ '
   952   $ hg debugdirstate --all --no-dates | grep '^ '
   974   $ hg debugdirstate --all --no-dates | grep '^ '
   974   $ hg debugdirstate --all --no-dates | grep '^ '
   975       0         -1 unset               subdir
   975       0         -1 unset               subdir
   976   $ hg status
   976   $ hg status
   977   ? subdir/a
   977   ? subdir/a
   978 
   978 
       
   979 Changing the hgignore rules makes us recompute the status (and rewrite the dirstate).
       
   980 
       
   981   $ rm subdir/a
       
   982   $ mkdir another-subdir
       
   983   $ touch another-subdir/something-else
       
   984 
       
   985   $ cat > "$TESTDIR"/extra-hgignore <<EOF
       
   986   > something-else
       
   987   > EOF
       
   988 
       
   989   $ hg status --config ui.ignore.global="$TESTDIR"/extra-hgignore
       
   990   $ hg debugdirstate --all --no-dates | grep '^ '
       
   991       0         -1 set                 subdir
       
   992 
       
   993   $ hg status
       
   994   ? another-subdir/something-else
       
   995 
       
   996   $ hg debugdirstate --all --no-dates | grep '^ '
       
   997       0         -1 unset               subdir (known-bad-output !)
       
   998 
       
   999 For some reason the first [status] is not enough to save the updated
       
  1000 directory mtime into the cache. The second invocation does it.
       
  1001 The first call only clears the directory cache by marking the directories
       
  1002 as "outdated", which seems like a bug.
       
  1003 
       
  1004   $ hg status
       
  1005   ? another-subdir/something-else
       
  1006 
       
  1007   $ hg debugdirstate --all --no-dates | grep '^ '
       
  1008       0         -1 set                 subdir
       
  1009 
   979 #endif
  1010 #endif