Patchwork style: adjust whitespaces in webutil.py

login
register
mail settings
Submitter Anton Shestakov
Date Aug. 11, 2015, 4:21 p.m.
Message ID <b63827a9af4042092fe0.1439310104@neuro>
Download mbox | patch
Permalink /patch/10189/
State Accepted
Headers show

Comments

Anton Shestakov - Aug. 11, 2015, 4:21 p.m.
# HG changeset patch
# User Anton Shestakov <av6@dwimlabs.net>
# Date 1439270382 -28800
#      Tue Aug 11 13:19:42 2015 +0800
# Node ID b63827a9af4042092fe00c1e25564db5260a4f9d
# Parent  a7527c5769bbe9e6a5afda9e615ad40e69665e9e
style: adjust whitespaces in webutil.py

Turns out, all this came from the single d605a82cf189.
Augie Fackler - Aug. 11, 2015, 7:48 p.m.
On Wed, Aug 12, 2015 at 12:21:44AM +0800, Anton Shestakov wrote:
> # HG changeset patch
> # User Anton Shestakov <av6@dwimlabs.net>
> # Date 1439270382 -28800
> #      Tue Aug 11 13:19:42 2015 +0800
> # Node ID b63827a9af4042092fe00c1e25564db5260a4f9d
> # Parent  a7527c5769bbe9e6a5afda9e615ad40e69665e9e
> style: adjust whitespaces in webutil.py

Queued, thanks.

>
> Turns out, all this came from the single d605a82cf189.
>
> diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
> --- a/mercurial/hgweb/webutil.py
> +++ b/mercurial/hgweb/webutil.py
> @@ -203,7 +203,7 @@ def cleanpath(repo, path):
>      path = path.lstrip('/')
>      return pathutil.canonpath(repo.root, '', path)
>
> -def changeidctx (repo, changeid):
> +def changeidctx(repo, changeid):
>      try:
>          ctx = repo[changeid]
>      except error.RepoError:
> @@ -212,11 +212,11 @@ def changeidctx (repo, changeid):
>
>      return ctx
>
> -def changectx (repo, req):
> +def changectx(repo, req):
>      changeid = "tip"
>      if 'node' in req.form:
>          changeid = req.form['node'][0]
> -        ipos=changeid.find(':')
> +        ipos = changeid.find(':')
>          if ipos != -1:
>              changeid = changeid[(ipos + 1):]
>      elif 'manifest' in req.form:
> @@ -227,7 +227,7 @@ def changectx (repo, req):
>  def basechangectx(repo, req):
>      if 'node' in req.form:
>          changeid = req.form['node'][0]
> -        ipos=changeid.find(':')
> +        ipos = changeid.find(':')
>          if ipos != -1:
>              changeid = changeid[:ipos]
>              return changeidctx(repo, changeid)
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/hgweb/webutil.py b/mercurial/hgweb/webutil.py
--- a/mercurial/hgweb/webutil.py
+++ b/mercurial/hgweb/webutil.py
@@ -203,7 +203,7 @@  def cleanpath(repo, path):
     path = path.lstrip('/')
     return pathutil.canonpath(repo.root, '', path)
 
-def changeidctx (repo, changeid):
+def changeidctx(repo, changeid):
     try:
         ctx = repo[changeid]
     except error.RepoError:
@@ -212,11 +212,11 @@  def changeidctx (repo, changeid):
 
     return ctx
 
-def changectx (repo, req):
+def changectx(repo, req):
     changeid = "tip"
     if 'node' in req.form:
         changeid = req.form['node'][0]
-        ipos=changeid.find(':')
+        ipos = changeid.find(':')
         if ipos != -1:
             changeid = changeid[(ipos + 1):]
     elif 'manifest' in req.form:
@@ -227,7 +227,7 @@  def changectx (repo, req):
 def basechangectx(repo, req):
     if 'node' in req.form:
         changeid = req.form['node'][0]
-        ipos=changeid.find(':')
+        ipos = changeid.find(':')
         if ipos != -1:
             changeid = changeid[:ipos]
             return changeidctx(repo, changeid)