Patchwork [3,of,6] convert: for git's getchanges, always split entry line into components

login
register
mail settings
Submitter Siddharth Agarwal
Date Sept. 12, 2014, 7:48 p.m.
Message ID <fa001816475a584be4c0.1410551314@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/5807/
State Accepted
Headers show

Comments

Siddharth Agarwal - Sept. 12, 2014, 7:48 p.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@fb.com>
# Date 1410503867 25200
#      Thu Sep 11 23:37:47 2014 -0700
# Node ID fa001816475a584be4c0f6aff5ea769b68979b31
# Parent  0302b4d0355c43000cebb037c2857eb8305178da
convert: for git's getchanges, always split entry line into components

We always need to know whether the entry is a rename or copy, so split it up
unconditionally.

Patch

diff --git a/hgext/convert/git.py b/hgext/convert/git.py
--- a/hgext/convert/git.py
+++ b/hgext/convert/git.py
@@ -199,12 +199,11 @@ 
             if not entry:
                 if not l.startswith(':'):
                     continue
-                entry = l
+                entry = l.split()
                 continue
             f = l
             if f not in seen:
                 seen.add(f)
-                entry = entry.split()
                 h = entry[3]
                 p = (entry[1] == "100755")
                 s = (entry[1] == "120000")