* [PATCHv1 0/1] git-p4: fix file descriptor leak @ 2020-01-30 11:50 Luke Diamand 2020-01-30 11:50 ` [PATCHv1 1/1] git-p4: avoid leak of file handle when cloning Luke Diamand 0 siblings, 1 reply; 3+ messages in thread From: Luke Diamand @ 2020-01-30 11:50 UTC (permalink / raw) To: git; +Cc: Yang Zhao, Eric Sunshine, Luke Diamand Spotted by Eric Sunshine here: https://public-inbox.org/git/CAPig+cRx3hG64nuDie69o_gdX39F=sR6D8LyA7J1rCErgu0aMA@mail.gmail.com/ There are at least two more of these, but I would prefer to leave them alone until the python3 changes have been merged. Luke Diamand (1): git-p4: avoid leak of file handle when cloning git-p4.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.20.1.390.gb5101f9297 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCHv1 1/1] git-p4: avoid leak of file handle when cloning 2020-01-30 11:50 [PATCHv1 0/1] git-p4: fix file descriptor leak Luke Diamand @ 2020-01-30 11:50 ` Luke Diamand 2020-01-30 20:22 ` Junio C Hamano 0 siblings, 1 reply; 3+ messages in thread From: Luke Diamand @ 2020-01-30 11:50 UTC (permalink / raw) To: git; +Cc: Yang Zhao, Eric Sunshine, Luke Diamand Spotted by Eric Sunshine: https://public-inbox.org/git/CAPig+cRx3hG64nuDie69o_gdX39F=sR6D8LyA7J1rCErgu0aMA@mail.gmail.com/ Signed-off-by: Luke Diamand <luke@diamand.org> --- git-p4.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4.py index eb5bc28cf9..9a71a6690d 100755 --- a/git-p4.py +++ b/git-p4.py @@ -3563,7 +3563,8 @@ def importRevisions(self, args, branch_arg_given): changes = [] if len(self.changesFile) > 0: - output = open(self.changesFile).readlines() + with open(self.changesFile) as f: + output = f.readlines() changeSet = set() for line in output: changeSet.add(int(line)) -- 2.20.1.390.gb5101f9297 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCHv1 1/1] git-p4: avoid leak of file handle when cloning 2020-01-30 11:50 ` [PATCHv1 1/1] git-p4: avoid leak of file handle when cloning Luke Diamand @ 2020-01-30 20:22 ` Junio C Hamano 0 siblings, 0 replies; 3+ messages in thread From: Junio C Hamano @ 2020-01-30 20:22 UTC (permalink / raw) To: Luke Diamand; +Cc: git, Yang Zhao, Eric Sunshine Luke Diamand <luke@diamand.org> writes: > Spotted by Eric Sunshine: > > https://public-inbox.org/git/CAPig+cRx3hG64nuDie69o_gdX39F=sR6D8LyA7J1rCErgu0aMA@mail.gmail.com/ > > Signed-off-by: Luke Diamand <luke@diamand.org> > --- > git-p4.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/git-p4.py b/git-p4.py > index eb5bc28cf9..9a71a6690d 100755 > --- a/git-p4.py > +++ b/git-p4.py > @@ -3563,7 +3563,8 @@ def importRevisions(self, args, branch_arg_given): > changes = [] > > if len(self.changesFile) > 0: > - output = open(self.changesFile).readlines() > + with open(self.changesFile) as f: > + output = f.readlines() > changeSet = set() > for line in output: > changeSet.add(int(line)) I was scratching my head until I realized that this is PATCH 7/6 of the other 6-patch series. Will queue together with the other ones. Thanks. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-01-30 20:22 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-01-30 11:50 [PATCHv1 0/1] git-p4: fix file descriptor leak Luke Diamand 2020-01-30 11:50 ` [PATCHv1 1/1] git-p4: avoid leak of file handle when cloning Luke Diamand 2020-01-30 20:22 ` Junio C Hamano
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).