git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Can I remove stg sync --undo ?

From
Karl Hasselström <kha@treskal.com>
Date
Jul 4, 2008, 02:09 UTC
Message-ID
<20080704020918.GA30669@diana.vm.bytemark.co.uk>
In-Reply-To
<b0943d9e0807031502x5f7c4babtd65511d7966c69f6@mail.gmail.com>
On 2008-07-03 23:02:28 +0100, Catalin Marinas wrote:
> Sorry for the delay, I've been really busy recently.
No problem.
Show 10 quoted lines
> 2008/7/2 Karl Hasselström <kha@treskal.com>:
>
> > I'm preparing a patch that removes all the old --undo flags, and
> > discovered that stg sync has an --undo flag backed by
> > stack.undo_refresh().
>
> The current --undo flag restores the state of the patch before a
> successful sync. If the sync fails with a conflict and it needs a
> refresh after resolving, I think it loses the previous state of the
> patch and just restores to whatever it was before the refresh.
[...]
Show 6 quoted lines
> The sync performs three operations - push, merge and refresh (if the
> refresh is automatic after merge, it doesn't update the backup
> information since it was done by merge).
>
> If merge fails, the refresh is manual after solving the conflicts. I
> suspect this will be recorded as a separate step for undo

Yeah, the new undo stuff will currently handle sync just like e.g. push and pop: write one log entry when the command's all done, plus one extra just before the conflicting push if there is one. So you can always undo the entire command; and in case of conflicts, you also have the option of undoing just the conflicting push. Is this enough for sync?

> (BTW, is resolved take into account for undo?).
Hmmm, what do you mean by "resolved"?
-- 
Karl Hasselström, kha@treskal.com
      www.treskal.com/kalle
Previous: Catalin MarinasNext: Catalin Marinas
Message 3 of 7 in “Can I remove stg sync --undo ?”
  1. Karl HasselströmJul 2, 2008
  2. Catalin MarinasJul 3, 2008
  3. Karl HasselströmJul 4, 2008
  4. Catalin MarinasJul 4, 2008
  5. Karl HasselströmJul 5, 2008
  6. Catalin MarinasJul 7, 2008
  7. Karl HasselströmJul 8, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.