sapling/tests/test-empty.t
Siddharth Agarwal 69eb5c00b0 merge: exit early during a no-op update (BC)
hg update . (or equivalents) are effectively no-ops in just about all
circumstances.  These sorts of updates can be especially common in a
bookmark-oriented workflow. This saves us a status check and a manifest
decompression, which means that on a repo with over 210,000 files, this brings
hg update . down from 2.5 seconds to 0.15.

There is one change in behavior: a file that was added, not committed, and then
deleted but not removed used to be removed from the dirstate. With this patch
it isn't. This is what causes the change in test-mq-qpush-exact.t. This seems
like it's enough of an edge case to not be worth handling.

The output of test-empty.t changes because those files are not yet created.
2013-10-01 17:43:54 -07:00

54 lines
820 B
Perl

Create an empty repo:
$ hg init a
$ cd a
Try some commands:
$ hg log
$ hg grep wah
[1]
$ hg manifest
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
Check the basic files created:
$ ls .hg
00changelog.i
requires
store
Should be empty:
$ ls .hg/store
Poke at a clone:
$ cd ..
$ hg clone a b
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd b
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
0 files, 0 changesets, 0 total revisions
$ ls .hg
00changelog.i
hgrc
requires
store
Should be empty:
$ ls .hg/store
$ cd ..