Mercurial > hg
diff tests/test-obsolete.t @ 32327:3546a771e376
obsolete: add operation metadata to rebase/amend/histedit obsmarkers
By recording what operation created the obsmarker, we can show very intuitive
messages to the user in various UIs. For instance, log output could have
messages like "Amended as XXX" to show why a commit is old and has an 'x' on it.
@ ac28e3 durham
/ First commit
|
| o d4afe7 durham
| | Second commit
| |
| x 8e9a5d (Amended as ac28e3) durham
|/ First commit
|
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 09 May 2017 16:29:31 -0700 |
parents | cda83a1bfb3a |
children | 46ba2cdda476 |
line wrap: on
line diff
--- a/tests/test-obsolete.t Wed May 17 22:33:15 2017 -0700 +++ b/tests/test-obsolete.t Tue May 09 16:29:31 2017 -0700 @@ -1247,15 +1247,15 @@ adding d $ hg ci --amend -m dd $ hg debugobsolete --index --rev "3+7" - 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re) - 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'user': 'test'} (re) + 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) + 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) $ hg debugobsolete --index --rev "3+7" -Tjson [ { "date": *, (glob) "flag": 0, "index": 1, - "metadata": {"user": "test"}, + "metadata": {"operation": "amend", "user": "test"}, "precnode": "6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1", "succnodes": ["d27fb9b066076fd921277a4b9e8b9cb48c95bc6a"] }, @@ -1263,7 +1263,7 @@ "date": *, (glob) "flag": 0, "index": 3, - "metadata": {"user": "test"}, + "metadata": {"operation": "amend", "user": "test"}, "precnode": "4715cf767440ed891755448016c2b8cf70760c30", "succnodes": ["7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d"] } @@ -1271,14 +1271,14 @@ Test the --delete option of debugobsolete command $ hg debugobsolete --index - 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 \(.*\) {'user': 'test'} (re) - 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'user': 'test'} (re) - 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 \(.*\) {'user': 'test'} (re) - 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'user': 'test'} (re) + 0 cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) + 1 6fdef60fcbabbd3d50e9b9cbc2a240724b91a5e1 d27fb9b066076fd921277a4b9e8b9cb48c95bc6a 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) + 2 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) + 3 4715cf767440ed891755448016c2b8cf70760c30 7ae79c5d60f049c7b0dd02f5f25b9d60aaf7b36d 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) $ hg debugobsolete --delete 1 --delete 3 deleted 2 obsolescence markers $ hg debugobsolete - cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 \(.*\) {'user': 'test'} (re) - 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 \(.*\) {'user': 'test'} (re) + cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b f9bd49731b0b175e42992a3c8fa6c678b2bc11f1 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) + 1ab51af8f9b41ef8c7f6f3312d4706d870b1fb74 29346082e4a9e27042b62d2da0e2de211c027621 0 \(.*\) {'operation': 'amend', 'user': 'test'} (re) $ cd ..