[Bug 4538] New: AttributeError: 'tuple' object has no attribute 'modified'
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Sun Feb 15 07:55:08 UTC 2015
http://bz.selenic.com/show_bug.cgi?id=4538
Priority: normal
Bug ID: 4538
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: AttributeError: 'tuple' object has no attribute
'modified'
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: peacech at gmail.com
Hardware: PC
Status: UNCONFIRMED
Version: 3.3
Component: Mercurial
Product: Mercurial
The call of repo.status in strip.py results in a plain tuple. In below lines I
have printed the return value of repo.status (which is correctly a 'status'
class) but somehow in strip.py it becomes a plain tuple.
It works if I manually convert the return value into 'status'.
def checklocalchanges(repo, force=False, excsuffix=''):
cmdutil.checkunfinished(repo)
# s = repo.status() # s here is a plain tuple
s = scmutil.status(*repo.status()) # line added
if not force:
if s.modified or s.added or s.removed or s.deleted:
_("local changes found") # i18n tool detection
raise util.Abort(_("local changes found" + excsuffix))
if checksubstate(repo):
_("local changed subrepos found") # i18n tool detection
raise util.Abort(_("local changed subrepos found" + excsuffix))
return s
~/repo/thg # hg qpop
repo.status
<status modified=[], added=[], removed=[], deleted=[], unknown=[], ignored=[],
clean=[]>
([], [], [], [], [], [], [])
** Unknown exception encountered with possibly-broken third-party extension
shelve
** which supports versions unknown of Mercurial.
** Please disable shelve and try your action again.
** If that fixes the bug please report it to the extension author.
** Python 2.7.9 (default, Dec 11 2014, 04:42:00) [GCC 4.9.2]
** Mercurial Distributed SCM (version 3.3)
** Extensions loaded: extdiff, fetch, strip, mq, children, color, graphlog,
progress, rebase, transplant, hgk, shelve, hgwatchman
Traceback (most recent call last):
File "/root/.python2/bin/hg", line 43, in <module>
mercurial.dispatch.run()
File "/root/.python2/lib/python2.7/site-packages/mercurial/dispatch.py", line
28, in run
sys.exit((dispatch(request(sys.argv[1:])) or 0) & 255)
File "/root/.python2/lib/python2.7/site-packages/mercurial/dispatch.py", line
71, in dispatch
ret = _runcatch(req)
File "/root/.python2/lib/python2.7/site-packages/mercurial/dispatch.py", line
140, in _runcatch
return _dispatch(req)
File "/root/.python2/lib/python2.7/site-packages/mercurial/dispatch.py", line
860, in _dispatch
cmdpats, cmdoptions)
File "/root/.python2/lib/python2.7/site-packages/mercurial/dispatch.py", line
621, in runcommand
ret = _runcommand(ui, options, cmd, d)
File "/root/.python2/lib/python2.7/site-packages/mercurial/extensions.py", line
194, in wrap
return wrapper(origfn, *args, **kwargs)
File "/root/.python2/lib/python2.7/site-packages/hgext/color.py", line 491, in
colorcmd
return orig(ui_, opts, cmd, cmdfunc)
File "/root/.python2/lib/python2.7/site-packages/mercurial/dispatch.py", line
951, in _runcommand
return checkargs()
File "/root/.python2/lib/python2.7/site-packages/mercurial/dispatch.py", line
922, in checkargs
return cmdfunc()
File "/root/.python2/lib/python2.7/site-packages/mercurial/dispatch.py", line
857, in <lambda>
d = lambda: util.checksignature(func)(ui, *args, **cmdoptions)
File "/root/.python2/lib/python2.7/site-packages/mercurial/util.py", line 711,
in check
return func(*args, **kwargs)
File "/root/.python2/lib/python2.7/site-packages/hgext/mq.py", line 2905, in
pop
keepchanges=opts.get('keep_changes'))
File "/root/.python2/lib/python2.7/site-packages/hgext/mq.py", line 1486, in
pop
s = self.checklocalchanges(repo, force=force or keepchanges)
File "/root/.python2/lib/python2.7/site-packages/hgext/mq.py", line 1076, in
checklocalchanges
return checklocalchanges(repo, force, excsuffix)
File "/root/.python2/lib/python2.7/site-packages/hgext/strip.py", line 39, in
checklocalchanges
if s.modified or s.added or s.removed or s.deleted:
AttributeError: 'tuple' object has no attribute 'modified'
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list