Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
durin42 |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/mq.py (6 lines) |
Status | Author | Revision | |
---|---|---|---|
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz | ||
Closed | martinvonz |
"""Return a copy of input diff options with git set to true if | """Return a copy of input diff options with git set to true if | ||||
referenced patch is a git patch and should be preserved as such. | referenced patch is a git patch and should be preserved as such. | ||||
""" | """ | ||||
diffopts = diffopts.copy() | diffopts = diffopts.copy() | ||||
if not diffopts.git and self.gitmode == 'keep': | if not diffopts.git and self.gitmode == 'keep': | ||||
for patchfn in patches: | for patchfn in patches: | ||||
patchf = self.opener(patchfn, 'r') | patchf = self.opener(patchfn, 'r') | ||||
# if the patch was a git patch, refresh it as a git patch | # if the patch was a git patch, refresh it as a git patch | ||||
for line in patchf: | diffopts.git = any(line.startswith('diff --git') | ||||
if line.startswith('diff --git'): | for line in patchf) | ||||
diffopts.git = True | |||||
break | |||||
patchf.close() | patchf.close() | ||||
return diffopts | return diffopts | ||||
def join(self, *p): | def join(self, *p): | ||||
return os.path.join(self.path, *p) | return os.path.join(self.path, *p) | ||||
def findseries(self, patch): | def findseries(self, patch): | ||||
def matchpatch(l): | def matchpatch(l): |