Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-svn revision support #169

Merged
merged 6 commits into from
Jun 6, 2013
Merged

git-svn revision support #169

merged 6 commits into from
Jun 6, 2013

Conversation

kfb
Copy link

@kfb kfb commented Apr 9, 2013

I do a lot of reviewing of code hosted in an SVN repo; developers will often reference the SVN revision number of changes. This patch adds another column to the history view that shows the SVN revision number, extracted from the git-svn-id line. This allows for quickly mapping between git and SVN commits.

In quick testing, performance doesn't seem to be heavily impacted, but if others find differently it could be an off-by-default option.

(Apologies also for the XIB diff spam, I'm never sure which of the bits IB changes are actually required, so I played it safe and committed the whole thing)

@rowanj
Copy link
Owner

rowanj commented May 16, 2013

I haven't reviewed this yet; in the way of that is that I don't have a good git-svn repo to test with (at hand, I do have archives laying about).

Don't worry about the XIBs. They don't scare me.

Ideally, I think the column should be hidden (unavailable) unless the data is actually present; and probably not shown by default unless there is actually a git-svn remote configured; as in my experience, the commits survive indefinitely after a project has migrated entirely to git.

kfb added 6 commits June 3, 2013 10:41
This patch adds parsing of the output of git log to extract the SVN revision
number tied to each commit. The revision number is part of the git-svn-id
string.
This patch adds the ability to query the repo for the presence of any
SVN remotes. This is determined by whether the string "svn-remote" is
present in the repository's .git/config file.
This patch causes the "Git SVN Revision" table column to be removed
when a repository has no SVN remote.
@kfb
Copy link
Author

kfb commented Jun 3, 2013

Okay, so this should bring the pull request up to date with your comments. I've rebased against the current master and added the auto-hiding of the column for repositories with no SVN remote configured. I think there's probably a better way to go about this, but I'm not familiar enough with GitX's source to know if that's true or not.

@rowanj
Copy link
Owner

rowanj commented Jun 4, 2013

Commits look good; I'll just run it over my test repos and this should be good to make it into the next build.

@rowanj
Copy link
Owner

rowanj commented Jun 6, 2013

  • Doesn't seem to find the svn revision in commits that were made without a message

rowanj added a commit that referenced this pull request Jun 6, 2013
rowanj added a commit that referenced this pull request Jun 6, 2013
@rowanj rowanj merged commit da61af1 into rowanj:master Jun 6, 2013
rowanj added a commit that referenced this pull request Jun 6, 2013
* don't use a class method to determine the status for the repo
* cache the result against the repo object so we don't re-read the file each time we're asked (per-commit)
* use Objective-Git to read the config, looking for `svn-remote` sections
@rowanj
Copy link
Owner

rowanj commented Jun 6, 2013

@kfb FYI, Objective-Git does provide a facility for reading all remote properties; it's just through the GTConfiguration, not GTRemote; see my changes in PBGitRepository.m if you're curious :-)

ssp pushed a commit to ssp/gitx that referenced this pull request May 23, 2021
Add a "raw" mode to the search filters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants