tests/test-issue322.t
author Erik Zielke <ez@aragost.com>
Mon, 31 Jan 2011 13:33:41 +0100
branchstable
changeset 13322 c19b9282d3a7
parent 12328 b63f6422d2a7
permissions -rw-r--r--
subrepo: make update -C clean the working directory for svn subrepos This makes 'hg update --clean' behave the same way for both kinds of subrepositories. Before Subversion subrepos did not take the clean parameter into account, but just updated to the given revision and merged uncommitted changes into that.

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'
  [255]

  $ 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
  [255]

  $ 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
  [255]