tests/test-sparse-with-safe-share.t
author Martin von Zweigbergk <martinvonz@google.com>
Mon, 07 Feb 2022 22:54:38 -0800
changeset 48760 93d6f0e7ba2f
parent 48494 b74ee41addee
permissions -rw-r--r--
filemerge: move check for identical sides out of filemerge() `filemerge.filemerge()` returns `None` if no merge was necessary because the two sides were identical. I don't think it should be that function's responsibility to handle that case; we should ideally not even call `filemerge.filemerge()` if the two inputs identical. This patch therefore moves the check out to the caller (`mergestate.py`). The largefiles test changed because we now notice that the two sides made the same change, so we don't consider it a merge. Also note that the new message better matches the line above it in the test output. Differential Revision: https://phab.mercurial-scm.org/D12154
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
48493
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     1
Same with share-safe
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     2
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     3
  $ echo "[format]"         >> $HGRCPATH
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     4
  $ echo "use-share-safe = True" >> $HGRCPATH
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     5
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     6
  $ cd $TESTTMP
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     7
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     8
  $ hg init myrepo
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
     9
  $ cd myrepo
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    10
  $ cat > .hg/hgrc <<EOF
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    11
  > [extensions]
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    12
  > sparse=
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    13
  > EOF
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    14
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    15
  $ echo a > show
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    16
  $ echo x > hide
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    17
  $ hg ci -Aqm 'initial'
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    18
48494
b74ee41addee sparse: lock the store when updating requirements config
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 48493
diff changeset
    19
Regression test: checks that this command correctly locks the store
b74ee41addee sparse: lock the store when updating requirements config
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 48493
diff changeset
    20
before updating the store [requirements] config.
48493
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    21
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    22
  $ hg up -q 0
50330d481640 sparse: demonstrate a bug when used with safe-share
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents:
diff changeset
    23
  $ hg debugsparse --include 'hide'