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

Re: [PATCHv2 2/2] Add 'git svn reset' to unwind 'git svn fetch'

From
EWEric Wong <normalperson@yhbt.net>
Date
Jun 4, 2009, 22:38 UTC
Message-ID
<20090604223842.GA32010@dcvr.yhbt.net>
In-Reply-To
<1244087152-17002-2-git-send-email-ben@ben.com>
Ben Jackson <ben@ben.com> wrote:
Show 30 quoted lines
> Add a command to unwind the effects of fetch by moving the rev_map
> and refs/remotes/git-svn back to an old SVN revision.  This allows
> revisions to be re-fetched.  Ideally SVN revs would be immutable,
> but permissions changes in the SVN repository or indiscriminate use
> of '--ignore-paths' can create situations where fetch cannot make
> progress.
> 
> Signed-off-by: Ben Jackson <ben@ben.com>
> ---
> 
> Update ensures revision input is numeric.
> 
> On Wed, Jun 03, 2009 at 05:24:06PM -0700, Eric Wong wrote:
> > Ben Jackson <ben@ben.com> wrote:
> > > 3.  Without --parent it should probably fail for a nonexistent rev rather
> > > than automatically find_rev_before..
> >
> > Probably best to ignore the --parent flag and just pass 1 as the second
> > argument to find_rev_before.  That's how SVN operations work when a
> > non-exact revision is specified..
> 
> That is how '-r' works.  Passing '1' to find_rev_before *skips* the
> input rev.  The theory is that you may know that r1000 is "bad" and
> so you use 'git svn reset -r1000 --parent' to discard r1000 (while
> 'reset -r1000' *keeps* r1000, analagous to 'git reset SHA').  You could
> get the same effect with 'git svn reset -r999' (and internally that's
> identical).  I looked for a SVN syntax to copy, eg '-r1000^' if it were
> like GIT, but I didn't see one.  I know I am overloading --parent which
> means something else for other git-svn commands, so I'm happy to remove
> that if you don't like it.

Ah, I always subconciously just decremented the revision number by 1 myself. Maybe adding "^"/"~" handling to git-svn to handle SVN revisions would work, too, but --parent is fine, I guess.

This series acked and pushed out to git://git.bogomips.org/git-svn
-- 
Eric Wong
Previous: Ben Jackson
Message 3 of 3 in “[PATCHv2 1/2] Limit start revision of find_rev_before to max existing revision”
  1. Ben JacksonJun 4, 2009
  2. 2/2 Add 'git svn reset' to unwind 'git svn fetch'Ben Jackson, Jun 4, 2009
  3. Eric WongJun 4, 2009

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.