Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHG51e52a495214: mq: fix for merge detection methods
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | hgext/mq.py (8 lines) | |||
M | tests/test-mq-qnew.t (6 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
744f3cf7292d | 19acbeaea8e8 | Taapas Agrawal | Jun 19 2019, 3:38 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | taapas1128 | ||
Closed | taapas1128 | ||
Closed | taapas1128 | ||
Closed | taapas1128 | ||
Closed | taapas1128 | ||
Closed | taapas1128 | ||
Closed | taapas1128 | ||
Closed | taapas1128 |
def checklocalchanges(self, repo, force=False, refresh=True): | def checklocalchanges(self, repo, force=False, refresh=True): | ||||
excsuffix = '' | excsuffix = '' | ||||
if refresh: | if refresh: | ||||
excsuffix = ', qrefresh first' | excsuffix = ', qrefresh first' | ||||
# plain versions for i18n tool to detect them | # plain versions for i18n tool to detect them | ||||
_("local changes found, qrefresh first") | _("local changes found, qrefresh first") | ||||
_("local changed subrepos found, qrefresh first") | _("local changed subrepos found, qrefresh first") | ||||
statemod.checkunfinished(repo) | |||||
s = repo.status() | s = repo.status() | ||||
if not force: | if not force: | ||||
if len(repo[None].parents()) > 1: | statemod.checkunfinished(repo) | ||||
_("outstanding uncommitted merge") #i18 tool detection | |||||
raise error.Abort(_("outstanding uncommitted merge"+ excsuffix)) | |||||
if s.modified or s.added or s.removed or s.deleted: | if s.modified or s.added or s.removed or s.deleted: | ||||
_("local changes found") # i18n tool detection | _("local changes found") # i18n tool detection | ||||
raise error.Abort(_("local changes found" + excsuffix)) | raise error.Abort(_("local changes found" + excsuffix)) | ||||
if checksubstate(repo): | if checksubstate(repo): | ||||
_("local changed subrepos found") # i18n tool detection | _("local changed subrepos found") # i18n tool detection | ||||
raise error.Abort(_("local changed subrepos found" + excsuffix)) | raise error.Abort(_("local changed subrepos found" + excsuffix)) | ||||
else: | |||||
statemod.checkunfinished(repo, skipmerge=True) | |||||
return s | return s | ||||
_reserved = ('series', 'status', 'guards', '.', '..') | _reserved = ('series', 'status', 'guards', '.', '..') | ||||
def checkreservedname(self, name): | def checkreservedname(self, name): | ||||
if name in self._reserved: | if name in self._reserved: | ||||
raise error.Abort(_('"%s" cannot be used as the name of a patch') | raise error.Abort(_('"%s" cannot be used as the name of a patch') | ||||
% name) | % name) | ||||
if name != name.strip(): | if name != name.strip(): |
adding a | adding a | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
created new head | created new head | ||||
merging a | merging a | ||||
warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | ||||
0 files updated, 0 files merged, 0 files removed, 1 files unresolved | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | ||||
use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | ||||
(no more unresolved files) | (no more unresolved files) | ||||
abort: outstanding uncommitted merge | abort: cannot manage merge changesets | ||||
(use 'hg commit' or 'hg merge --abort') | |||||
$ rm -r sandbox | $ rm -r sandbox | ||||
hg headers | hg headers | ||||
$ echo "plain=false" >> $HGRCPATH | $ echo "plain=false" >> $HGRCPATH | ||||
$ mkdir sandbox | $ mkdir sandbox | ||||
$ (cd sandbox ; runtest) | $ (cd sandbox ; runtest) | ||||
adding a | adding a | ||||
adding a | adding a | ||||
1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | ||||
created new head | created new head | ||||
merging a | merging a | ||||
warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | warning: conflicts while merging a! (edit, then use 'hg resolve --mark') | ||||
0 files updated, 0 files merged, 0 files removed, 1 files unresolved | 0 files updated, 0 files merged, 0 files removed, 1 files unresolved | ||||
use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon | ||||
(no more unresolved files) | (no more unresolved files) | ||||
abort: outstanding uncommitted merge | abort: cannot manage merge changesets | ||||
(use 'hg commit' or 'hg merge --abort') | |||||
$ rm -r sandbox | $ rm -r sandbox | ||||
Test saving last-message.txt | Test saving last-message.txt | ||||
$ hg init repo | $ hg init repo | ||||
$ cd repo | $ cd repo | ||||
$ cat > $TESTTMP/commitfailure.py <<EOF | $ cat > $TESTTMP/commitfailure.py <<EOF |