Show More
@@ -16,6 +16,7 b' from .i18n import _' | |||
|
16 | 16 | from .node import ( |
|
17 | 17 | hex, |
|
18 | 18 | nullid, |
|
19 | nullrev, | |
|
19 | 20 | short, |
|
20 | 21 | ) |
|
21 | 22 | from .pycompat import ( |
@@ -1936,12 +1937,12 b' def tryimportone(ui, repo, patchdata, pa' | |||
|
1936 | 1937 | ui.debug(b'message:\n%s\n' % (message or b'')) |
|
1937 | 1938 | |
|
1938 | 1939 | if len(parents) == 1: |
|
1939 |
parents.append(repo[null |
|
|
1940 | parents.append(repo[nullrev]) | |
|
1940 | 1941 | if opts.get(b'exact'): |
|
1941 | 1942 | if not nodeid or not p1: |
|
1942 | 1943 | raise error.InputError(_(b'not a Mercurial patch')) |
|
1943 | 1944 | p1 = repo[p1] |
|
1944 |
p2 = repo[p2 or null |
|
|
1945 | p2 = repo[p2 or nullrev] | |
|
1945 | 1946 | elif p2: |
|
1946 | 1947 | try: |
|
1947 | 1948 | p1 = repo[p1] |
@@ -1951,10 +1952,10 b' def tryimportone(ui, repo, patchdata, pa' | |||
|
1951 | 1952 | # first parent. |
|
1952 | 1953 | if p1 != parents[0]: |
|
1953 | 1954 | p1 = parents[0] |
|
1954 |
p2 = repo[null |
|
|
1955 | p2 = repo[nullrev] | |
|
1955 | 1956 | except error.RepoError: |
|
1956 | 1957 | p1, p2 = parents |
|
1957 |
if p2. |
|
|
1958 | if p2.rev() == nullrev: | |
|
1958 | 1959 | ui.warn( |
|
1959 | 1960 | _( |
|
1960 | 1961 | b"warning: import the patch as a normal revision\n" |
@@ -3000,7 +3000,7 b' class metadataonlyctx(committablectx):' | |||
|
3000 | 3000 | parents = [repo[p] for p in parents if p is not None] |
|
3001 | 3001 | parents = parents[:] |
|
3002 | 3002 | while len(parents) < 2: |
|
3003 |
parents.append(repo[null |
|
|
3003 | parents.append(repo[nullrev]) | |
|
3004 | 3004 | p1, p2 = self._parents = parents |
|
3005 | 3005 | |
|
3006 | 3006 | # sanity check to ensure that the reused manifest parents are |
General Comments 0
You need to be logged in to leave comments.
Login now