Show More
@@ -905,7 +905,8 b' def getdiffmeta(diff):' | |||
|
905 | 905 | """ |
|
906 | 906 | props = diff.get(b'properties') or {} |
|
907 | 907 | meta = props.get(b'hg:meta') |
|
908 | if not meta and props.get(b'local:commits'): | |
|
908 | if not meta: | |
|
909 | if props.get(b'local:commits'): | |
|
909 | 910 | commit = sorted(props[b'local:commits'].values())[0] |
|
910 | 911 | meta = {} |
|
911 | 912 | if b'author' in commit and b'authorEmail' in commit: |
@@ -920,7 +921,15 b' def getdiffmeta(diff):' | |||
|
920 | 921 | meta[b'node'] = node |
|
921 | 922 | if len(commit.get(b'parents', ())) >= 1: |
|
922 | 923 | meta[b'parent'] = commit[b'parents'][0] |
|
923 | return meta or {} | |
|
924 | else: | |
|
925 | meta = {} | |
|
926 | if b'date' not in meta and b'dateCreated' in diff: | |
|
927 | meta[b'date'] = b'%s 0' % diff[b'dateCreated'] | |
|
928 | if b'branch' not in meta and diff.get(b'branch'): | |
|
929 | meta[b'branch'] = diff[b'branch'] | |
|
930 | if b'parent' not in meta and diff.get(b'sourceControlBaseRevision'): | |
|
931 | meta[b'parent'] = diff[b'sourceControlBaseRevision'] | |
|
932 | return meta | |
|
924 | 933 | |
|
925 | 934 | def readpatch(repo, drevs, write): |
|
926 | 935 | """generate plain-text patch readable by 'hg import' |
@@ -32,6 +32,8 b' this test.' | |||
|
32 | 32 | Basic phabread: |
|
33 | 33 | $ hg phabread --test-vcr "$VCR/phabread-4480.json" D4480 | head |
|
34 | 34 | # HG changeset patch |
|
35 | # Date 1536771503 0 | |
|
36 | # Parent a5de21c9e3703f8e8eb064bd7d893ff2f703c66a | |
|
35 | 37 | exchangev2: start to implement pull with wire protocol v2 |
|
36 | 38 | |
|
37 | 39 | Wire protocol version 2 will take a substantially different |
@@ -39,8 +41,6 b' Basic phabread:' | |||
|
39 | 41 | is concerned). |
|
40 | 42 | |
|
41 | 43 | This commit establishes a new exchangev2 module for holding |
|
42 | code related to exchange using wire protocol v2. I could have | |
|
43 | added things to the existing exchange module. But it is already | |
|
44 | 44 | |
|
45 | 45 | phabupdate with an accept: |
|
46 | 46 | $ hg phabupdate --accept D4564 \ |
General Comments 0
You need to be logged in to leave comments.
Login now