Mercurial > hg
annotate tests/test-subrepo-missing.t @ 13955:86b5cc1e8be8 stable
help config: explain that config files do not exist by default
Inspired by critique given on StackOverflow where a user writes:
I can have a good guess at what "%USERPROFILE%" might signify but
none of the files listed in the "hg help config" output exist after
running the installer. Previous experience would suggest that
missing files mean something somewhere has gone seriously wrong.
http://stackoverflow.com/questions/2329023/2351139#2351139
author | Martin Geisler <mg@lazybytes.net> |
---|---|
date | Mon, 18 Apr 2011 13:57:22 +0200 |
parents | d0e21c5fde41 |
children | f73c7b70df68 |
rev | line source |
---|---|
13017
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
1 $ hg init repo |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
2 $ cd repo |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
3 $ hg init subrepo |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
4 $ echo a > subrepo/a |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
5 $ hg -R subrepo ci -Am adda |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
6 adding a |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
7 $ echo 'subrepo = subrepo' > .hgsub |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
8 $ hg ci -Am addsubrepo |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
9 adding .hgsub |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
10 committing subrepository subrepo |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
11 $ echo b > subrepo/b |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
12 $ hg -R subrepo ci -Am addb |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
13 adding b |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
14 $ hg ci -m updatedsub |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
15 committing subrepository subrepo |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
16 |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
17 delete .hgsub and revert it |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
18 |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
19 $ rm .hgsub |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
20 $ hg revert .hgsub |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
21 warning: subrepo spec file .hgsub not found |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
22 |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
23 delete .hgsubstate and revert it |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
24 |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
25 $ rm .hgsubstate |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
26 $ hg revert .hgsubstate |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
27 |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
28 delete .hgsub and update |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
29 |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
30 $ rm .hgsub |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
31 $ hg up 0 |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
32 warning: subrepo spec file .hgsub not found |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
33 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
34 $ hg st |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
35 ! .hgsub |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
36 $ ls subrepo |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
37 a |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
38 |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
39 delete .hgsubstate and update |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
40 |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
41 $ hg up -C |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
42 warning: subrepo spec file .hgsub not found |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
43 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
44 $ rm .hgsubstate |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
45 $ hg up 0 |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
46 remote changed .hgsubstate which local deleted |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
47 use (c)hanged version or leave (d)eleted? c |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
48 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
49 $ hg st |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
50 $ ls subrepo |
d0e21c5fde41
subrepo: handle missing subrepo spec file as removed
Patrick Mezard <pmezard@gmail.com>
parents:
diff
changeset
|
51 a |