tests/test-issue1438.t
author Durham Goode <durham@fb.com>
Mon, 04 Jan 2016 16:14:04 -0800
changeset 27622 0bc71f45d362
parent 26420 2fc86d92c4a9
child 49621 55c6ebd11cb9
permissions -rw-r--r--
cmdutil: pass node instead of ctx to diffordiffstat 93bcc73df8d5 changed showpatch to use ctx's more, but it accidentally passed prev as a context and node as a binary string, when both should be passed as binary strings (since diffordiffstat tries to resolve them via repo[X]). This affected hggit since the existing ctx belongs to the git overlay, but the resolved context (from the repo[X] resolution) should belong to the main repo. This broke a test because it tried to look in the git repo for data that didn't exist. This feels like a deeper issue in hggit somewhere, but the fix is here trivial and obviously more correct

#require symlink

https://bz.mercurial-scm.org/1438

  $ hg init

  $ ln -s foo link
  $ hg add link
  $ hg ci -mbad link
  $ hg rm link
  $ hg ci -mok
  $ hg diff -g -r 0:1 > bad.patch

  $ hg up 0
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved

  $ hg import --no-commit bad.patch
  applying bad.patch

  $ hg status
  R link
  ? bad.patch