Mercurial > hg
annotate tests/test-inotify-dirty-dirstate.t @ 16458:55982f62651f
commit: add option to amend the working dir parent
The --amend flag can be used to amend the parent of the working directory
with a new commit that contains the changes in the parent in addition to
those currently reported by "hg status", if there are any. The old commit
is stored in a backup bundle in ".hg/strip-backup"(see "hg help bundle"
and "hg help unbundle" on how to restore it).
Message, user and date are taken from the amended commit unless specified.
When a message isn't specified on the command line, the editor will open
with the message of the amended commit.
It is not possible to amend public changesets (see "hg help phases") or
changesets that have children.
Behind the scenes, first commit the update (if there is one) as a regular
child of the current parent. Then create a new commit on the parent's
parent with the updated contents. Then change the working copy parent
to this new combined changeset. Finally, strip the amended commit and
update commit created in the beginning.
An alternative (cleaner?) approach of doing this is suggested here:
http://selenic.com/pipermail/mercurial-devel/2012-March/038540.html
It is currently not possible to amend merge commits or recursively,
this can be added at a later time.
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Wed, 18 Apr 2012 01:20:16 +0300 |
parents | ffb5c09ba822 |
children | f2719b387380 |
rev | line source |
---|---|
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
1 issues when status queries are issued when dirstate is dirty |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
2 |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
3 $ "$TESTDIR/hghave" inotify || exit 80 |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
4 $ echo "[extensions]" >> $HGRCPATH |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
5 $ echo "inotify=" >> $HGRCPATH |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
6 $ echo "fetch=" >> $HGRCPATH |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
7 |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
8 issue1810: inotify and fetch |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
9 |
13956
ffb5c09ba822
tests: remove redundant mkdir
Martin Geisler <mg@lazybytes.net>
parents:
12452
diff
changeset
|
10 $ hg init test; cd test |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
11 $ hg inserve -d --pid-file=../hg.pid |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
12 $ cat ../hg.pid >> "$DAEMON_PIDS" |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
13 $ echo foo > foo |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
14 $ hg add |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
15 adding foo |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
16 $ hg ci -m foo |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
17 $ cd .. |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
18 $ hg --config "inotify.pidfile=../hg2.pid" clone test test2 |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
19 updating to branch default |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
20 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
21 $ cat ../hg2.pid >> "$DAEMON_PIDS" |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
22 $ cd test2 |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
23 $ echo bar > bar |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
24 $ hg add |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
25 adding bar |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
26 $ hg ci -m bar |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
27 $ cd ../test |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
28 $ echo spam > spam |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
29 $ hg add |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
30 adding spam |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
31 $ hg ci -m spam |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
32 $ cd ../test2 |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
33 $ hg st |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
34 |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
35 abort, outstanding changes |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
36 |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
37 $ hg fetch -q |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
38 $ hg st |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
39 $ cd .. |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
40 |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
41 issue1719: inotify and mq |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
42 |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
43 $ echo "mq=" >> $HGRCPATH |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
44 $ hg init test-1719 |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
45 $ cd test-1719 |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
46 |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
47 inserve |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
48 |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
49 $ hg inserve -d --pid-file=../hg-test-1719.pid |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
50 $ cat ../hg-test-1719.pid >> "$DAEMON_PIDS" |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
51 $ echo content > file |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
52 $ hg add file |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
53 $ hg qnew -f test.patch |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
54 $ hg status |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
55 $ hg qpop |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
56 popping test.patch |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
57 patch queue now empty |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
58 |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
59 st should not output anything |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
60 |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
61 $ hg status |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
62 $ hg qpush |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
63 applying test.patch |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
64 now at: test.patch |
9855
f47c0881b16e
inotify: Do not access inotify when dirstate is dirty (issue1811)
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents:
diff
changeset
|
65 |
12452
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
66 st should not output anything |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
67 |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
68 $ hg status |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
69 $ hg qrefresh |
f727db60abb4
tests: unify test-inotify-dirty-dirstate
Matt Mackall <mpm@selenic.com>
parents:
9897
diff
changeset
|
70 $ hg status |