annotate tests/test-phabricator.t @ 44717:3dc6a70779f2

phabricator: add an option to fold several commits into one review (issue6244) Now that all of the pieces are in place, alter the user facing command to allow it. This is the default behavior when using `arc`, but I much prefer the 1:1 approach, and I'm tempted to mark this advanced to limit its abuse. I started out calling this `--no-stack` like the feature request suggested, but I found it less obvious (especially when writing the code), so I went with the `hg fold` analogue. This will populate the `Commits` tab in the web UI with the hash of each commit folded into the review. From experimentation, it seems to list them in the order they are received from the extension instead of the actual parent/child relationship. The extension sends them in sorted order, thanks to `templatefilters.json()`. Since there's enough info there for them to put things in the right order, JSON is unordered aside from lists (IIUC), and there doesn't seem to be any harmful side effects, I guess we write this off as their bug. It is simple enough to workaround by putting a check for `util.sortdict` into `templatefilters.json()`, and don't resort in that case. There are a handful of restrictions that are documented in the code, which somebody could probably fix if they're interested. Notably, this requires the (default) `--amend` option, because there's not an easy way to apply a local tag across several commits. This also doesn't do preflight checking to ensure that all previous commits that were part of a single review are selected when updating. That seems expensive. What happens is the excluded commit is dropped from the review, but it keeps the Differential Revision line in the commit message. Not everything can be edited, so it doesn't seem worth making the code even more complicated to handle this edge case. There are a couple of "obsolete feature not enabled but X markers found!" messages that appeared on Windows but not macOS. I have no idea what's going on here, but that's an unrelated issue, so I conditionalized those lines. Differential Revision: https://phab.mercurial-scm.org/D8314
author Matt Harbison <matt_harbison@yahoo.com>
date Wed, 08 Apr 2020 17:30:10 -0400
parents ed81fa859426
children 0680b8a1992a
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
1 #require vcr
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
2 $ cat >> $HGRCPATH <<EOF
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
3 > [extensions]
39652
d2c81e83de2a phabricator: move extension from contrib to hgext
Augie Fackler <raf@durin42.com>
parents: 39651
diff changeset
4 > phabricator =
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
5 >
44716
ed81fa859426 tests: move the phabricator auth token to the global config file
Matt Harbison <matt_harbison@yahoo.com>
parents: 44715
diff changeset
6 > [auth]
ed81fa859426 tests: move the phabricator auth token to the global config file
Matt Harbison <matt_harbison@yahoo.com>
parents: 44715
diff changeset
7 > hgphab.schemes = https
ed81fa859426 tests: move the phabricator auth token to the global config file
Matt Harbison <matt_harbison@yahoo.com>
parents: 44715
diff changeset
8 > hgphab.prefix = phab.mercurial-scm.org
ed81fa859426 tests: move the phabricator auth token to the global config file
Matt Harbison <matt_harbison@yahoo.com>
parents: 44715
diff changeset
9 > # When working on the extension and making phabricator interaction
ed81fa859426 tests: move the phabricator auth token to the global config file
Matt Harbison <matt_harbison@yahoo.com>
parents: 44715
diff changeset
10 > # changes, edit this to be a real phabricator token. When done, edit
ed81fa859426 tests: move the phabricator auth token to the global config file
Matt Harbison <matt_harbison@yahoo.com>
parents: 44715
diff changeset
11 > # it back. The VCR transcripts will be auto-sanitised to replace your real
ed81fa859426 tests: move the phabricator auth token to the global config file
Matt Harbison <matt_harbison@yahoo.com>
parents: 44715
diff changeset
12 > # token with this value.
ed81fa859426 tests: move the phabricator auth token to the global config file
Matt Harbison <matt_harbison@yahoo.com>
parents: 44715
diff changeset
13 > hgphab.phabtoken = cli-hahayouwish
ed81fa859426 tests: move the phabricator auth token to the global config file
Matt Harbison <matt_harbison@yahoo.com>
parents: 44715
diff changeset
14 >
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
15 > [phabricator]
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
16 > debug = True
39651
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
17 > EOF
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
18 $ hg init repo
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
19 $ cd repo
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
20 $ cat >> .hg/hgrc <<EOF
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
21 > [phabricator]
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
22 > url = https://phab.mercurial-scm.org/
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
23 > callsign = HG
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
24 > EOF
a641fd1a1196 tests: add some basic tests of phabricator interactions
Augie Fackler <raf@durin42.com>
parents:
diff changeset
25 $ VCR="$TESTDIR/phabricator"
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
26
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
27 Error is handled reasonably. We override the phabtoken here so that
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
28 when you're developing changes to phabricator.py you can edit the
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
29 above config and have a real token in the test but not have to edit
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
30 this test.
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
31 $ hg phabread --config auth.hgphab.phabtoken=cli-notavalidtoken \
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
32 > --test-vcr "$VCR/phabread-conduit-error.json" D4480 | head
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
33 abort: Conduit Error (ERR-INVALID-AUTH): API token "cli-notavalidtoken" has the wrong length. API tokens should be 32 characters long.
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
34
44579
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
35 Missing arguments don't crash, and may print the command help
44436
09f3e003fc2a phabricator: avoid a stacktrace when command arguments are missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 44329
diff changeset
36
44579
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
37 $ hg debugcallconduit
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
38 hg debugcallconduit: invalid arguments
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
39 hg debugcallconduit METHOD
44436
09f3e003fc2a phabricator: avoid a stacktrace when command arguments are missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 44329
diff changeset
40
44579
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
41 call Conduit API
44436
09f3e003fc2a phabricator: avoid a stacktrace when command arguments are missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 44329
diff changeset
42
09f3e003fc2a phabricator: avoid a stacktrace when command arguments are missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 44329
diff changeset
43 options:
09f3e003fc2a phabricator: avoid a stacktrace when command arguments are missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 44329
diff changeset
44
44579
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
45 (use 'hg debugcallconduit -h' to show more help)
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
46 [255]
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
47 $ hg phabread
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
48 abort: empty DREVSPEC set
44436
09f3e003fc2a phabricator: avoid a stacktrace when command arguments are missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 44329
diff changeset
49 [255]
09f3e003fc2a phabricator: avoid a stacktrace when command arguments are missing
Matt Harbison <matt_harbison@yahoo.com>
parents: 44329
diff changeset
50
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
51 Basic phabread:
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
52 $ hg phabread --test-vcr "$VCR/phabread-4480.json" D4480 | head
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
53 # HG changeset patch
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
54 # Date 1536771503 0
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
55 # Parent a5de21c9e3703f8e8eb064bd7d893ff2f703c66a
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
56 exchangev2: start to implement pull with wire protocol v2
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
57
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
58 Wire protocol version 2 will take a substantially different
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
59 approach to exchange than version 1 (at least as far as pulling
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
60 is concerned).
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
61
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
62 This commit establishes a new exchangev2 module for holding
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
63
44579
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
64 Phabread with multiple DREVSPEC
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
65
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
66 TODO: attempt to order related revisions like --stack?
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
67 $ hg phabread --test-vcr "$VCR/phabread-multi-drev.json" D8205 8206 D8207 \
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
68 > | grep '^Differential Revision'
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
69 Differential Revision: https://phab.mercurial-scm.org/D8205
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
70 Differential Revision: https://phab.mercurial-scm.org/D8206
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
71 Differential Revision: https://phab.mercurial-scm.org/D8207
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
72
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
73 Empty DREVSPECs don't crash
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
74
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
75 $ hg phabread --test-vcr "$VCR/phabread-empty-drev.json" D7917-D7917
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
76 abort: empty DREVSPEC set
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
77 [255]
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
78
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
79
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
80 phabupdate with an accept:
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
81 $ hg phabupdate --accept D4564 \
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
82 > -m 'I think I like where this is headed. Will read rest of series later.'\
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
83 > --test-vcr "$VCR/accept-4564.json"
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
84 abort: Conduit Error (ERR-CONDUIT-CORE): Validation errors:
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
85 - You can not accept this revision because it has already been closed. Only open revisions can be accepted.
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
86 [255]
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
87 $ hg phabupdate --accept D7913 -m 'LGTM' --test-vcr "$VCR/accept-7913.json"
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
88
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
89 Create a differential diff:
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
90 $ HGENCODING=utf-8; export HGENCODING
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
91 $ echo alpha > alpha
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
92 $ hg ci --addremove -m 'create alpha for phabricator test €'
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
93 adding alpha
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
94 $ hg phabsend -r . --test-vcr "$VCR/phabsend-create-alpha.json"
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
95 D7915 - created - d386117f30e6: create alpha for phabricator test \xe2\x82\xac (esc)
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
96 new commits: ['347bf67801e5']
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
97 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d386117f30e6-24ffe649-phabsend.hg
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
98 $ echo more >> alpha
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
99 $ HGEDITOR=true hg ci --amend
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
100 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/347bf67801e5-3bf313e4-amend.hg
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
101 $ echo beta > beta
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
102 $ hg ci --addremove -m 'create beta for phabricator test'
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
103 adding beta
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
104 $ hg phabsend -r ".^::" --test-vcr "$VCR/phabsend-update-alpha-create-beta.json"
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
105 c44b38f24a45 mapped to old nodes []
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
106 D7915 - updated - c44b38f24a45: create alpha for phabricator test \xe2\x82\xac (esc)
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
107 D7916 - created - 9e6901f21d5b: create beta for phabricator test
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
108 new commits: ['a692622e6937']
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
109 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/9e6901f21d5b-1fcd4f0e-phabsend.hg
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
110 $ unset HGENCODING
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
111
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
112 The amend won't explode after posting a public commit. The local tag is left
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
113 behind to identify it.
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
114
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
115 $ echo 'public change' > beta
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
116 $ hg ci -m 'create public change for phabricator testing'
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
117 $ hg phase --public .
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
118 $ echo 'draft change' > alpha
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
119 $ hg ci -m 'create draft change for phabricator testing'
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
120 $ hg phabsend --amend -r '.^::' --test-vcr "$VCR/phabsend-create-public.json"
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
121 D7917 - created - 7b4185ab5d16: create public change for phabricator testing
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
122 D7918 - created - 251c1c333fc6: create draft change for phabricator testing
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
123 warning: not updating public commit 2:7b4185ab5d16
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
124 new commits: ['3244dc4a3334']
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
125 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/251c1c333fc6-41cb7c3b-phabsend.hg
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
126 $ hg tags -v
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
127 tip 3:3244dc4a3334
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
128 D7917 2:7b4185ab5d16 local
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
129
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
130 $ hg debugcallconduit user.search --test-vcr "$VCR/phab-conduit.json" <<EOF
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
131 > {
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
132 > "constraints": {
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
133 > "isBot": true
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
134 > }
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
135 > }
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
136 > EOF
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
137 {
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
138 "cursor": {
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
139 "after": null,
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
140 "before": null,
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
141 "limit": 100,
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
142 "order": null
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
143 },
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
144 "data": [],
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
145 "maps": {},
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
146 "query": {
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
147 "queryKey": null
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
148 }
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
149 }
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
150
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
151 Template keywords
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
152 $ hg log -T'{rev} {phabreview|json}\n'
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
153 3 {"id": "D7918", "url": "https://phab.mercurial-scm.org/D7918"}
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
154 2 {"id": "D7917", "url": "https://phab.mercurial-scm.org/D7917"}
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
155 1 {"id": "D7916", "url": "https://phab.mercurial-scm.org/D7916"}
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
156 0 {"id": "D7915", "url": "https://phab.mercurial-scm.org/D7915"}
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
157
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
158 $ hg log -T'{rev} {if(phabreview, "{phabreview.url} {phabreview.id}")}\n'
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
159 3 https://phab.mercurial-scm.org/D7918 D7918
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
160 2 https://phab.mercurial-scm.org/D7917 D7917
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
161 1 https://phab.mercurial-scm.org/D7916 D7916
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
162 0 https://phab.mercurial-scm.org/D7915 D7915
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
163
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
164 Commenting when phabsending:
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
165 $ echo comment > comment
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
166 $ hg ci --addremove -m "create comment for phabricator test"
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
167 adding comment
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
168 $ hg phabsend -r . -m "For default branch" --test-vcr "$VCR/phabsend-comment-created.json"
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
169 D7919 - created - d5dddca9023d: create comment for phabricator test
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
170 new commits: ['f7db812bbe1d']
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
171 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/d5dddca9023d-adf673ba-phabsend.hg
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
172 $ echo comment2 >> comment
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
173 $ hg ci --amend
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
174 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/f7db812bbe1d-8fcded77-amend.hg
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
175 $ hg phabsend -r . -m "Address review comments" --test-vcr "$VCR/phabsend-comment-updated.json"
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
176 1849d7828727 mapped to old nodes []
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
177 D7919 - updated - 1849d7828727: create comment for phabricator test
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
178
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
179 Phabsending a skipped commit:
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
180 $ hg phabsend --no-amend -r . --test-vcr "$VCR/phabsend-skipped.json"
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
181 1849d7828727 mapped to old nodes ['1849d7828727']
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
182 D7919 - skipped - 1849d7828727: create comment for phabricator test
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
183
44169
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
184 Phabesending a new binary, a modified binary, and a removed binary
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
185
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
186 >>> open('bin', 'wb').write(b'\0a') and None
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
187 $ hg ci -Am 'add binary'
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
188 adding bin
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
189 >>> open('bin', 'wb').write(b'\0b') and None
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
190 $ hg ci -m 'modify binary'
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
191 $ hg rm bin
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
192 $ hg ci -m 'remove binary'
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
193 $ hg phabsend -r .~2:: --test-vcr "$VCR/phabsend-binary.json"
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
194 uploading bin@aa24a81f55de
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
195 D8007 - created - aa24a81f55de: add binary
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
196 uploading bin@d8d62a881b54
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
197 D8008 - created - d8d62a881b54: modify binary
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
198 D8009 - created - af55645b2e29: remove binary
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
199 new commits: ['b8139fbb4a57']
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
200 new commits: ['c88ce4c2d2ad']
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
201 new commits: ['75dbbc901145']
44169
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
202 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/aa24a81f55de-a3a0cf24-phabsend.hg
5d85e9ddc7b9 phabricator: fix a crash when submitting binaries (issue6260)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44128
diff changeset
203
44329
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
204 Phabsend a renamed binary and a copied binary, with and without content changes
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
205 to src and dest
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
206
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
207 >>> open('bin2', 'wb').write(b'\0c') and None
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
208 $ hg ci -Am 'add another binary'
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
209 adding bin2
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
210
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
211 TODO: "bin2" can't be viewed in this commit (left or right side), and the URL
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
212 looks much different than when viewing "bin2_moved". No idea if this is a phab
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
213 bug, or phabsend bug. The patch (as printed by phabread) look reasonable
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
214 though.
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
215
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
216 $ hg mv bin2 bin2_moved
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
217 $ hg ci -m "moved binary"
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
218
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
219 Note: "bin2_moved" is also not viewable in phabricator with this review
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
220
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
221 $ hg cp bin2_moved bin2_copied
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
222 $ hg ci -m "copied binary"
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
223
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
224 Note: "bin2_moved_again" is marked binary in phabricator, and both sides of it
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
225 are viewable in their proper state. "bin2_copied" is not viewable, and not
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
226 listed as binary in phabricator.
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
227
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
228 >>> open('bin2_copied', 'wb').write(b'\0move+mod') and None
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
229 $ hg mv bin2_copied bin2_moved_again
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
230 $ hg ci -m "move+mod copied binary"
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
231
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
232 Note: "bin2_moved" and "bin2_moved_copy" are both marked binary, and both
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
233 viewable on each side.
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
234
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
235 >>> open('bin2_moved', 'wb').write(b'\0precopy mod') and None
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
236 $ hg cp bin2_moved bin2_moved_copied
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
237 >>> open('bin2_moved', 'wb').write(b'\0copy src+mod') and None
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
238 $ hg ci -m "copy+mod moved binary"
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
239
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
240 $ hg phabsend -r .~4:: --test-vcr "$VCR/phabsend-binary-renames.json"
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
241 uploading bin2@f42f9195e00c
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
242 D8128 - created - f42f9195e00c: add another binary
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
243 D8129 - created - 834ab31d80ae: moved binary
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
244 D8130 - created - 494b750e5194: copied binary
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
245 uploading bin2_moved_again@25f766b50cc2
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
246 D8131 - created - 25f766b50cc2: move+mod copied binary
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
247 uploading bin2_moved_copied@1b87b363a5e4
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
248 uploading bin2_moved@1b87b363a5e4
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
249 D8132 - created - 1b87b363a5e4: copy+mod moved binary
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
250 new commits: ['90437c20312a']
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
251 new commits: ['f391f4da4c61']
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
252 new commits: ['da86a9f3268c']
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
253 new commits: ['003ffc16ba66']
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
254 new commits: ['13bd750c36fa']
44329
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
255 saved backup bundle to $TESTTMP/repo/.hg/strip-backup/f42f9195e00c-e82a0769-phabsend.hg
d1177d39012e phabricator: fix a phabsend crash when processing a renamed binary
Matt Harbison <matt_harbison@yahoo.com>
parents: 44169
diff changeset
256
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
257 Phabreading a DREV with a local:commits time as a string:
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
258 $ hg phabread --test-vcr "$VCR/phabread-str-time.json" D1285
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
259 # HG changeset patch
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
260 # User Pulkit Goyal <7895pulkit@gmail.com>
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
261 # Date 1509404054 -19800
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
262 # Node ID 44fc1c1f1774a76423b9c732af6938435099bcc5
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
263 # Parent 8feef8ef8389a3b544e0a74624f1efc3a8d85d35
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
264 repoview: add a new attribute _visibilityexceptions and related API
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
265
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
266 Currently we don't have a defined way in core to make some hidden revisions
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
267 visible in filtered repo. Extensions to achieve the purpose of unhiding some
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
268 hidden commits, wrap repoview.pinnedrevs() function.
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
269
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
270 To make the above task simple and have well defined API, this patch adds a new
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
271 attribute '_visibilityexceptions' to repoview class which will contains
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
272 the hidden revs which should be exception.
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
273 This will allow to set different exceptions for different repoview objects
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
274 backed by the same unfiltered repo.
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
275
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
276 This patch also adds API to add revs to the attribute set and get them.
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
277
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
278 Thanks to Jun for suggesting the use of repoview class instead of localrepo.
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
279
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
280 Differential Revision: https://phab.mercurial-scm.org/D1285
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
281 diff --git a/mercurial/repoview.py b/mercurial/repoview.py
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
282 --- a/mercurial/repoview.py
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
283 +++ b/mercurial/repoview.py
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
284 @@ * @@ (glob)
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
285 subclasses of `localrepo`. Eg: `bundlerepo` or `statichttprepo`.
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
286 """
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
287
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
288 + # hidden revs which should be visible
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
289 + _visibilityexceptions = set()
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
290 +
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
291 def __init__(self, repo, filtername):
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
292 object.__setattr__(self, r'_unfilteredrepo', repo)
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
293 object.__setattr__(self, r'filtername', filtername)
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
294 @@ -231,6 +234,14 @@
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
295 return self
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
296 return self.unfiltered().filtered(name)
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
297
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
298 + def addvisibilityexceptions(self, revs):
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
299 + """adds hidden revs which should be visible to set of exceptions"""
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
300 + self._visibilityexceptions.update(revs)
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
301 +
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
302 + def getvisibilityexceptions(self):
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
303 + """returns the set of hidden revs which should be visible"""
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
304 + return self._visibilityexceptions
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
305 +
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
306 # everything access are forwarded to the proxied repo
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
307 def __getattr__(self, attr):
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
308 return getattr(self._unfilteredrepo, attr)
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
309 diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
310 --- a/mercurial/localrepo.py
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
311 +++ b/mercurial/localrepo.py
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
312 @@ -570,6 +570,14 @@
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
313 def close(self):
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
314 self._writecaches()
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
315
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
316 + def addvisibilityexceptions(self, exceptions):
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
317 + # should be called on a filtered repository
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
318 + pass
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
319 +
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
320 + def getvisibilityexceptions(self):
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
321 + # should be called on a filtered repository
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
322 + return set()
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
323 +
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
324 def _loadextensions(self):
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
325 extensions.loadall(self.ui)
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
326
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
327
44127
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
328 A bad .arcconfig doesn't error out
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
329 $ echo 'garbage' > .arcconfig
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
330 $ hg config phabricator --debug
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
331 invalid JSON in $TESTTMP/repo/.arcconfig
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
332 read config from: */.hgrc (glob)
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
333 */.hgrc:*: phabricator.debug=True (glob)
44127
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
334 $TESTTMP/repo/.hg/hgrc:*: phabricator.url=https://phab.mercurial-scm.org/ (glob)
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
335 $TESTTMP/repo/.hg/hgrc:*: phabricator.callsign=HG (glob)
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
336
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
337 The .arcconfig content overrides global config
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
338 $ cat >> $HGRCPATH << EOF
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
339 > [phabricator]
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
340 > url = global
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
341 > callsign = global
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
342 > EOF
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
343 $ cp $TESTDIR/../.arcconfig .
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
344 $ mv .hg/hgrc .hg/hgrc.bak
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
345 $ hg config phabricator --debug
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
346 read config from: */.hgrc (glob)
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
347 */.hgrc:*: phabricator.debug=True (glob)
44127
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
348 $TESTTMP/repo/.arcconfig: phabricator.callsign=HG
44128
ff396501e841 phabricator: use .arcconfig for `phabricator.url` if not set locally
Matt Harbison <matt_harbison@yahoo.com>
parents: 44127
diff changeset
349 $TESTTMP/repo/.arcconfig: phabricator.url=https://phab.mercurial-scm.org/
44127
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
350
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
351 But it doesn't override local config
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
352 $ cat >> .hg/hgrc << EOF
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
353 > [phabricator]
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
354 > url = local
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
355 > callsign = local
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
356 > EOF
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
357 $ hg config phabricator --debug
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
358 read config from: */.hgrc (glob)
44715
38f7b2f02f6d phabricator: add debug logging to show previous node values in `phabsend`
Matt Harbison <matt_harbison@yahoo.com>
parents: 44579
diff changeset
359 */.hgrc:*: phabricator.debug=True (glob)
44127
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
360 $TESTTMP/repo/.hg/hgrc:*: phabricator.url=local (glob)
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
361 $TESTTMP/repo/.hg/hgrc:*: phabricator.callsign=local (glob)
59b3fe1e2021 phabricator: use .arcconfig for the callsign if not set locally (issue6243)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44125
diff changeset
362 $ mv .hg/hgrc.bak .hg/hgrc
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
363
44550
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
364 Phabimport works with a stack
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
365
44125
a5e3f38407cb tests: restore phabricator tests and regenerate the recordings
Matt Harbison <matt_harbison@yahoo.com>
parents: 43260
diff changeset
366 $ cd ..
44550
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
367 $ hg clone repo repo2 -qr 1
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
368 $ cp repo/.hg/hgrc repo2/.hg/
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
369 $ cd repo2
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
370 $ hg phabimport --stack 'D7918' --test-vcr "$VCR/phabimport-stack.json"
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
371 applying patch from D7917
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
372 applying patch from D7918
44576
2ec6160449aa tests: avoid logging a commit with a Unicode character in test-phabricator.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 44551
diff changeset
373 $ hg log -r .: -G -Tcompact
44550
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
374 o 3[tip] aaef04066140 1970-01-01 00:00 +0000 test
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
375 | create draft change for phabricator testing
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
376 |
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
377 o 2 8de3712202d1 1970-01-01 00:00 +0000 test
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
378 | create public change for phabricator testing
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
379 |
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
380 @ 1 a692622e6937 1970-01-01 00:00 +0000 test
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
381 | create beta for phabricator test
44576
2ec6160449aa tests: avoid logging a commit with a Unicode character in test-phabricator.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 44551
diff changeset
382 ~
44551
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
383 Phabimport can create secret commits
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
384
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
385 $ hg rollback --config ui.rollback=True
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
386 repository tip rolled back to revision 1 (undo phabimport)
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
387 $ hg phabimport --stack 'D7918' --test-vcr "$VCR/phabimport-stack.json" \
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
388 > --config phabimport.secret=True
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
389 applying patch from D7917
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
390 applying patch from D7918
44576
2ec6160449aa tests: avoid logging a commit with a Unicode character in test-phabricator.t
Matt Harbison <matt_harbison@yahoo.com>
parents: 44551
diff changeset
391 $ hg log -r 'reverse(.:)' -T phases
44551
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
392 changeset: 3:aaef04066140
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
393 tag: tip
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
394 phase: secret
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
395 user: test
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
396 date: Thu Jan 01 00:00:00 1970 +0000
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
397 summary: create draft change for phabricator testing
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
398
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
399 changeset: 2:8de3712202d1
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
400 phase: secret
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
401 user: test
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
402 date: Thu Jan 01 00:00:00 1970 +0000
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
403 summary: create public change for phabricator testing
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
404
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
405 changeset: 1:a692622e6937
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
406 phase: public
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
407 user: test
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
408 date: Thu Jan 01 00:00:00 1970 +0000
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
409 summary: create beta for phabricator test
9bae1d1a0f4c phabricator: add a config knob to import in the secret phase
Matt Harbison <matt_harbison@yahoo.com>
parents: 44550
diff changeset
410
44579
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
411 Phabimport accepts multiple DREVSPECs
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
412
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
413 $ hg rollback --config ui.rollback=True
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
414 repository tip rolled back to revision 1 (undo phabimport)
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
415 $ hg phabimport --no-stack D7917 D7918 --test-vcr "$VCR/phabimport-multi-drev.json"
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
416 applying patch from D7917
a7f8c657a3f0 phabricator: allow multiple DREVSPEC args to phabread|phabimport|phabupdate
Matt Harbison <matt_harbison@yahoo.com>
parents: 44576
diff changeset
417 applying patch from D7918
44550
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
418
44717
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
419 Validate arguments with --fold
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
420
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
421 $ hg phabsend --fold -r 1
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
422 abort: cannot fold a single revision
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
423 [255]
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
424 $ hg phabsend --fold --no-amend -r 1::
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
425 abort: cannot fold with --no-amend
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
426 [255]
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
427 $ hg phabsend --fold -r 0+3
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
428 abort: cannot fold non-linear revisions
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
429 [255]
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
430 $ hg phabsend --fold -r 1::
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
431 abort: cannot fold revisions with different DREV values
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
432 [255]
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
433
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
434 Setup a series of commits to be folded, and include the Test Plan field multiple
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
435 times to test the concatenation logic. No Test Plan field in the last one to
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
436 ensure missing fields are skipped.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
437
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
438 $ hg init ../folded
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
439 $ cd ../folded
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
440 $ cat >> .hg/hgrc <<EOF
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
441 > [phabricator]
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
442 > url = https://phab.mercurial-scm.org/
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
443 > callsign = HG
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
444 > EOF
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
445
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
446 $ echo 'added' > file.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
447 $ hg ci -Aqm 'added file'
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
448
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
449 $ cat > log.txt <<EOF
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
450 > one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
451 >
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
452 > This file was modified with 'mod1' as its contents.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
453 >
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
454 > Test Plan:
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
455 > LOL! What testing?!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
456 > EOF
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
457 $ echo mod1 > file.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
458 $ hg ci -l log.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
459
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
460 $ cat > log.txt <<EOF
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
461 > two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
462 >
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
463 > This file was modified with 'mod2' as its contents.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
464 >
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
465 > Test Plan:
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
466 > Haha! yeah, right.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
467 >
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
468 > EOF
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
469 $ echo mod2 > file.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
470 $ hg ci -l log.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
471
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
472 $ echo mod3 > file.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
473 $ hg ci -m '3: a commit with no detailed message'
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
474
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
475 The folding of immutable commits works...
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
476
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
477 $ hg phase -r tip --public
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
478 $ hg phabsend --fold -r 1:: --test-vcr "$VCR/phabsend-fold-immutable.json"
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
479 D8386 - created - a959a3f69d8d: one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
480 D8386 - created - 24a4438154ba: two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
481 D8386 - created - d235829e802c: 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
482 warning: not updating public commit 1:a959a3f69d8d
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
483 warning: not updating public commit 2:24a4438154ba
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
484 warning: not updating public commit 3:d235829e802c
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
485 no newnodes to update
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
486
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
487 $ hg phase -r 0 --draft --force
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
488
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
489 ... as does the initial mutable fold...
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
490
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
491 $ echo y | hg phabsend --fold --confirm -r 1:: \
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
492 > --test-vcr "$VCR/phabsend-fold-initial.json"
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
493 NEW - a959a3f69d8d: one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
494 NEW - 24a4438154ba: two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
495 NEW - d235829e802c: 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
496 Send the above changes to https://phab.mercurial-scm.org/ (yn)? y
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
497 D8387 - created - a959a3f69d8d: one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
498 D8387 - created - 24a4438154ba: two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
499 D8387 - created - d235829e802c: 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
500 updating local commit list for D8387
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
501 new commits: ['602c4e738243', '832553266fe8', '921f8265efbd']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
502 saved backup bundle to $TESTTMP/folded/.hg/strip-backup/a959a3f69d8d-a4a24136-phabsend.hg
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
503
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
504 ... and doesn't mangle the local commits.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
505
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
506 $ hg log -T '{rev}:{node|short}\n{indent(desc, " ")}\n'
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
507 3:921f8265efbd
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
508 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
509
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
510 Differential Revision: https://phab.mercurial-scm.org/D8387
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
511 2:832553266fe8
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
512 two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
513
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
514 This file was modified with 'mod2' as its contents.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
515
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
516 Test Plan:
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
517 Haha! yeah, right.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
518
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
519 Differential Revision: https://phab.mercurial-scm.org/D8387
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
520 1:602c4e738243
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
521 one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
522
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
523 This file was modified with 'mod1' as its contents.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
524
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
525 Test Plan:
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
526 LOL! What testing?!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
527
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
528 Differential Revision: https://phab.mercurial-scm.org/D8387
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
529 0:98d480e0d494
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
530 added file
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
531
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
532 Setup some obsmarkers by adding a file to the middle commit. This stress tests
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
533 getoldnodedrevmap() in later phabsends.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
534
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
535 $ hg up '.^'
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
536 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
537 $ echo 'modified' > file2.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
538 $ hg add file2.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
539 $ hg amend --config experimental.evolution=all --config extensions.amend=
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
540 1 new orphan changesets
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
541 $ hg up 3
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
542 obsolete feature not enabled but 1 markers found!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
543 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
544 $ hg rebase --config experimental.evolution=all --config extensions.rebase=
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
545 note: not rebasing 2:832553266fe8 "two: second commit to review", already in destination as 4:0124e5474c88 "two: second commit to review" (tip)
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
546 rebasing 3:921f8265efbd "3: a commit with no detailed message"
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
547
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
548 When commits have changed locally, the local commit list on Phabricator is
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
549 updated.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
550
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
551 $ echo y | hg phabsend --fold --confirm -r 1:: \
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
552 > --test-vcr "$VCR/phabsend-fold-updated.json"
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
553 obsolete feature not enabled but 2 markers found!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
554 602c4e738243 mapped to old nodes ['602c4e738243']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
555 0124e5474c88 mapped to old nodes ['832553266fe8']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
556 e4edb1fe3565 mapped to old nodes ['921f8265efbd']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
557 D8387 - 602c4e738243: one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
558 D8387 - 0124e5474c88: two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
559 D8387 - e4edb1fe3565: 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
560 Send the above changes to https://phab.mercurial-scm.org/ (yn)? y
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
561 D8387 - updated - 602c4e738243: one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
562 D8387 - updated - 0124e5474c88: two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
563 D8387 - updated - e4edb1fe3565: 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
564 obsolete feature not enabled but 2 markers found! (?)
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
565 updating local commit list for D8387
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
566 new commits: ['602c4e738243', '0124e5474c88', 'e4edb1fe3565']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
567 $ hg log -Tcompact
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
568 obsolete feature not enabled but 2 markers found!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
569 5[tip] e4edb1fe3565 1970-01-01 00:00 +0000 test
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
570 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
571
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
572 4:1 0124e5474c88 1970-01-01 00:00 +0000 test
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
573 two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
574
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
575 1 602c4e738243 1970-01-01 00:00 +0000 test
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
576 one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
577
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
578 0 98d480e0d494 1970-01-01 00:00 +0000 test
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
579 added file
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
580
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
581 When nothing has changed locally since the last phabsend, the commit list isn't
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
582 updated, and nothing is changed locally afterward.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
583
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
584 $ hg phabsend --fold -r 1:: --test-vcr "$VCR/phabsend-fold-no-changes.json"
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
585 obsolete feature not enabled but 2 markers found!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
586 602c4e738243 mapped to old nodes ['602c4e738243']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
587 0124e5474c88 mapped to old nodes ['0124e5474c88']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
588 e4edb1fe3565 mapped to old nodes ['e4edb1fe3565']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
589 D8387 - updated - 602c4e738243: one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
590 D8387 - updated - 0124e5474c88: two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
591 D8387 - updated - e4edb1fe3565: 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
592 obsolete feature not enabled but 2 markers found! (?)
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
593 local commit list for D8387 is already up-to-date
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
594 $ hg log -Tcompact
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
595 obsolete feature not enabled but 2 markers found!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
596 5[tip] e4edb1fe3565 1970-01-01 00:00 +0000 test
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
597 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
598
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
599 4:1 0124e5474c88 1970-01-01 00:00 +0000 test
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
600 two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
601
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
602 1 602c4e738243 1970-01-01 00:00 +0000 test
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
603 one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
604
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
605 0 98d480e0d494 1970-01-01 00:00 +0000 test
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
606 added file
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
607
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
608 Fold will accept new revisions at the end...
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
609
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
610 $ echo 'another mod' > file2.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
611 $ hg ci -m 'four: extend the fold range'
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
612 obsolete feature not enabled but 2 markers found!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
613 $ hg phabsend --fold -r 1:: --test-vcr "$VCR/phabsend-fold-extend-end.json" \
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
614 > --config experimental.evolution=all
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
615 602c4e738243 mapped to old nodes ['602c4e738243']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
616 0124e5474c88 mapped to old nodes ['0124e5474c88']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
617 e4edb1fe3565 mapped to old nodes ['e4edb1fe3565']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
618 D8387 - updated - 602c4e738243: one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
619 D8387 - updated - 0124e5474c88: two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
620 D8387 - updated - e4edb1fe3565: 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
621 D8387 - created - 94aaae213b23: four: extend the fold range
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
622 updating local commit list for D8387
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
623 new commits: ['602c4e738243', '0124e5474c88', 'e4edb1fe3565', '51a04fea8707']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
624 $ hg log -r . -T '{desc}\n'
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
625 four: extend the fold range
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
626
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
627 Differential Revision: https://phab.mercurial-scm.org/D8387
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
628 $ hg log -T'{rev} {if(phabreview, "{phabreview.url} {phabreview.id}")}\n' -r 1::
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
629 obsolete feature not enabled but 3 markers found!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
630 1 https://phab.mercurial-scm.org/D8387 D8387
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
631 4 https://phab.mercurial-scm.org/D8387 D8387
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
632 5 https://phab.mercurial-scm.org/D8387 D8387
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
633 7 https://phab.mercurial-scm.org/D8387 D8387
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
634
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
635 ... and also accepts new revisions at the beginning of the range
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
636
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
637 It's a bit unfortunate that not having a Differential URL on the first commit
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
638 causes a new Differential Revision to be created, though it isn't *entirely*
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
639 unreasonable. At least this updates the subsequent commits.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
640
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
641 TODO: See if it can reuse the existing Differential.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
642
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
643 $ hg phabsend --fold -r 0:: --test-vcr "$VCR/phabsend-fold-extend-front.json" \
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
644 > --config experimental.evolution=all
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
645 602c4e738243 mapped to old nodes ['602c4e738243']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
646 0124e5474c88 mapped to old nodes ['0124e5474c88']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
647 e4edb1fe3565 mapped to old nodes ['e4edb1fe3565']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
648 51a04fea8707 mapped to old nodes ['51a04fea8707']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
649 D8388 - created - 98d480e0d494: added file
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
650 D8388 - updated - 602c4e738243: one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
651 D8388 - updated - 0124e5474c88: two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
652 D8388 - updated - e4edb1fe3565: 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
653 D8388 - updated - 51a04fea8707: four: extend the fold range
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
654 updating local commit list for D8388
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
655 new commits: ['15e9b14b4b4c', '6320b7d714cf', '3ee132d41dbc', '30682b960804', 'ac7db67f0991']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
656
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
657 $ hg log -T '{rev}:{node|short}\n{indent(desc, " ")}\n'
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
658 obsolete feature not enabled but 8 markers found!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
659 12:ac7db67f0991
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
660 four: extend the fold range
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
661
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
662 Differential Revision: https://phab.mercurial-scm.org/D8388
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
663 11:30682b960804
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
664 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
665
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
666 Differential Revision: https://phab.mercurial-scm.org/D8388
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
667 10:3ee132d41dbc
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
668 two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
669
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
670 This file was modified with 'mod2' as its contents.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
671
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
672 Test Plan:
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
673 Haha! yeah, right.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
674
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
675 Differential Revision: https://phab.mercurial-scm.org/D8388
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
676 9:6320b7d714cf
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
677 one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
678
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
679 This file was modified with 'mod1' as its contents.
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
680
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
681 Test Plan:
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
682 LOL! What testing?!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
683
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
684 Differential Revision: https://phab.mercurial-scm.org/D8388
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
685 8:15e9b14b4b4c
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
686 added file
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
687
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
688 Differential Revision: https://phab.mercurial-scm.org/D8388
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
689
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
690 Test phabsend --fold with an `hg split` at the end of the range
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
691
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
692 $ echo foo > file3.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
693 $ hg add file3.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
694
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
695 $ hg log -r . -T '{desc}' > log.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
696 $ echo 'amended mod' > file2.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
697 $ hg ci --amend -l log.txt --config experimental.evolution=all
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
698
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
699 $ cat <<EOF | hg --config extensions.split= --config ui.interactive=True \
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
700 > --config experimental.evolution=all split -r .
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
701 > n
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
702 > y
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
703 > y
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
704 > y
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
705 > y
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
706 > EOF
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
707 diff --git a/file2.txt b/file2.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
708 1 hunks, 1 lines changed
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
709 examine changes to 'file2.txt'?
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
710 (enter ? for help) [Ynesfdaq?] n
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
711
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
712 diff --git a/file3.txt b/file3.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
713 new file mode 100644
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
714 examine changes to 'file3.txt'?
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
715 (enter ? for help) [Ynesfdaq?] y
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
716
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
717 @@ -0,0 +1,1 @@
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
718 +foo
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
719 record change 2/2 to 'file3.txt'?
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
720 (enter ? for help) [Ynesfdaq?] y
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
721
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
722 created new head
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
723 diff --git a/file2.txt b/file2.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
724 1 hunks, 1 lines changed
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
725 examine changes to 'file2.txt'?
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
726 (enter ? for help) [Ynesfdaq?] y
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
727
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
728 @@ -1,1 +1,1 @@
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
729 -modified
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
730 +amended mod
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
731 record this change to 'file2.txt'?
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
732 (enter ? for help) [Ynesfdaq?] y
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
733
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
734 $ hg phabsend --fold -r 8:: --test-vcr "$VCR/phabsend-fold-split-end.json" \
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
735 > --config experimental.evolution=all
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
736 15e9b14b4b4c mapped to old nodes ['15e9b14b4b4c']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
737 6320b7d714cf mapped to old nodes ['6320b7d714cf']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
738 3ee132d41dbc mapped to old nodes ['3ee132d41dbc']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
739 30682b960804 mapped to old nodes ['30682b960804']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
740 6bc15dc99efd mapped to old nodes ['ac7db67f0991']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
741 b50946d5e490 mapped to old nodes ['ac7db67f0991']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
742 D8388 - updated - 15e9b14b4b4c: added file
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
743 D8388 - updated - 6320b7d714cf: one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
744 D8388 - updated - 3ee132d41dbc: two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
745 D8388 - updated - 30682b960804: 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
746 D8388 - updated - 6bc15dc99efd: four: extend the fold range
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
747 D8388 - updated - b50946d5e490: four: extend the fold range
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
748 updating local commit list for D8388
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
749 new commits: ['15e9b14b4b4c', '6320b7d714cf', '3ee132d41dbc', '30682b960804', '6bc15dc99efd', 'b50946d5e490']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
750
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
751 Test phabsend --fold with an `hg fold` at the end of the range
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
752
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
753 $ hg --config experimental.evolution=all --config extensions.rebase= \
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
754 > rebase -r '.^' -r . -d '.^^' --collapse -l log.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
755 rebasing 14:6bc15dc99efd "four: extend the fold range"
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
756 rebasing 15:b50946d5e490 "four: extend the fold range" (tip)
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
757
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
758 $ hg phabsend --fold -r 8:: --test-vcr "$VCR/phabsend-fold-fold-end.json" \
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
759 > --config experimental.evolution=all
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
760 15e9b14b4b4c mapped to old nodes ['15e9b14b4b4c']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
761 6320b7d714cf mapped to old nodes ['6320b7d714cf']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
762 3ee132d41dbc mapped to old nodes ['3ee132d41dbc']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
763 30682b960804 mapped to old nodes ['30682b960804']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
764 e919cdf3d4fe mapped to old nodes ['6bc15dc99efd', 'b50946d5e490']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
765 D8388 - updated - 15e9b14b4b4c: added file
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
766 D8388 - updated - 6320b7d714cf: one: first commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
767 D8388 - updated - 3ee132d41dbc: two: second commit to review
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
768 D8388 - updated - 30682b960804: 3: a commit with no detailed message
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
769 D8388 - updated - e919cdf3d4fe: four: extend the fold range
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
770 updating local commit list for D8388
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
771 new commits: ['15e9b14b4b4c', '6320b7d714cf', '3ee132d41dbc', '30682b960804', 'e919cdf3d4fe']
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
772
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
773 $ hg log -r tip -v
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
774 obsolete feature not enabled but 12 markers found!
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
775 changeset: 16:e919cdf3d4fe
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
776 tag: tip
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
777 parent: 11:30682b960804
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
778 user: test
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
779 date: Thu Jan 01 00:00:00 1970 +0000
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
780 files: file2.txt file3.txt
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
781 description:
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
782 four: extend the fold range
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
783
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
784 Differential Revision: https://phab.mercurial-scm.org/D8388
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
785
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
786
3dc6a70779f2 phabricator: add an option to fold several commits into one review (issue6244)
Matt Harbison <matt_harbison@yahoo.com>
parents: 44716
diff changeset
787
44550
bbb170f9396d phabricator: add a `phabimport` command
Matt Harbison <matt_harbison@yahoo.com>
parents: 44436
diff changeset
788 $ cd ..