Re: [PATCH] git p4: catch p4 describe errors

2012-11-03 Thread Matt Arsenault

On Nov 3, 2012, at 16:07 , Pete Wyckoff  wrote:
> 
> Arthur and Matt, you've both had intermittent "p4 describe"
> errors.  I've not been able to repeat this or come up with
> a possible root cause.  But it is clear that the error handling
> in this area is weak.
I tried this week to find the commit that caused the problem, but there were 
too many to sift through so I haven't managed to see it again either--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] Fix git p4 sync errors

2012-10-24 Thread Matt Arsenault

On Oct 21, 2012, at 12:06 , Junio C Hamano  wrote:
> 
>> 
>> This solves errors in some cases when syncing renamed files.
> 
> Can you be a bit more descriptive?  What are "errors in some case"?
> 
It might just be when files are renamed. I ran into this after months of using 
it, and I'm skeptical that in that time no files were ever renamed. I'm not 
sure what was special about the file that was renamed. (There also might have 
been deleted files in the same commit, not sure if that matters)

> In short, what I am getting at are:
> 
> - What breaks by not passing "-s"?  What are the user visible
>   symptoms?

There's a key error on the line
line 2198:epoch = details["time"]
The details object is an error different fields set (I don't remember what it 
is exactly, I'm not at work right now)

> 
> - Why is it a bug not to pass "-s"?  How does the bug happen?

I encountered this one time after using it for months. One day I couldn't git 
p4 rebase with the key error.  I searched for the error and found some version 
of git-p4 that fixed a similar error by adding the -s to describe. Adding the 
-s fixed the error and everything seemed to be working correctly.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] Fix git p4 sync errors

2012-10-20 Thread Matt Arsenault
>From 425e4dc6992d07aa00039c5bb8e8c76def591fd3 Mon Sep 17 00:00:00 2001
From: Matt Arsenault 
Date: Sat, 20 Oct 2012 18:48:45 -0700
Subject: [PATCH] git-p4: Fix not using -s option to describe

This solves errors in some cases when syncing renamed files.
Other places where describe is used use the -s, except this one.

Signed-off-by: Matt Arsenault 
---
 git-p4.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/git-p4.py b/git-p4.py
index 882b1bb..e203508 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -2543,7 +2543,7 @@ class P4Sync(Command, P4UserMap):
 def importChanges(self, changes):
 cnt = 1
 for change in changes:
-description = p4Cmd(["describe", str(change)])
+description = p4Cmd(["describe", "-s", str(change)])
 self.updateOptionDict(description)
 
 if not self.silent:
-- 
1.7.12.2

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html