npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

svncherrypicker

v1.0.6

Published

a small utility to find unmerged commits

Downloads

3

Readme

svncherrypicker

a small command line utility written in nodejs to help find unmerged commits while cherrypicking in svn repositories

Why this was created (motivation)?

I personally don't like to cherrypick in svn. But sometimes I have to work with teams where cherrypicking is normal part of the workflow. I wrote this utility to make cherrypicking a little easier.

Workflow

  1. svncp setup: Start a session by providing source and destination url for the svn repository (source to destination merge)
  2. svncp populate: Find commits in source which are not yet merged to destination. Caches it for faster access.
  3. svncp filter: Use filters commands to find revisions that you want. You can filter by author, dates, revision numbers, messages, updated files, etc.
  4. svncp pick/unpick: Add/remove revision to/from save basket.
  5. svncp merge: Once you have finalized revisions that you want to merge (using series of svncp filter and svncp pick/unpick), use this to generate merge command.

Installation

Install using npm

npm install -g svncherrypicker

Help

svncp --help
svncp <command> -- help

Sample usage

Assume that I have a svn repository at http://svnexample.com/repo1 I want to cherrypick some revisions from branches/feature1 to trunk.

I will first setup the session

svncp setup http://svnexample.com/repo1/branches/feature1 http://svnexample.com/repo1/trunk

I will then run populate command

svncp populate

It could take a while if there are a lot of unmerged commits between source and destination. Since populate command caches data about revision details, subsequent runs will be faster.

I will then use filter command to find revisions

by user1

svncp filter --author user1

by message

svncp filter --message somestring
svncp filter --message r:someregex
svncp filter --message r:f:i:someregex

by files/folders

svncp filter --paths g:lib/*.js
svncp filter --paths r:someregex
svncp filter --paths exactpath

I can adjust the response of filter command by --display option. I will use "c" to only display number of matched commits. "t" to display response in a table. "j" to return response in json format. I can also adjust which fields to return. "a,d,p,m" author,date,paths,message.

So for example:

svncp filter --author user1 --paths g:lib/*.js --display t --fields "p,m"

Will return all the revisions made by user1 which changed/added/removed js files inside lib folder. It will print information in a table. It will only print Revision Number, Paths, and Message fields.

Response

| Revision Number | Paths | Message | | ------------- | ------------- | ----- | | 23 | lib/somefile.js | Updated it to do something | | 34 | lib/someotherfile.js | Fixed some issue |

If I run svncp filter and I see the response where I want all the revisions. I will just use

svncp pick last

Which will add filtered revisions from last filter command to saved bucket.

If I only want few revisions from filtered response. I can just select them.

svncp pick 23,45,67

I can use unpick command to remove some or all revisions from saved bucket.

svncp unpick 23,67
svncp unpick all
svncp unpick last

unpick last removes all revisions which were returned by last filter command.

Using filter,pick,unpick command I can manage to find all the revisions I want to merge easily. After I have found all the revisions, I will just run

svncp merge

Which will print the svn merge command using source/destination setting from current session and revisions from saved bucket. I will then copy and run that command in destination working directory to merge.