tests/test-obsolete.t
author Pierre-Yves.David@ens-lyon.org
Thu, 07 Jun 2012 19:15:23 +0200
changeset 17071 11f26e2669aa
child 17074 178a2e85d426
permissions -rw-r--r--
command: creation of obsolete marker * add metadata encoding/decoding ability * add a method to obsstore to help creating marker * add a debug command to create marker


  $ mkcommit() {
  >    echo "$1" > "$1"
  >    hg add "$1"
  >    hg ci -m "add $1"
  > }
  $ getid() {
  >    hg id --debug -ir "desc('$1')"
  > }


  $ hg init tmpa
  $ cd tmpa

Killing a single changeset without replacement

  $ mkcommit kill_me
  $ hg debugobsolete -d '0 0' `getid kill_me` -u babar
  $ cd ..

Killing a single changeset with replacement

  $ hg init tmpb
  $ cd tmpb
  $ mkcommit a
  $ mkcommit b
  $ mkcommit original_c
  $ hg up "desc('b')"
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  $ mkcommit new_c
  created new head
  $ hg debugobsolete `getid original_c`  `getid new_c` -d '56 12'

do it again (it read the obsstore before adding new changeset)

  $ hg up '.^'
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  $ mkcommit new_2_c
  created new head
  $ hg debugobsolete -d '1337 0' `getid new_c` `getid new_2_c`

Register two markers with a missing node

  $ hg up '.^'
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
  $ mkcommit new_3_c
  created new head
  $ hg debugobsolete -d '1338 0' `getid new_2_c` 1337133713371337133713371337133713371337
  $ hg debugobsolete -d '1339 0' 1337133713371337133713371337133713371337 `getid new_3_c`