Show More
@@ -905,22 +905,31 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'): | |
|
909 |
|
|
|
910 | meta = {} | |
|
911 | if b'author' in commit and b'authorEmail' in commit: | |
|
912 | meta[b'user'] = b'%s <%s>' % (commit[b'author'], | |
|
913 | commit[b'authorEmail']) | |
|
914 | if b'time' in commit: | |
|
915 | meta[b'date'] = b'%d 0' % commit[b'time'] | |
|
916 | if b'branch' in commit: | |
|
917 |
|
|
|
918 | node = commit.get(b'commit', commit.get(b'rev')) | |
|
919 | if node: | |
|
920 |
|
|
|
921 | if len(commit.get(b'parents', ())) >= 1: | |
|
922 | meta[b'parent'] = commit[b'parents'][0] | |
|
923 | return meta or {} | |
|
908 | if not meta: | |
|
909 | if props.get(b'local:commits'): | |
|
910 | commit = sorted(props[b'local:commits'].values())[0] | |
|
911 | meta = {} | |
|
912 | if b'author' in commit and b'authorEmail' in commit: | |
|
913 | meta[b'user'] = b'%s <%s>' % (commit[b'author'], | |
|
914 | commit[b'authorEmail']) | |
|
915 | if b'time' in commit: | |
|
916 | meta[b'date'] = b'%d 0' % commit[b'time'] | |
|
917 | if b'branch' in commit: | |
|
918 | meta[b'branch'] = commit[b'branch'] | |
|
919 | node = commit.get(b'commit', commit.get(b'rev')) | |
|
920 | if node: | |
|
921 | meta[b'node'] = node | |
|
922 | if len(commit.get(b'parents', ())) >= 1: | |
|
923 | meta[b'parent'] = commit[b'parents'][0] | |
|
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