Patchwork rebase: replace stray call of 'os.path.exists' with repo.vfs.exists at 'hg summary' hook

login
register
mail settings
Submitter Valters Vingolds
Date Jan. 6, 2017, 9:18 a.m.
Message ID <80ce9f02d8481f8d22d0.1483694308@w540>
Download mbox | patch
Permalink /patch/18111/
State Accepted
Headers show

Comments

Valters Vingolds - Jan. 6, 2017, 9:18 a.m.
# HG changeset patch
# User Valters Vingolds <valters@vingolds.ch>
# Date 1483693121 -3600
#      Fri Jan 06 09:58:41 2017 +0100
# Node ID 80ce9f02d8481f8d22d057753088283522cc2539
# Parent  62a41fd87dabf0e6fb631a9e9ba1aabfe7e0f801
rebase: replace stray call of 'os.path.exists' with repo.vfs.exists at 'hg summary' hook
Pierre-Yves David - Jan. 6, 2017, 2:08 p.m.
On 01/06/2017 10:18 AM, Valters Vingolds wrote:
> # HG changeset patch
> # User Valters Vingolds <valters@vingolds.ch>
> # Date 1483693121 -3600
> #      Fri Jan 06 09:58:41 2017 +0100
> # Node ID 80ce9f02d8481f8d22d057753088283522cc2539
> # Parent  62a41fd87dabf0e6fb631a9e9ba1aabfe7e0f801
> rebase: replace stray call of 'os.path.exists' with repo.vfs.exists at 'hg summary' hook

I've pushed this, our commit checker was complaining about the summary 
lenght, I've updated it to:

   rebase: use repo.vfs.exists in 'hg summary' hook

Thanks,

Patch

diff --git a/hgext/rebase.py b/hgext/rebase.py
--- a/hgext/rebase.py
+++ b/hgext/rebase.py
@@ -1428,7 +1428,7 @@ 
     return obsoletenotrebased
 
 def summaryhook(ui, repo):
-    if not os.path.exists(repo.join('rebasestate')):
+    if not repo.vfs.exists('rebasestate'):
         return
     try:
         rbsrt = rebaseruntime(repo, ui, {})