Show More
@@ -168,7 +168,7 b' class Table(object):' | |||||
168 |
|
168 | |||
169 |
|
169 | |||
170 | class Translator(nodes.NodeVisitor): |
|
170 | class Translator(nodes.NodeVisitor): | |
171 | """""" |
|
171 | """ """ | |
172 |
|
172 | |||
173 | words_and_spaces = re.compile(r'\S+| +|\n') |
|
173 | words_and_spaces = re.compile(r'\S+| +|\n') | |
174 | document_start = """Man page generated from reStructuredText.""" |
|
174 | document_start = """Man page generated from reStructuredText.""" |
@@ -527,5 +527,5 b' class convert_git(common.converter_sourc' | |||||
527 | return bookmarks |
|
527 | return bookmarks | |
528 |
|
528 | |||
529 | def checkrevformat(self, revstr, mapname=b'splicemap'): |
|
529 | def checkrevformat(self, revstr, mapname=b'splicemap'): | |
530 |
""" |
|
530 | """git revision string is a 40 byte hex""" | |
531 | self.checkhexformat(revstr, mapname) |
|
531 | self.checkhexformat(revstr, mapname) |
@@ -729,5 +729,5 b' class mercurial_source(common.converter_' | |||||
729 | return bookmarks.listbookmarks(self.repo) |
|
729 | return bookmarks.listbookmarks(self.repo) | |
730 |
|
730 | |||
731 | def checkrevformat(self, revstr, mapname=b'splicemap'): |
|
731 | def checkrevformat(self, revstr, mapname=b'splicemap'): | |
732 |
""" |
|
732 | """Mercurial, revision string is a 40 byte hex""" | |
733 | self.checkhexformat(revstr, mapname) |
|
733 | self.checkhexformat(revstr, mapname) |
@@ -778,7 +778,7 b' class svn_source(converter_source):' | |||||
778 | return revcommit |
|
778 | return revcommit | |
779 |
|
779 | |||
780 | def checkrevformat(self, revstr, mapname=b'splicemap'): |
|
780 | def checkrevformat(self, revstr, mapname=b'splicemap'): | |
781 |
""" |
|
781 | """fails if revision format does not match the correct format""" | |
782 | if not re.match( |
|
782 | if not re.match( | |
783 | br'svn:[0-9a-f]{8,8}-[0-9a-f]{4,4}-' |
|
783 | br'svn:[0-9a-f]{8,8}-[0-9a-f]{4,4}-' | |
784 | br'[0-9a-f]{4,4}-[0-9a-f]{4,4}-[0-9a-f]' |
|
784 | br'[0-9a-f]{4,4}-[0-9a-f]{4,4}-[0-9a-f]' |
@@ -37,7 +37,7 b' svn_config = None' | |||||
37 |
|
37 | |||
38 |
|
38 | |||
39 | def _create_auth_baton(pool): |
|
39 | def _create_auth_baton(pool): | |
40 |
"""Create a Subversion authentication baton. |
|
40 | """Create a Subversion authentication baton.""" | |
41 | import svn.client |
|
41 | import svn.client | |
42 |
|
42 | |||
43 | # Give the client context baton a suite of authentication |
|
43 | # Give the client context baton a suite of authentication |
@@ -221,7 +221,7 b' else:' | |||||
221 |
|
221 | |||
222 |
|
222 | |||
223 | def _win32_strerror(err): |
|
223 | def _win32_strerror(err): | |
224 |
""" |
|
224 | """expand a win32 error code into a human readable message""" | |
225 |
|
225 | |||
226 | # FormatMessage will allocate memory and assign it here |
|
226 | # FormatMessage will allocate memory and assign it here | |
227 | buf = ctypes.c_char_p() |
|
227 | buf = ctypes.c_char_p() | |
@@ -303,20 +303,20 b' class CommandError(WatchmanError):' | |||||
303 |
|
303 | |||
304 |
|
304 | |||
305 | class Transport(object): |
|
305 | class Transport(object): | |
306 |
""" |
|
306 | """communication transport to the watchman server""" | |
307 |
|
307 | |||
308 | buf = None |
|
308 | buf = None | |
309 |
|
309 | |||
310 | def close(self): |
|
310 | def close(self): | |
311 |
""" |
|
311 | """tear it down""" | |
312 | raise NotImplementedError() |
|
312 | raise NotImplementedError() | |
313 |
|
313 | |||
314 | def readBytes(self, size): |
|
314 | def readBytes(self, size): | |
315 |
""" |
|
315 | """read size bytes""" | |
316 | raise NotImplementedError() |
|
316 | raise NotImplementedError() | |
317 |
|
317 | |||
318 | def write(self, buf): |
|
318 | def write(self, buf): | |
319 |
""" |
|
319 | """write some data""" | |
320 | raise NotImplementedError() |
|
320 | raise NotImplementedError() | |
321 |
|
321 | |||
322 | def setTimeout(self, value): |
|
322 | def setTimeout(self, value): | |
@@ -348,7 +348,7 b' class Transport(object):' | |||||
348 |
|
348 | |||
349 |
|
349 | |||
350 | class Codec(object): |
|
350 | class Codec(object): | |
351 |
""" |
|
351 | """communication encoding for the watchman server""" | |
352 |
|
352 | |||
353 | transport = None |
|
353 | transport = None | |
354 |
|
354 | |||
@@ -366,7 +366,7 b' class Codec(object):' | |||||
366 |
|
366 | |||
367 |
|
367 | |||
368 | class UnixSocketTransport(Transport): |
|
368 | class UnixSocketTransport(Transport): | |
369 |
""" |
|
369 | """local unix domain socket transport""" | |
370 |
|
370 | |||
371 | sock = None |
|
371 | sock = None | |
372 |
|
372 | |||
@@ -449,7 +449,7 b' def _get_overlapped_result_ex_impl(pipe,' | |||||
449 |
|
449 | |||
450 |
|
450 | |||
451 | class WindowsNamedPipeTransport(Transport): |
|
451 | class WindowsNamedPipeTransport(Transport): | |
452 |
""" |
|
452 | """connect to a named pipe""" | |
453 |
|
453 | |||
454 | def __init__(self, sockpath, timeout): |
|
454 | def __init__(self, sockpath, timeout): | |
455 | self.sockpath = sockpath |
|
455 | self.sockpath = sockpath | |
@@ -700,7 +700,7 b' class CLIProcessTransport(Transport):' | |||||
700 |
|
700 | |||
701 |
|
701 | |||
702 | class BserCodec(Codec): |
|
702 | class BserCodec(Codec): | |
703 |
""" |
|
703 | """use the BSER encoding. This is the default, preferred codec""" | |
704 |
|
704 | |||
705 | def __init__(self, transport, value_encoding, value_errors): |
|
705 | def __init__(self, transport, value_encoding, value_errors): | |
706 | super(BserCodec, self).__init__(transport) |
|
706 | super(BserCodec, self).__init__(transport) | |
@@ -752,7 +752,7 b' class ImmutableBserCodec(BserCodec):' | |||||
752 |
|
752 | |||
753 |
|
753 | |||
754 | class Bser2WithFallbackCodec(BserCodec): |
|
754 | class Bser2WithFallbackCodec(BserCodec): | |
755 |
""" |
|
755 | """use BSER v2 encoding""" | |
756 |
|
756 | |||
757 | def __init__(self, transport, value_encoding, value_errors): |
|
757 | def __init__(self, transport, value_encoding, value_errors): | |
758 | super(Bser2WithFallbackCodec, self).__init__( |
|
758 | super(Bser2WithFallbackCodec, self).__init__( | |
@@ -824,7 +824,7 b' class ImmutableBser2Codec(Bser2WithFallb' | |||||
824 |
|
824 | |||
825 |
|
825 | |||
826 | class JsonCodec(Codec): |
|
826 | class JsonCodec(Codec): | |
827 |
""" |
|
827 | """Use json codec. This is here primarily for testing purposes""" | |
828 |
|
828 | |||
829 | json = None |
|
829 | json = None | |
830 |
|
830 | |||
@@ -861,7 +861,7 b' class JsonCodec(Codec):' | |||||
861 |
|
861 | |||
862 |
|
862 | |||
863 | class client(object): |
|
863 | class client(object): | |
864 |
""" |
|
864 | """Handles the communication with the watchman service""" | |
865 |
|
865 | |||
866 | sockpath = None |
|
866 | sockpath = None | |
867 | transport = None |
|
867 | transport = None | |
@@ -1011,7 +1011,7 b' class client(object):' | |||||
1011 | return result["sockname"] |
|
1011 | return result["sockname"] | |
1012 |
|
1012 | |||
1013 | def _connect(self): |
|
1013 | def _connect(self): | |
1014 |
""" |
|
1014 | """establish transport connection""" | |
1015 |
|
1015 | |||
1016 | if self.recvConn: |
|
1016 | if self.recvConn: | |
1017 | if self.pid != os.getpid(): |
|
1017 | if self.pid != os.getpid(): | |
@@ -1176,7 +1176,7 b' class client(object):' | |||||
1176 | raise |
|
1176 | raise | |
1177 |
|
1177 | |||
1178 | def capabilityCheck(self, optional=None, required=None): |
|
1178 | def capabilityCheck(self, optional=None, required=None): | |
1179 |
""" |
|
1179 | """Perform a server capability check""" | |
1180 | res = self.query( |
|
1180 | res = self.query( | |
1181 | "version", {"optional": optional or [], "required": required or []} |
|
1181 | "version", {"optional": optional or [], "required": required or []} | |
1182 | ) |
|
1182 | ) |
@@ -76,7 +76,7 b' class gpg(object):' | |||||
76 | return procutil.filter(data, gpgcmd) |
|
76 | return procutil.filter(data, gpgcmd) | |
77 |
|
77 | |||
78 | def verify(self, data, sig): |
|
78 | def verify(self, data, sig): | |
79 |
""" |
|
79 | """returns of the good and bad signatures""" | |
80 | sigfile = datafile = None |
|
80 | sigfile = datafile = None | |
81 | try: |
|
81 | try: | |
82 | # create temporary files |
|
82 | # create temporary files |
@@ -510,7 +510,7 b' class histeditaction(object):' | |||||
510 | return cls(state, rev) |
|
510 | return cls(state, rev) | |
511 |
|
511 | |||
512 | def verify(self, prev, expected, seen): |
|
512 | def verify(self, prev, expected, seen): | |
513 |
""" |
|
513 | """Verifies semantic correctness of the rule""" | |
514 | repo = self.repo |
|
514 | repo = self.repo | |
515 | ha = hex(self.node) |
|
515 | ha = hex(self.node) | |
516 | self.node = scmutil.resolvehexnodeidprefix(repo, ha) |
|
516 | self.node = scmutil.resolvehexnodeidprefix(repo, ha) | |
@@ -819,7 +819,7 b' class edit(histeditaction):' | |||||
819 | @action([b'fold', b'f'], _(b'use commit, but combine it with the one above')) |
|
819 | @action([b'fold', b'f'], _(b'use commit, but combine it with the one above')) | |
820 | class fold(histeditaction): |
|
820 | class fold(histeditaction): | |
821 | def verify(self, prev, expected, seen): |
|
821 | def verify(self, prev, expected, seen): | |
822 |
""" |
|
822 | """Verifies semantic correctness of the fold rule""" | |
823 | super(fold, self).verify(prev, expected, seen) |
|
823 | super(fold, self).verify(prev, expected, seen) | |
824 | repo = self.repo |
|
824 | repo = self.repo | |
825 | if not prev: |
|
825 | if not prev: | |
@@ -2403,7 +2403,7 b' def ruleeditor(repo, ui, actions, editco' | |||||
2403 |
|
2403 | |||
2404 |
|
2404 | |||
2405 | def parserules(rules, state): |
|
2405 | def parserules(rules, state): | |
2406 |
"""Read the histedit rules string and return list of action objects |
|
2406 | """Read the histedit rules string and return list of action objects""" | |
2407 | rules = [ |
|
2407 | rules = [ | |
2408 | l |
|
2408 | l | |
2409 | for l in (r.strip() for r in rules.splitlines()) |
|
2409 | for l in (r.strip() for r in rules.splitlines()) |
@@ -102,7 +102,7 b' class lazyremotenamedict(mutablemapping)' | |||||
102 | self.loaded = False |
|
102 | self.loaded = False | |
103 |
|
103 | |||
104 | def _load(self): |
|
104 | def _load(self): | |
105 |
""" |
|
105 | """Read the remotenames file, store entries matching selected kind""" | |
106 | self.loaded = True |
|
106 | self.loaded = True | |
107 | repo = self._repo |
|
107 | repo = self._repo | |
108 | for node, rpath, rname in logexchange.readremotenamefile( |
|
108 | for node, rpath, rname in logexchange.readremotenamefile( | |
@@ -112,7 +112,7 b' class lazyremotenamedict(mutablemapping)' | |||||
112 | self.potentialentries[name] = (node, rpath, name) |
|
112 | self.potentialentries[name] = (node, rpath, name) | |
113 |
|
113 | |||
114 | def _resolvedata(self, potentialentry): |
|
114 | def _resolvedata(self, potentialentry): | |
115 |
""" |
|
115 | """Check that the node for potentialentry exists and return it""" | |
116 | if not potentialentry in self.potentialentries: |
|
116 | if not potentialentry in self.potentialentries: | |
117 | return None |
|
117 | return None | |
118 | node, remote, name = self.potentialentries[potentialentry] |
|
118 | node, remote, name = self.potentialentries[potentialentry] | |
@@ -160,13 +160,13 b' class lazyremotenamedict(mutablemapping)' | |||||
160 | return None |
|
160 | return None | |
161 |
|
161 | |||
162 | def keys(self): |
|
162 | def keys(self): | |
163 |
""" |
|
163 | """Get a list of bookmark or branch names""" | |
164 | if not self.loaded: |
|
164 | if not self.loaded: | |
165 | self._load() |
|
165 | self._load() | |
166 | return self.potentialentries.keys() |
|
166 | return self.potentialentries.keys() | |
167 |
|
167 | |||
168 | def iteritems(self): |
|
168 | def iteritems(self): | |
169 |
""" |
|
169 | """Iterate over (name, node) tuples""" | |
170 |
|
170 | |||
171 | if not self.loaded: |
|
171 | if not self.loaded: | |
172 | self._load() |
|
172 | self._load() | |
@@ -190,7 +190,7 b' class remotenames(object):' | |||||
190 | self.clearnames() |
|
190 | self.clearnames() | |
191 |
|
191 | |||
192 | def clearnames(self): |
|
192 | def clearnames(self): | |
193 |
""" |
|
193 | """Clear all remote names state""" | |
194 | self.bookmarks = lazyremotenamedict(b"bookmarks", self._repo) |
|
194 | self.bookmarks = lazyremotenamedict(b"bookmarks", self._repo) | |
195 | self.branches = lazyremotenamedict(b"branches", self._repo) |
|
195 | self.branches = lazyremotenamedict(b"branches", self._repo) | |
196 | self._invalidatecache() |
|
196 | self._invalidatecache() |
@@ -220,7 +220,7 b' class branchcache(object):' | |||||
220 | self._hasnode = lambda x: True |
|
220 | self._hasnode = lambda x: True | |
221 |
|
221 | |||
222 | def _verifyclosed(self): |
|
222 | def _verifyclosed(self): | |
223 |
""" |
|
223 | """verify the closed nodes we have""" | |
224 | if self._closedverified: |
|
224 | if self._closedverified: | |
225 | return |
|
225 | return | |
226 | for node in self._closednodes: |
|
226 | for node in self._closednodes: | |
@@ -230,7 +230,7 b' class branchcache(object):' | |||||
230 | self._closedverified = True |
|
230 | self._closedverified = True | |
231 |
|
231 | |||
232 | def _verifybranch(self, branch): |
|
232 | def _verifybranch(self, branch): | |
233 |
""" |
|
233 | """verify head nodes for the given branch.""" | |
234 | if branch not in self._entries or branch in self._verifiedbranches: |
|
234 | if branch not in self._entries or branch in self._verifiedbranches: | |
235 | return |
|
235 | return | |
236 | for n in self._entries[branch]: |
|
236 | for n in self._entries[branch]: | |
@@ -240,7 +240,7 b' class branchcache(object):' | |||||
240 | self._verifiedbranches.add(branch) |
|
240 | self._verifiedbranches.add(branch) | |
241 |
|
241 | |||
242 | def _verifyall(self): |
|
242 | def _verifyall(self): | |
243 |
""" |
|
243 | """verifies nodes of all the branches""" | |
244 | needverification = set(self._entries.keys()) - self._verifiedbranches |
|
244 | needverification = set(self._entries.keys()) - self._verifiedbranches | |
245 | for b in needverification: |
|
245 | for b in needverification: | |
246 | self._verifybranch(b) |
|
246 | self._verifybranch(b) | |
@@ -267,7 +267,7 b' class branchcache(object):' | |||||
267 | items = iteritems |
|
267 | items = iteritems | |
268 |
|
268 | |||
269 | def hasbranch(self, label): |
|
269 | def hasbranch(self, label): | |
270 |
""" |
|
270 | """checks whether a branch of this name exists or not""" | |
271 | self._verifybranch(label) |
|
271 | self._verifybranch(label) | |
272 | return label in self._entries |
|
272 | return label in self._entries | |
273 |
|
273 | |||
@@ -385,7 +385,7 b' class branchcache(object):' | |||||
385 | yield (bn, heads) + self._branchtip(heads) |
|
385 | yield (bn, heads) + self._branchtip(heads) | |
386 |
|
386 | |||
387 | def iterheads(self): |
|
387 | def iterheads(self): | |
388 |
""" |
|
388 | """returns all the heads""" | |
389 | self._verifyall() |
|
389 | self._verifyall() | |
390 | return pycompat.itervalues(self._entries) |
|
390 | return pycompat.itervalues(self._entries) | |
391 |
|
391 | |||
@@ -784,7 +784,7 b' class revbranchcache(object):' | |||||
784 | wlock.release() |
|
784 | wlock.release() | |
785 |
|
785 | |||
786 | def _writenames(self, repo): |
|
786 | def _writenames(self, repo): | |
787 |
""" |
|
787 | """write the new branch names to revbranchcache""" | |
788 | if self._rbcnamescount != 0: |
|
788 | if self._rbcnamescount != 0: | |
789 | f = repo.cachevfs.open(_rbcnames, b'ab') |
|
789 | f = repo.cachevfs.open(_rbcnames, b'ab') | |
790 | if f.tell() == self._rbcsnameslen: |
|
790 | if f.tell() == self._rbcsnameslen: | |
@@ -809,7 +809,7 b' class revbranchcache(object):' | |||||
809 | self._rbcnamescount = len(self._names) |
|
809 | self._rbcnamescount = len(self._names) | |
810 |
|
810 | |||
811 | def _writerevs(self, repo, start): |
|
811 | def _writerevs(self, repo, start): | |
812 |
""" |
|
812 | """write the new revs to revbranchcache""" | |
813 | revs = min(len(repo.changelog), len(self._rbcrevs) // _rbcrecsize) |
|
813 | revs = min(len(repo.changelog), len(self._rbcrevs) // _rbcrecsize) | |
814 | with repo.cachevfs.open(_rbcrevs, b'ab') as f: |
|
814 | with repo.cachevfs.open(_rbcrevs, b'ab') as f: | |
815 | if f.tell() != start: |
|
815 | if f.tell() != start: |
@@ -829,7 +829,7 b' class unbundle20(unpackermixin):' | |||||
829 | return params |
|
829 | return params | |
830 |
|
830 | |||
831 | def _processallparams(self, paramsblock): |
|
831 | def _processallparams(self, paramsblock): | |
832 | """""" |
|
832 | """ """ | |
833 | params = util.sortdict() |
|
833 | params = util.sortdict() | |
834 | for p in paramsblock.split(b' '): |
|
834 | for p in paramsblock.split(b' '): | |
835 | p = p.split(b'=', 1) |
|
835 | p = p.split(b'=', 1) |
@@ -326,7 +326,7 b' def resolvecommitoptions(ui, opts):' | |||||
326 |
|
326 | |||
327 |
|
327 | |||
328 | def checknotesize(ui, opts): |
|
328 | def checknotesize(ui, opts): | |
329 |
""" |
|
329 | """make sure note is of valid format""" | |
330 |
|
330 | |||
331 | note = opts.get(b'note') |
|
331 | note = opts.get(b'note') | |
332 | if not note: |
|
332 | if not note: | |
@@ -972,7 +972,7 b' def findcmd(cmd, table, strict=True):' | |||||
972 |
|
972 | |||
973 |
|
973 | |||
974 | def changebranch(ui, repo, revs, label, opts): |
|
974 | def changebranch(ui, repo, revs, label, opts): | |
975 |
""" |
|
975 | """Change the branch name of given revs to label""" | |
976 |
|
976 | |||
977 | with repo.wlock(), repo.lock(), repo.transaction(b'branches'): |
|
977 | with repo.wlock(), repo.lock(), repo.transaction(b'branches'): | |
978 | # abort in case of uncommitted merge or dirty wdir |
|
978 | # abort in case of uncommitted merge or dirty wdir | |
@@ -1108,7 +1108,7 b' def bailifchanged(repo, merge=True, hint' | |||||
1108 |
|
1108 | |||
1109 |
|
1109 | |||
1110 | def logmessage(ui, opts): |
|
1110 | def logmessage(ui, opts): | |
1111 |
""" |
|
1111 | """get the log message according to -m and -l option""" | |
1112 |
|
1112 | |||
1113 | check_at_most_one_arg(opts, b'message', b'logfile') |
|
1113 | check_at_most_one_arg(opts, b'message', b'logfile') | |
1114 |
|
1114 | |||
@@ -3920,7 +3920,7 b' def readgraftstate(repo, graftstate):' | |||||
3920 |
|
3920 | |||
3921 |
|
3921 | |||
3922 | def hgabortgraft(ui, repo): |
|
3922 | def hgabortgraft(ui, repo): | |
3923 |
""" |
|
3923 | """abort logic for aborting graft using 'hg abort'""" | |
3924 | with repo.wlock(): |
|
3924 | with repo.wlock(): | |
3925 | graftstate = statemod.cmdstate(repo, b'graftstate') |
|
3925 | graftstate = statemod.cmdstate(repo, b'graftstate') | |
3926 | return abortgraft(ui, repo, graftstate) |
|
3926 | return abortgraft(ui, repo, graftstate) |
@@ -366,7 +366,7 b' class server(object):' | |||||
366 | os.chdir(self.cwd) |
|
366 | os.chdir(self.cwd) | |
367 |
|
367 | |||
368 | def getencoding(self): |
|
368 | def getencoding(self): | |
369 |
""" |
|
369 | """writes the current encoding to the result channel""" | |
370 | self.cresult.write(encoding.encoding) |
|
370 | self.cresult.write(encoding.encoding) | |
371 |
|
371 | |||
372 | def serveone(self): |
|
372 | def serveone(self): |
@@ -331,7 +331,7 b' class uihunkline(patchnode):' | |||||
331 |
|
331 | |||
332 |
|
332 | |||
333 | class uihunk(patchnode): |
|
333 | class uihunk(patchnode): | |
334 |
"""ui patch hunk, wraps a hunk and keep track of ui behavior |
|
334 | """ui patch hunk, wraps a hunk and keep track of ui behavior""" | |
335 |
|
335 | |||
336 | maxcontext = 3 |
|
336 | maxcontext = 3 | |
337 |
|
337 |
@@ -2909,7 +2909,7 b' def debugrename(ui, repo, *pats, **opts)' | |||||
2909 |
|
2909 | |||
2910 | @command(b'debugrequires|debugrequirements', [], b'') |
|
2910 | @command(b'debugrequires|debugrequirements', [], b'') | |
2911 | def debugrequirements(ui, repo): |
|
2911 | def debugrequirements(ui, repo): | |
2912 |
""" |
|
2912 | """print the current repo requirements""" | |
2913 | for r in sorted(repo.requirements): |
|
2913 | for r in sorted(repo.requirements): | |
2914 | ui.write(b"%s\n" % r) |
|
2914 | ui.write(b"%s\n" % r) | |
2915 |
|
2915 |
@@ -269,7 +269,7 b' def validateconfig(ui):' | |||||
269 |
|
269 | |||
270 | def codec2iana(cs): |
|
270 | def codec2iana(cs): | |
271 | # type: (str) -> str |
|
271 | # type: (str) -> str | |
272 | '''''' |
|
272 | ''' ''' | |
273 | cs = email.charset.Charset(cs).input_charset.lower() |
|
273 | cs = email.charset.Charset(cs).input_charset.lower() | |
274 |
|
274 | |||
275 | # "latin1" normalizes to "iso8859-1", standard calls for "iso-8859-1" |
|
275 | # "latin1" normalizes to "iso8859-1", standard calls for "iso-8859-1" |
@@ -307,11 +307,11 b' class _mergestate_base(object):' | |||||
307 | yield f |
|
307 | yield f | |
308 |
|
308 | |||
309 | def allextras(self): |
|
309 | def allextras(self): | |
310 |
""" |
|
310 | """return all extras information stored with the mergestate""" | |
311 | return self._stateextras |
|
311 | return self._stateextras | |
312 |
|
312 | |||
313 | def extras(self, filename): |
|
313 | def extras(self, filename): | |
314 |
""" |
|
314 | """return extras stored with the mergestate for the given filename""" | |
315 | return self._stateextras[filename] |
|
315 | return self._stateextras[filename] | |
316 |
|
316 | |||
317 | def _resolve(self, preresolve, dfile, wctx): |
|
317 | def _resolve(self, preresolve, dfile, wctx): |
@@ -133,7 +133,7 b' def update_persistent_nodemap(revlog):' | |||||
133 |
|
133 | |||
134 |
|
134 | |||
135 | def delete_nodemap(tr, repo, revlog): |
|
135 | def delete_nodemap(tr, repo, revlog): | |
136 |
""" |
|
136 | """Delete nodemap data on disk for a given revlog""" | |
137 | if revlog.nodemap_file is None: |
|
137 | if revlog.nodemap_file is None: | |
138 | msg = "calling persist nodemap on a revlog without the feature enabled" |
|
138 | msg = "calling persist nodemap on a revlog without the feature enabled" | |
139 | raise error.ProgrammingError(msg) |
|
139 | raise error.ProgrammingError(msg) |
@@ -1563,7 +1563,7 b' def filterrequirements(requirements):' | |||||
1563 |
|
1563 | |||
1564 |
|
1564 | |||
1565 | def istreemanifest(repo): |
|
1565 | def istreemanifest(repo): | |
1566 |
""" |
|
1566 | """returns whether the repository is using treemanifest or not""" | |
1567 | return requirementsmod.TREEMANIFEST_REQUIREMENT in repo.requirements |
|
1567 | return requirementsmod.TREEMANIFEST_REQUIREMENT in repo.requirements | |
1568 |
|
1568 | |||
1569 |
|
1569 |
@@ -188,7 +188,7 b' class _statecheck(object):' | |||||
188 | return self._cmdmsg |
|
188 | return self._cmdmsg | |
189 |
|
189 | |||
190 | def continuemsg(self): |
|
190 | def continuemsg(self): | |
191 |
""" |
|
191 | """returns appropriate continue message corresponding to command""" | |
192 | return _(b'hg %s --continue') % (self._opname) |
|
192 | return _(b'hg %s --continue') % (self._opname) | |
193 |
|
193 | |||
194 | def isunfinished(self, repo): |
|
194 | def isunfinished(self, repo): |
@@ -629,7 +629,7 b' class fncache(object):' | |||||
629 | fp.close() |
|
629 | fp.close() | |
630 |
|
630 | |||
631 | def _checkentries(self, fp, warn): |
|
631 | def _checkentries(self, fp, warn): | |
632 |
""" |
|
632 | """make sure there is no empty string in entries""" | |
633 | if b'' in self.entries: |
|
633 | if b'' in self.entries: | |
634 | fp.seek(0) |
|
634 | fp.seek(0) | |
635 | for n, line in enumerate(util.iterfile(fp)): |
|
635 | for n, line in enumerate(util.iterfile(fp)): |
@@ -847,11 +847,11 b' class UpgradeOperation(object):' | |||||
847 | self.ui.status(_(b'%s\n %s\n\n') % (i.name, i.description)) |
|
847 | self.ui.status(_(b'%s\n %s\n\n') % (i.name, i.description)) | |
848 |
|
848 | |||
849 | def has_upgrade_action(self, name): |
|
849 | def has_upgrade_action(self, name): | |
850 |
""" |
|
850 | """Check whether the upgrade operation will perform this action""" | |
851 | return name in self._upgrade_actions_names |
|
851 | return name in self._upgrade_actions_names | |
852 |
|
852 | |||
853 | def print_post_op_messages(self): |
|
853 | def print_post_op_messages(self): | |
854 |
""" |
|
854 | """print post upgrade operation warning messages""" | |
855 | for a in self.upgrade_actions: |
|
855 | for a in self.upgrade_actions: | |
856 | if a.postupgrademessage is not None: |
|
856 | if a.postupgrademessage is not None: | |
857 | self.ui.warn(b'%s\n' % a.postupgrademessage) |
|
857 | self.ui.warn(b'%s\n' % a.postupgrademessage) |
@@ -134,7 +134,7 b' def _perform_clone(' | |||||
134 | sidedatacompanion, |
|
134 | sidedatacompanion, | |
135 | oncopiedrevision, |
|
135 | oncopiedrevision, | |
136 | ): |
|
136 | ): | |
137 |
""" |
|
137 | """returns the new revlog object created""" | |
138 | newrl = None |
|
138 | newrl = None | |
139 | if matchrevlog(upgrade_op.revlogs_to_process, rl_type): |
|
139 | if matchrevlog(upgrade_op.revlogs_to_process, rl_type): | |
140 | ui.note( |
|
140 | ui.note( |
@@ -143,7 +143,7 b' username = platform.username' | |||||
143 |
|
143 | |||
144 | def setumask(val): |
|
144 | def setumask(val): | |
145 | # type: (int) -> None |
|
145 | # type: (int) -> None | |
146 |
''' |
|
146 | '''updates the umask. used by chg server''' | |
147 | if pycompat.iswindows: |
|
147 | if pycompat.iswindows: | |
148 | return |
|
148 | return | |
149 | os.umask(val) |
|
149 | os.umask(val) |
General Comments 0
You need to be logged in to leave comments.
Login now