tests/test-pull-permission.t
author Martin von Zweigbergk <martinvonz@google.com>
Sat, 13 Apr 2019 00:24:17 -0700
changeset 42161 7815cf0ea88b
parent 39489 f1186c292d03
child 49825 2f2682f40ea0
permissions -rw-r--r--
tests: add test for issue5343 (grafting with copies) It seems that issue5353 resulted in a lot of tests in test-graft.t, but the bug actually reported in that issue didn't get a test case. This patch adds one for the "move" and one for the "copy" version of it. I also added a "copy+modify" case, to show what should be a merge conflict. I didn't add one for the "backwards" version of it since the comment says that that was already covered by previous work. The tests added by this patch show the broken behavior (the bug is still open). I suspect the results returned from mergecopies() are not expressive enough to fix this issue: it has a dict for copies to merge with, but that can only give one more filename, but here we need two (one for the path on the remote side and one for the path in the merge base). I want to have it tested anyway since I'm about to refactor mergecopies(). Differential Revision: https://phab.mercurial-scm.org/D6242

#require unix-permissions no-root

  $ hg init a
  $ cd a
  $ echo foo > b
  $ hg add b
  $ hg ci -m "b"

  $ chmod -w .hg/store

  $ cd ..

  $ hg clone a b
  requesting all changes
  adding changesets
  adding manifests
  adding file changes
  added 1 changesets with 1 changes to 1 files
  new changesets 97310831fa1a
  updating to branch default
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved

  $ chmod +w a/.hg/store # let test clean up

  $ cd b
  $ hg verify
  checking changesets
  checking manifests
  crosschecking files in changesets and manifests
  checking files
  checked 1 changesets with 1 changes to 1 files

  $ cd ..