Mercurial > hg
annotate tests/test-removeemptydirs.t @ 47507:d4c795576aeb
dirstate-entry: turn dirstate tuple into a real object (like in C)
With dirstate V2, the stored information and actual format will change. This mean we need to start an a better abstraction for a dirstate entry that a tuple directly accessed.
By chance, the C code is already doing this and pretend to be a tuple. So it
should be fairly easy. We start with turning the tuple into an object, we will
slowly migrate the dirstate code to no longer use the tuple directly in later
changesets.
Differential Revision: https://phab.mercurial-scm.org/D10949
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 03 Jul 2021 03:48:35 +0200 |
parents | e9fbf8fd5f33 |
children | f2846abd9e21 |
rev | line source |
---|---|
38493
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
1 Tests for experimental.removeemptydirs |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
2 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
3 $ NO_RM=--config=experimental.removeemptydirs=0 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
4 $ isdir() { if [ -d $1 ]; then echo yes; else echo no; fi } |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
5 $ isfile() { if [ -f $1 ]; then echo yes; else echo no; fi } |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
6 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
7 `hg rm` of the last file in a directory: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
8 $ hg init hgrm |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
9 $ cd hgrm |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
10 $ mkdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
11 $ echo hi > somedir/foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
12 $ hg ci -qAm foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
13 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
14 yes |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
15 $ hg rm somedir/foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
16 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
17 no |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
18 $ hg revert -qa |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
19 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
20 yes |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
21 $ hg $NO_RM rm somedir/foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
22 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
23 yes |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
24 $ ls somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
25 $ cd $TESTTMP |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
26 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
27 `hg mv` of the last file in a directory: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
28 $ hg init hgmv |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
29 $ cd hgmv |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
30 $ mkdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
31 $ mkdir destdir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
32 $ echo hi > somedir/foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
33 $ hg ci -qAm foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
34 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
35 yes |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
36 $ hg mv somedir/foo destdir/foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
37 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
38 no |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
39 $ hg revert -qa |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
40 (revert doesn't get rid of destdir/foo?) |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
41 $ rm destdir/foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
42 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
43 yes |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
44 $ hg $NO_RM mv somedir/foo destdir/foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
45 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
46 yes |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
47 $ ls somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
48 $ cd $TESTTMP |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
49 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
50 Updating to a commit that doesn't have the directory: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
51 $ hg init hgupdate |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
52 $ cd hgupdate |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
53 $ echo hi > r0 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
54 $ hg ci -qAm r0 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
55 $ mkdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
56 $ echo hi > somedir/foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
57 $ hg ci -qAm r1 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
58 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
59 yes |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
60 $ hg co -q -r ".^" |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
61 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
62 no |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
63 $ hg co -q tip |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
64 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
65 yes |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
66 $ hg $NO_RM co -q -r ".^" |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
67 $ isdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
68 yes |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
69 $ ls somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
70 $ cd $TESTTMP |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
71 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
72 Rebasing across a commit that doesn't have the directory, from inside the |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
73 directory: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
74 $ hg init hgrebase |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
75 $ cd hgrebase |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
76 $ echo hi > r0 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
77 $ hg ci -qAm r0 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
78 $ mkdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
79 $ echo hi > somedir/foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
80 $ hg ci -qAm first_rebase_source |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
81 $ hg $NO_RM co -q -r ".^" |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
82 $ echo hi > somedir/bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
83 $ hg ci -qAm first_rebase_dest |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
84 $ hg $NO_RM co -q -r ".^" |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
85 $ echo hi > somedir/baz |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
86 $ hg ci -qAm second_rebase_dest |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
87 $ hg co -qr 'desc(first_rebase_source)' |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
88 $ cd $TESTTMP/hgrebase/somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
89 $ hg --config extensions.rebase= rebase -qr . -d 'desc(first_rebase_dest)' |
39462
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
90 current directory was removed (rmcwd !) |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
91 (consider changing to repo root: $TESTTMP/hgrebase) (rmcwd !) |
38493
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
92 $ cd $TESTTMP/hgrebase/somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
93 (The current node is the rebased first_rebase_source on top of |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
94 first_rebase_dest) |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
95 This should not output anything about current directory being removed: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
96 $ hg $NO_RM --config extensions.rebase= rebase -qr . -d 'desc(second_rebase_dest)' |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
97 $ cd $TESTTMP |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
98 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
99 Histediting across a commit that doesn't have the directory, from inside the |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
100 directory (reordering nodes): |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
101 $ hg init hghistedit |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
102 $ cd hghistedit |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
103 $ echo hi > r0 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
104 $ hg ci -qAm r0 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
105 $ echo hi > r1 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
106 $ hg ci -qAm r1 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
107 $ echo hi > r2 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
108 $ hg ci -qAm r2 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
109 $ mkdir somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
110 $ echo hi > somedir/foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
111 $ hg ci -qAm migrating_revision |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
112 $ cat > histedit_commands <<EOF |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
113 > pick 89079fab8aee 0 r0 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
114 > pick e6d271df3142 1 r1 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
115 > pick 89e25aa83f0f 3 migrating_revision |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
116 > pick b550aa12d873 2 r2 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
117 > EOF |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
118 $ cd $TESTTMP/hghistedit/somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
119 $ hg --config extensions.histedit= histedit -q --commands ../histedit_commands |
47435
e9fbf8fd5f33
histedit: don't swallow errors that happen when updating the working copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
41966
diff
changeset
|
120 current directory was removed |
e9fbf8fd5f33
histedit: don't swallow errors that happen when updating the working copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
41966
diff
changeset
|
121 (consider changing to repo root: $TESTTMP/hghistedit) |
38493
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
122 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
123 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
124 $ cd $TESTTMP/hghistedit |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
125 $ cat > histedit_commands <<EOF |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
126 > pick 89079fab8aee 0 r0 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
127 > pick 7c7a22c6009f 3 migrating_revision |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
128 > pick e6d271df3142 1 r1 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
129 > pick 40a53c2d4276 2 r2 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
130 > EOF |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
131 $ cd $TESTTMP/hghistedit/somedir |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
132 $ hg $NO_RM --config extensions.histedit= histedit -q --commands ../histedit_commands |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
133 Regardless of system, we should always get a 'yes' here. |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
134 $ isfile foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
135 yes |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
136 $ cd $TESTTMP |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
137 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
138 This is essentially the exact test from issue5826, just cleaned up a little: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
139 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
140 $ hg init issue5826_withrm |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
141 $ cd issue5826_withrm |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
142 |
38662
ad2aa4e85047
removeemptydirs: add test for `hg split` inside a disappearing directory
Kyle Lippincott <spectral@google.com>
parents:
38493
diff
changeset
|
143 Let's only turn this on for this repo so that we don't contaminate later tests. |
ad2aa4e85047
removeemptydirs: add test for `hg split` inside a disappearing directory
Kyle Lippincott <spectral@google.com>
parents:
38493
diff
changeset
|
144 $ cat >> .hg/hgrc <<EOF |
38493
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
145 > [extensions] |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
146 > histedit = |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
147 > EOF |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
148 Commit three revisions that each create a directory: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
149 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
150 $ mkdir foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
151 $ touch foo/bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
152 $ hg commit -qAm "add foo" |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
153 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
154 $ mkdir bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
155 $ touch bar/bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
156 $ hg commit -qAm "add bar" |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
157 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
158 $ mkdir baz |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
159 $ touch baz/bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
160 $ hg commit -qAm "add baz" |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
161 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
162 Enter the first directory: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
163 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
164 $ cd foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
165 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
166 Histedit doing 'pick, pick, fold': |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
167 |
39462
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
168 #if rmcwd |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
169 |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
170 $ hg histedit --commands - <<EOF |
38493
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
171 > pick 6274c77c93c3 1 add bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
172 > pick ff70a87b588f 0 add foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
173 > fold 9992bb0ac0db 2 add baz |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
174 > EOF |
47435
e9fbf8fd5f33
histedit: don't swallow errors that happen when updating the working copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
41966
diff
changeset
|
175 current directory was removed |
e9fbf8fd5f33
histedit: don't swallow errors that happen when updating the working copy
Martin von Zweigbergk <martinvonz@google.com>
parents:
41966
diff
changeset
|
176 (consider changing to repo root: $TESTTMP/issue5826_withrm) |
38493
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
177 abort: $ENOENT$ |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
178 [255] |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
179 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
180 Go back to the repo root after losing it as part of that operation: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
181 $ cd $TESTTMP/issue5826_withrm |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
182 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
183 Note the lack of a non-zero exit code from this function - it exits |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
184 successfully, but doesn't really do anything. |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
185 $ hg histedit --continue |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
186 9992bb0ac0db: cannot fold - working copy is not a descendant of previous commit 5c806432464a |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
187 saved backup bundle to $TESTTMP/issue5826_withrm/.hg/strip-backup/ff70a87b588f-e94f9789-histedit.hg |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
188 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
189 $ hg log -T '{rev}:{node|short} {desc}\n' |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
190 2:94e3f9fae1d6 fold-temp-revision 9992bb0ac0db |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
191 1:5c806432464a add foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
192 0:d17db4b0303a add bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
193 |
39462
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
194 #else |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
195 |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
196 $ cd $TESTTMP/issue5826_withrm |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
197 |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
198 $ hg histedit --commands - <<EOF |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
199 > pick 6274c77c93c3 1 add bar |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
200 > pick ff70a87b588f 0 add foo |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
201 > fold 9992bb0ac0db 2 add baz |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
202 > EOF |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
203 saved backup bundle to $TESTTMP/issue5826_withrm/.hg/strip-backup/5c806432464a-cd4c8d86-histedit.hg |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
204 |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
205 $ hg log -T '{rev}:{node|short} {desc}\n' |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
206 1:b9eddaa97cbc add foo |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
207 *** |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
208 add baz |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
209 0:d17db4b0303a add bar |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
210 |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
211 #endif |
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
212 |
38493
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
213 Now test that again with experimental.removeemptydirs=false: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
214 $ hg init issue5826_norm |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
215 $ cd issue5826_norm |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
216 |
38662
ad2aa4e85047
removeemptydirs: add test for `hg split` inside a disappearing directory
Kyle Lippincott <spectral@google.com>
parents:
38493
diff
changeset
|
217 Let's only turn this on for this repo so that we don't contaminate later tests. |
ad2aa4e85047
removeemptydirs: add test for `hg split` inside a disappearing directory
Kyle Lippincott <spectral@google.com>
parents:
38493
diff
changeset
|
218 $ cat >> .hg/hgrc <<EOF |
38493
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
219 > [extensions] |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
220 > histedit = |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
221 > [experimental] |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
222 > removeemptydirs = false |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
223 > EOF |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
224 Commit three revisions that each create a directory: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
225 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
226 $ mkdir foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
227 $ touch foo/bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
228 $ hg commit -qAm "add foo" |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
229 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
230 $ mkdir bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
231 $ touch bar/bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
232 $ hg commit -qAm "add bar" |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
233 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
234 $ mkdir baz |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
235 $ touch baz/bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
236 $ hg commit -qAm "add baz" |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
237 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
238 Enter the first directory: |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
239 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
240 $ cd foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
241 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
242 Histedit doing 'pick, pick, fold': |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
243 |
39462
e5449ff273d6
tests: stabilize test-removeemptydirs.t on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents:
38662
diff
changeset
|
244 $ hg histedit --commands - <<EOF |
38493
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
245 > pick 6274c77c93c3 1 add bar |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
246 > pick ff70a87b588f 0 add foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
247 > fold 9992bb0ac0db 2 add baz |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
248 > EOF |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
249 saved backup bundle to $TESTTMP/issue5826_withrm/issue5826_norm/.hg/strip-backup/5c806432464a-cd4c8d86-histedit.hg |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
250 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
251 Note the lack of a 'cd' being necessary here, and we don't need to 'histedit |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
252 --continue' |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
253 |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
254 $ hg log -T '{rev}:{node|short} {desc}\n' |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
255 1:b9eddaa97cbc add foo |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
256 *** |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
257 add baz |
da2a7d8354b2
unlinkpath: make empty directory removal optional (issue5901) (issue5826)
Kyle Lippincott <spectral@google.com>
parents:
diff
changeset
|
258 0:d17db4b0303a add bar |
38662
ad2aa4e85047
removeemptydirs: add test for `hg split` inside a disappearing directory
Kyle Lippincott <spectral@google.com>
parents:
38493
diff
changeset
|
259 |
ad2aa4e85047
removeemptydirs: add test for `hg split` inside a disappearing directory
Kyle Lippincott <spectral@google.com>
parents:
38493
diff
changeset
|
260 $ cd $TESTTMP |