Show More
@@ -1102,7 +1102,7 b' class committablectx(basectx):' | |||
|
1102 | 1102 | """A committablectx object provides common functionality for a context that |
|
1103 | 1103 | wants the ability to commit, e.g. workingctx or memctx.""" |
|
1104 | 1104 | def __init__(self, repo, text="", user=None, date=None, extra=None, |
|
1105 | changes=None): | |
|
1105 | changes=None, branch=None): | |
|
1106 | 1106 | super(committablectx, self).__init__(repo) |
|
1107 | 1107 | self._rev = None |
|
1108 | 1108 | self._node = None |
@@ -1117,7 +1117,9 b' class committablectx(basectx):' | |||
|
1117 | 1117 | self._extra = {} |
|
1118 | 1118 | if extra: |
|
1119 | 1119 | self._extra = extra.copy() |
|
1120 |
if |
|
|
1120 | if branch is not None: | |
|
1121 | self._extra['branch'] = encoding.fromlocal(branch) | |
|
1122 | elif 'branch' not in self._extra: | |
|
1121 | 1123 | try: |
|
1122 | 1124 | branch = encoding.fromlocal(self._repo.dirstate.branch()) |
|
1123 | 1125 | except UnicodeDecodeError: |
@@ -2308,7 +2310,8 b' class memctx(committablectx):' | |||
|
2308 | 2310 | |
|
2309 | 2311 | def __init__(self, repo, parents, text, files, filectxfn, user=None, |
|
2310 | 2312 | date=None, extra=None, branch=None, editor=False): |
|
2311 |
super(memctx, self).__init__(repo, text, user, date, extra |
|
|
2313 | super(memctx, self).__init__(repo, text, user, date, extra, | |
|
2314 | branch=branch) | |
|
2312 | 2315 | self._rev = None |
|
2313 | 2316 | self._node = None |
|
2314 | 2317 | parents = [(p or nullid) for p in parents] |
@@ -2316,8 +2319,6 b' class memctx(committablectx):' | |||
|
2316 | 2319 | self._parents = [self._repo[p] for p in (p1, p2)] |
|
2317 | 2320 | files = sorted(set(files)) |
|
2318 | 2321 | self._files = files |
|
2319 | if branch is not None: | |
|
2320 | self._extra['branch'] = encoding.fromlocal(branch) | |
|
2321 | 2322 | self.substate = {} |
|
2322 | 2323 | |
|
2323 | 2324 | if isinstance(filectxfn, patch.filestore): |
General Comments 0
You need to be logged in to leave comments.
Login now