tests/test-issue322.t
author Radomir Dopieralski <sheep@stxnext.pl>
Tue, 15 Mar 2011 18:33:36 +0100
changeset 13661 ee349e228835
parent 12328 b63f6422d2a7
permissions -rw-r--r--
rebase: add -m/--message to rebase --collapse (issue2389) When collapsing changesets with rebase, you get a chance to edit the commit message manually, but there is no way to pass this message from the command line. This patch adds a `--message` (with short form `-m`) and `--logfile` (with short form `-m`) options to the rebase command. These options suppresses the generation of the default commit message, and instead use the message provided in the option (in case of `-m`) or in the file it points to (in case of `-l`). If you use this option without the `--collapse` option, it will raise an error. Options documentation edited by Patrick Mezard <pmezard@gmail.com>

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]