tests/test-merge-subrepos.t
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 31 Jan 2015 12:39:44 -0500
changeset 24051 7956d17431bc
parent 19803 0f64af33fb63
child 33196 439b4d005b4a
permissions -rw-r--r--
windows: seek to the end of posixfile when opening in append mode The position is implementation defined when opening in append mode, and it seems like Linux sets it to EOF while Windows keeps it at zero. This has caused problems in the past when a file is opened and tell() is immediately called, such as 48c232873a54 and 6bf93440a717. Since the only caller of osutil.posixfile is this windows module, this seems like a better place to fix the issue than in osutil.c and pure.osutil.

  $ hg init

  $ echo a > a
  $ hg ci -qAm 'add a'

  $ hg init subrepo
  $ echo 'subrepo = http://example.net/libfoo' > .hgsub
  $ hg ci -qAm 'added subrepo'

  $ hg up -qC 0
  $ echo ax > a
  $ hg ci -m 'changed a'
  created new head

  $ hg up -qC 1
  $ cd subrepo
  $ echo b > b
  $ hg add b
  $ cd ..

Should fail, since there are added files to subrepo:

  $ hg merge
  abort: uncommitted changes in subrepository 'subrepo'
  [255]