view tests/test-issue322.t @ 12282:9e457c3f47d9

mq: rename strip --nobackup option to --no-backup (issue2377) Same option name as for hg revert --no-backup. Deprecate strip --nobackup.
author Christian Ebert <blacktrash@gmx.net>
date Tue, 14 Sep 2010 22:11:53 +0200
parents ee41be2bbf5a
children 4134686b83e1
line wrap: on
line source

# http://mercurial.selenic.com/bts/issue322

File replaced with directory:

  $ hg init a
  $ cd a
  $ echo a > a
  $ hg commit -Ama
  adding a
  $ rm a
  $ mkdir a
  $ echo a > a/a

Should fail - would corrupt dirstate:

  $ hg add a/a
  abort: file 'a' in dirstate clashes with 'a/a'

  $ cd ..

Directory replaced with file:

  $ hg init c
  $ cd c
  $ mkdir a
  $ echo a > a/a
  $ hg commit -Ama
  adding a/a

  $ rm -r a
  $ echo a > a

Should fail - would corrupt dirstate:

  $ hg add a
  abort: directory 'a' already in dirstate

  $ cd ..

Directory replaced with file:

  $ hg init d
  $ cd d
  $ mkdir b
  $ mkdir b/c
  $ echo a > b/c/d
  $ hg commit -Ama
  adding b/c/d
  $ rm -r b
  $ echo a > b

Should fail - would corrupt dirstate:

  $ hg add b
  abort: directory 'b' already in dirstate

  $ exit 0