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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ben Jackson <ben@xxxxxxx> wrote:
> 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@xxxxxxx>
> ---
> 
> Update ensures revision input is numeric.
> 
> On Wed, Jun 03, 2009 at 05:24:06PM -0700, Eric Wong wrote:
> > Ben Jackson <ben@xxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]