Re: [ANNOUNCE] pg - A patch porcelain for GIT

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Shawn Pearce
Date: Wednesday, February 15, 2006 - 10:55 am

Catalin Marinas <catalin.marinas@gmail.com> wrote:

When this occurs pg just gives up and leaves both patches A and
B unapplied and gives you the list of patches which it couldn't
apply but wanted to.  The working directory is left clean; its the
new base plus whatever patches before A that did apply cleanly.
I could have pg go back and try pushing A again and leave the
conflict ready for you to resolve but I don't always want that.
Since the user can have that happen with a quick no-arg `pg-push`
I leave it to the user to retry pushing A if they really think
that's worth trying.

However if the last patch fails to push during a pg-rebase then pg
leaves it alone and your working directory is dirty and you are left
with that last patch partially applied.  At which point you can back
it out by popping it off the stack or finish the conflict resolution.
 

Yea.  Which might not be pretty.  10 patches would cause pg to
attempt applying 11 patches before giving up, but each time the patch
is increased in size to include its predecessors who also didn't
apply cleanly.  As soon as a larger cluster applies pg goes back to
trying single patch application.  Obviously this could take a while
as the patch size is growing on each attempt and we are duplicating
work every time as pg always starts from a clean working directory.

Example: Say I have A, B, C, D, E, F on the stack.  A wasn't provided
by the upstream and pushes down cleanly.  B+C+D was given to me
by the upstream so pg first tries B, fails, then B+C, fails, then
B+C+D, succeeds, so it folds B+C+D into D and finishes pushing D.
Then it tries E, if E succeeds it tries F on its own.  If E fails it
tries E+F.  What's left in the working directory depends on if the
last operation was an auto-fold attempt or not and if it applied
cleanly (or not).


Hmm.  I had looked at Darcs over a year ago and found it to be a
rather interesting idea but at the time it couldn't handle my ~7000
file tree (and GIT wasn't even getting started yet).  I was actually
thinking about trying to drag the rejecting hunks forward somehow
when doing the auto-folding but I hadn't quite found a way to do
that easily.  I have a gut feeling that most of the time when this
problem occurs its on a subset of the files involved in any given
patch and that if I can push down a patch cleanly for 90+% of the
files while delaying the conflicts forward that might actually be
somewhat reasonable.  But maybe not.  :-)

-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[ANNOUNCE] pg - A patch porcelain for GIT, Shawn Pearce, (Fri Feb 10, 12:59 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Greg KH, (Fri Feb 10, 1:41 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Shawn Pearce, (Fri Feb 10, 2:04 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Petr Baudis, (Fri Feb 10, 2:17 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Shawn Pearce, (Fri Feb 10, 2:38 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Petr Baudis, (Fri Feb 10, 2:47 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Junio C Hamano, (Fri Feb 10, 3:07 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Greg KH, (Fri Feb 10, 4:20 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Sam Vilain, (Sun Feb 12, 7:49 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Shawn Pearce, (Sun Feb 12, 8:29 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Sam Vilain, (Sun Feb 12, 9:40 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Shawn Pearce, (Sun Feb 12, 11:03 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Catalin Marinas, (Mon Feb 13, 7:40 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Petr Baudis, (Mon Feb 13, 2:00 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Shawn Pearce, (Mon Feb 13, 9:56 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Shawn Pearce, (Mon Feb 13, 11:14 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Catalin Marinas, (Tue Feb 14, 2:26 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Karl , (Tue Feb 14, 3:08 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Chuck Lever, (Tue Feb 14, 8:22 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Karl , (Tue Feb 14, 9:07 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Chuck Lever, (Tue Feb 14, 1:58 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Petr Baudis, (Tue Feb 14, 3:29 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Sam Vilain, (Tue Feb 14, 5:22 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Shawn Pearce, (Tue Feb 14, 5:35 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Petr Baudis, (Tue Feb 14, 6:14 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, J. Bruce Fields, (Tue Feb 14, 9:11 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Shawn Pearce, (Tue Feb 14, 11:54 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Karl , (Wed Feb 15, 3:11 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Andreas Ericsson, (Wed Feb 15, 3:42 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Karl , (Wed Feb 15, 4:25 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Karl , (Wed Feb 15, 4:27 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Catalin Marinas, (Wed Feb 15, 10:12 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Catalin Marinas, (Wed Feb 15, 10:20 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Catalin Marinas, (Wed Feb 15, 10:25 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Shawn Pearce, (Wed Feb 15, 10:55 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, J. Bruce Fields, (Wed Feb 15, 12:45 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Karl , (Thu Feb 16, 12:54 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Junio C Hamano, (Thu Feb 16, 3:24 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Catalin Marinas, (Thu Feb 16, 3:33 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Fernando J. Pereda, (Thu Feb 16, 3:42 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Junio C Hamano, (Thu Feb 16, 3:52 am)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Catalin Marinas, (Thu Feb 16, 4:10 am)
[PATCH 0/2] stg uncommit, Karl , (Thu Feb 16, 9:27 pm)
[PATCH 2/2] Add 'stg uncommit' command, Karl , (Thu Feb 16, 9:31 pm)
Re: [ANNOUNCE] pg - A patch porcelain for GIT, Catalin Marinas, (Fri Feb 17, 2:57 pm)
Re: [PATCH 2/2] Add 'stg uncommit' command, Catalin Marinas, (Sun Feb 19, 3:51 am)
Re: [PATCH 2/2] Add 'stg uncommit' command, Karl , (Sun Feb 19, 6:45 am)
Re: [PATCH 2/2] Add 'stg uncommit' command, Karl , (Sun Feb 19, 7:47 am)
Re: [PATCH 2/2] Add 'stg uncommit' command, Sam Vilain, (Sun Feb 19, 2:15 pm)
Re: [PATCH 2/2] Add 'stg uncommit' command, Catalin Marinas, (Mon Feb 20, 10:20 am)
Re: [PATCH 2/2] Add 'stg uncommit' command, Karl , (Mon Feb 20, 10:30 am)
Re: [PATCH 2/2] Add 'stg uncommit' command, Catalin Marinas, (Mon Feb 20, 3:49 pm)
Re: [PATCH 2/2] Add 'stg uncommit' command, Karl , (Tue Feb 21, 12:55 am)