diff options
-rw-r--r-- | .mailmap | 1 | ||||
-rw-r--r-- | project.py | 10 | ||||
-rw-r--r-- | subcmds/abandon.py | 2 | ||||
-rw-r--r-- | subcmds/gitc_delete.py | 2 |
4 files changed, 8 insertions, 7 deletions
@@ -1,4 +1,5 @@ | |||
1 | Anthony Newnam <anthony.newnam@garmin.com> Anthony <anthony@bnovc.com> | 1 | Anthony Newnam <anthony.newnam@garmin.com> Anthony <anthony@bnovc.com> |
2 | He Ping <tdihp@hotmail.com> heping <tdihp@hotmail.com> | ||
2 | Hu Xiuyun <xiuyun.hu@hisilicon.com> Hu xiuyun <xiuyun.hu@hisilicon.com> | 3 | Hu Xiuyun <xiuyun.hu@hisilicon.com> Hu xiuyun <xiuyun.hu@hisilicon.com> |
3 | Hu Xiuyun <xiuyun.hu@hisilicon.com> Hu Xiuyun <clouds08@qq.com> | 4 | Hu Xiuyun <xiuyun.hu@hisilicon.com> Hu Xiuyun <clouds08@qq.com> |
4 | Jelly Chen <chenguodong@huawei.com> chenguodong <chenguodong@huawei.com> | 5 | Jelly Chen <chenguodong@huawei.com> chenguodong <chenguodong@huawei.com> |
@@ -1984,15 +1984,17 @@ class Project(object): | |||
1984 | ids.add(ref_id) | 1984 | ids.add(ref_id) |
1985 | tmp.add(r) | 1985 | tmp.add(r) |
1986 | 1986 | ||
1987 | tmp_packed = '' | 1987 | tmp_packed_lines = [] |
1988 | old_packed = '' | 1988 | old_packed_lines = [] |
1989 | 1989 | ||
1990 | for r in sorted(all_refs): | 1990 | for r in sorted(all_refs): |
1991 | line = '%s %s\n' % (all_refs[r], r) | 1991 | line = '%s %s\n' % (all_refs[r], r) |
1992 | tmp_packed += line | 1992 | tmp_packed_lines.append(line) |
1993 | if r not in tmp: | 1993 | if r not in tmp: |
1994 | old_packed += line | 1994 | old_packed_lines.append(line) |
1995 | 1995 | ||
1996 | tmp_packed = ''.join(tmp_packed_lines) | ||
1997 | old_packed = ''.join(old_packed_lines) | ||
1996 | _lwrite(packed_refs, tmp_packed) | 1998 | _lwrite(packed_refs, tmp_packed) |
1997 | else: | 1999 | else: |
1998 | alt_dir = None | 2000 | alt_dir = None |
diff --git a/subcmds/abandon.py b/subcmds/abandon.py index 6f78da74..be32dc5c 100644 --- a/subcmds/abandon.py +++ b/subcmds/abandon.py | |||
@@ -81,7 +81,7 @@ It is equivalent to "git branch -D <branchname>". | |||
81 | err_msg = "error: cannot abandon %s" %br | 81 | err_msg = "error: cannot abandon %s" %br |
82 | print(err_msg, file=sys.stderr) | 82 | print(err_msg, file=sys.stderr) |
83 | for proj in err[br]: | 83 | for proj in err[br]: |
84 | print(' '*len(err_msg) + " | %s" % p.relpath, file=sys.stderr) | 84 | print(' '*len(err_msg) + " | %s" % proj.relpath, file=sys.stderr) |
85 | sys.exit(1) | 85 | sys.exit(1) |
86 | elif not success: | 86 | elif not success: |
87 | print('error: no project has local branch(es) : %s' % nb, | 87 | print('error: no project has local branch(es) : %s' % nb, |
diff --git a/subcmds/gitc_delete.py b/subcmds/gitc_delete.py index 7380c352..19caac5a 100644 --- a/subcmds/gitc_delete.py +++ b/subcmds/gitc_delete.py | |||
@@ -14,12 +14,10 @@ | |||
14 | # limitations under the License. | 14 | # limitations under the License. |
15 | 15 | ||
16 | from __future__ import print_function | 16 | from __future__ import print_function |
17 | import os | ||
18 | import shutil | 17 | import shutil |
19 | import sys | 18 | import sys |
20 | 19 | ||
21 | from command import Command, GitcClientCommand | 20 | from command import Command, GitcClientCommand |
22 | import gitc_utils | ||
23 | 21 | ||
24 | from pyversion import is_python3 | 22 | from pyversion import is_python3 |
25 | if not is_python3(): | 23 | if not is_python3(): |