equal
deleted
inserted
replaced
36 import collections |
36 import collections |
37 |
37 |
38 from mercurial.i18n import _ |
38 from mercurial.i18n import _ |
39 from mercurial.node import ( |
39 from mercurial.node import ( |
40 hex, |
40 hex, |
41 nullid, |
|
42 short, |
41 short, |
43 ) |
42 ) |
44 from mercurial import ( |
43 from mercurial import ( |
45 cmdutil, |
44 cmdutil, |
46 commands, |
45 commands, |
107 |
106 |
108 def data(self): |
107 def data(self): |
109 return b'' |
108 return b'' |
110 |
109 |
111 def node(self): |
110 def node(self): |
112 return nullid |
111 return self._repo.nullid |
113 |
112 |
114 |
113 |
115 def uniq(lst): |
114 def uniq(lst): |
116 """list -> list. remove duplicated items without changing the order""" |
115 """list -> list. remove duplicated items without changing the order""" |
117 seen = set() |
116 seen = set() |
925 """(ctx, {path: content}, node) -> node. make a single commit |
924 """(ctx, {path: content}, node) -> node. make a single commit |
926 |
925 |
927 the commit is a clone from ctx, with a (optionally) different p1, and |
926 the commit is a clone from ctx, with a (optionally) different p1, and |
928 different file contents replaced by memworkingcopy. |
927 different file contents replaced by memworkingcopy. |
929 """ |
928 """ |
930 parents = p1 and (p1, nullid) |
929 parents = p1 and (p1, self.repo.nullid) |
931 extra = ctx.extra() |
930 extra = ctx.extra() |
932 if self._useobsolete and self.ui.configbool(b'absorb', b'add-noise'): |
931 if self._useobsolete and self.ui.configbool(b'absorb', b'add-noise'): |
933 extra[b'absorb_source'] = ctx.hex() |
932 extra[b'absorb_source'] = ctx.hex() |
934 |
933 |
935 desc = rewriteutil.update_hash_refs( |
934 desc = rewriteutil.update_hash_refs( |