Skip to content
Snippets Groups Projects
Commit ebef5fcf7bd0 authored by Martin von Zweigbergk's avatar Martin von Zweigbergk
Browse files

shelve: access status fields by name rather than index

parent 75e7d4a0f135
No related branches found
No related tags found
No related merge requests found
...@@ -230,5 +230,5 @@ ...@@ -230,5 +230,5 @@
if not node: if not node:
stat = repo.status(match=scmutil.match(repo[None], pats, opts)) stat = repo.status(match=scmutil.match(repo[None], pats, opts))
if stat[3]: if stat.deleted:
ui.status(_("nothing changed (%d missing files, see " ui.status(_("nothing changed (%d missing files, see "
...@@ -234,5 +234,5 @@ ...@@ -234,5 +234,5 @@
ui.status(_("nothing changed (%d missing files, see " ui.status(_("nothing changed (%d missing files, see "
"'hg status')\n") % len(stat[3])) "'hg status')\n") % len(stat.deleted))
else: else:
ui.status(_("nothing changed\n")) ui.status(_("nothing changed\n"))
return 1 return 1
...@@ -404,7 +404,7 @@ ...@@ -404,7 +404,7 @@
files.extend(shelvectx.parents()[0].files()) files.extend(shelvectx.parents()[0].files())
# revert will overwrite unknown files, so move them out of the way # revert will overwrite unknown files, so move them out of the way
for file in repo.status(unknown=True)[4]: for file in repo.status(unknown=True).unknown:
if file in files: if file in files:
util.rename(file, file + ".orig") util.rename(file, file + ".orig")
ui.pushbuffer(True) ui.pushbuffer(True)
...@@ -550,8 +550,8 @@ ...@@ -550,8 +550,8 @@
# to the original pctx. # to the original pctx.
# Store pending changes in a commit # Store pending changes in a commit
m, a, r, d = repo.status()[:4] s = repo.status()
if m or a or r or d: if s.modified or s.added or s.removed or s.deleted:
ui.status(_("temporarily committing pending changes " ui.status(_("temporarily committing pending changes "
"(restore with 'hg unshelve --abort')\n")) "(restore with 'hg unshelve --abort')\n"))
def commitfunc(ui, repo, message, match, opts): def commitfunc(ui, repo, message, match, opts):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment